Merged
Conversation
jasonforal
reviewed
Feb 3, 2025
| SECRETS_ENABLED_VALUE="" | ||
| fi | ||
|
|
||
| if [ "$STATIC_ANALYSIS_ENABLED" = "false" ]; then |
Collaborator
There was a problem hiding this comment.
Only comment is that in the analyzer itself, we detect "true" or "yes" as the way to enable static analysis, defaulting to true if not passed in.
Is there a reason we don't implement the same logic here? If env variable is not defined or true or yes?
Collaborator
Author
There was a problem hiding this comment.
The env var is documented to have only true or false (see here) as we did for all GitHub actions.
jasonforal
approved these changes
Feb 4, 2025
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 problem are you trying to solve?
We want to add a flag to let the user enable or disable static analysis via environment variable. This will let the GitHub action disable static analysis if a user wants to only use secrets
What is your solution?
Follow the same pattern as secrets except that static analysis is enabled by default. The value has to be explicitely set to false to fail.
Related PR
PR for the GItHub action to inject this variable