🌱 cron: generalize config and create optional values for scorecard and criticality (2/n)#2254
Merged
azeemshaikh38 merged 7 commits intoossf:mainfrom Sep 12, 2022
Merged
Conversation
Signed-off-by: Spencer Schrock <sschrock@google.com>
Signed-off-by: Spencer Schrock <sschrock@google.com>
Signed-off-by: Spencer Schrock <sschrock@google.com>
Signed-off-by: Spencer Schrock <sschrock@google.com>
Signed-off-by: Spencer Schrock <sschrock@google.com>
Member
Author
|
The map can be fetched with |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #2254 +/- ##
=======================================
Coverage 44.45% 44.45%
=======================================
Files 95 95
Lines 7987 7987
=======================================
Hits 3551 3551
Misses 4173 4173
Partials 263 263 |
|
Integration tests success for |
azeemshaikh38
approved these changes
Sep 12, 2022
Contributor
|
Thanks! LGTM with comment |
Signed-off-by: Spencer Schrock <sschrock@google.com>
|
Integration tests success for |
N8BWert
pushed a commit
to N8BWert/scorecard
that referenced
this pull request
Sep 23, 2022
…d criticality (2/n) (ossf#2254) * Add map logic to yaml config. Signed-off-by: Spencer Schrock <sschrock@google.com> * Add scorecard yaml test Signed-off-by: Spencer Schrock <sschrock@google.com> * Separate general config values from scorecard specific values. Signed-off-by: Spencer Schrock <sschrock@google.com> * Add criticality values to config. Signed-off-by: Spencer Schrock <sschrock@google.com> * Add test to confirm empty string behavior. Signed-off-by: Spencer Schrock <sschrock@google.com> * Combine scorecard and criticality values under AdditionalParams. Signed-off-by: Spencer Schrock <sschrock@google.com> Signed-off-by: Spencer Schrock <sschrock@google.com> Co-authored-by: Azeem Shaikh <azeemshaikh38@gmail.com>
N8BWert
pushed a commit
to N8BWert/scorecard
that referenced
this pull request
Nov 28, 2022
…d criticality (2/n) (ossf#2254) * Add map logic to yaml config. Signed-off-by: Spencer Schrock <sschrock@google.com> * Add scorecard yaml test Signed-off-by: Spencer Schrock <sschrock@google.com> * Separate general config values from scorecard specific values. Signed-off-by: Spencer Schrock <sschrock@google.com> * Add criticality values to config. Signed-off-by: Spencer Schrock <sschrock@google.com> * Add test to confirm empty string behavior. Signed-off-by: Spencer Schrock <sschrock@google.com> * Combine scorecard and criticality values under AdditionalParams. Signed-off-by: Spencer Schrock <sschrock@google.com> Signed-off-by: Spencer Schrock <sschrock@google.com> Co-authored-by: Azeem Shaikh <azeemshaikh38@gmail.com> Signed-off-by: nathaniel.wert <nathaniel.wert@kudelskisecurity.com>
N8BWert
pushed a commit
to N8BWert/scorecard
that referenced
this pull request
Nov 28, 2022
…d criticality (2/n) (ossf#2254) * Add map logic to yaml config. Signed-off-by: Spencer Schrock <sschrock@google.com> * Add scorecard yaml test Signed-off-by: Spencer Schrock <sschrock@google.com> * Separate general config values from scorecard specific values. Signed-off-by: Spencer Schrock <sschrock@google.com> * Add criticality values to config. Signed-off-by: Spencer Schrock <sschrock@google.com> * Add test to confirm empty string behavior. Signed-off-by: Spencer Schrock <sschrock@google.com> * Combine scorecard and criticality values under AdditionalParams. Signed-off-by: Spencer Schrock <sschrock@google.com> Signed-off-by: Spencer Schrock <sschrock@google.com> Co-authored-by: Azeem Shaikh <azeemshaikh38@gmail.com> Signed-off-by: nathaniel.wert <nathaniel.wert@kudelskisecurity.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
Part of a series of refactors to generalize the cron infrastructure to enable re-use by the ossf criticality score project
What is the current behavior?
Every config value was a top level yaml field
What is the new behavior (if this is a feature change)?**
Only fields which are general enough to be re-used both by
scorecardandcriticality_scoreremain as top level fields. Anything specific to either program have been moved into nested fields calledscorecardandcriticality. These will be parsed as key, value pairs (both strings).The values can still be overwritten by environment variables. Consider the example below, which can be overridded by setting the environment variable
SCORECARD_EXAMPLE_FIELD:Which issue(s) this PR fixes
NONE
Special notes for your reviewer
Does this PR introduce a user-facing change?
For user-facing changes, please add a concise, human-readable release note to
the
release-note(In particular, describe what changes users might need to make in their
application as a result of this pull request.)