-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hardcode gitleaks version #78
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested improvement for future PR
let gitleaksVersion = | ||
process.env.GITLEAKS_VERSION || (await gitleaks.Latest(octokit)); | ||
|
||
let gitleaksVersion = process.env.GITLEAKS_VERSION || "8.9.0"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not specific to this PR, but what happens if the user sets the env variable to an invalid version string by mistake? e.g. "8.90" instead of "8.9.0"
Can we catch that on line 120?
See the source for the "latest" version logic https://github.com/gitleaks/gitleaks-action/blob/1f2d10fb689bc07a5f56f48d6db61f5bbbe772fa/src/index.js#L134-L135 See this PR that hard-codes the version for reasons why gitleaks/gitleaks-action#78
See the source for the "latest" version logic https://github.com/gitleaks/gitleaks-action/blob/1f2d10fb689bc07a5f56f48d6db61f5bbbe772fa/src/index.js#L134-L135 See this PR that hard-codes the version for reasons why gitleaks/gitleaks-action#78 This PR adds the missing documentation gitleaks/gitleaks-action#109
See the source for the "latest" version logic https://github.com/gitleaks/gitleaks-action/blob/1f2d10fb689bc07a5f56f48d6db61f5bbbe772fa/src/index.js#L134-L135 See this PR that hard-codes the version for reasons why gitleaks/gitleaks-action#78
See the source for the "latest" version logic https://github.com/gitleaks/gitleaks-action/blob/1f2d10fb689bc07a5f56f48d6db61f5bbbe772fa/src/index.js#L134-L135 See this PR that hard-codes the version for reasons why gitleaks/gitleaks-action#78 This PR adds the missing documentation gitleaks/gitleaks-action#109
@weineran mind reviewing this too? I think we should default to using a hardcoded version rather than always pulling latest for two reasons: