-
-
Notifications
You must be signed in to change notification settings - Fork 133
Update CVE checks workflow to trigger on changes in 'infra/' directory #960
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
base: main
Are you sure you want to change the base?
Conversation
@Haarolean what you think, good to go? |
not quite: It's the other way around - we need to run CVE checks only if the app's code is changed -- be it frontend or backend. So we need to think of list of paths to include here |
aef5954
to
1ae362a
Compare
updated it any further changes needed? |
@Haarolean Follow up on this PR. |
@@ -2,18 +2,32 @@ name: "Infra: CVE checks" | |||
on: | |||
pull_request: | |||
types: [ "opened", "reopened", "synchronize" ] | |||
paths: | |||
- 'backend/**' |
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.
I feel like there's no need to run these if the code itself been changed but not dependencies. What do you think @Brijeshthummar02 ?
cc @yeikel
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.
My understanding is that this check was designed only for vulnerability scans.
However, there is also a secret scanning feature enabled by default that runs as well.
Based on this, I believe we should not maintain any specific list and instead remove the manual paths configuration altogether, allowing scans to run on any project change, as secrets can theoretically leak in any file.
Alternatively, if we do not intend to use secret scanning, I agree that application-level changes do not need to trigger the CVE scan, and we should consider disabling secret scanning to speed up the CVE scan
Given the value of secret scanning, I suggest we leave it enabled and perform a full project scan as proposed above.
Alternatively, we can split these into two dedicate steps(one for CVE and another for secrets) as needed and maintain the lists. But I think that it ads unnecessary maintenance overhead for very little value. This check runs async and the cost should be low
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.
Github offers secret scanning via other tools as well, not sure we need trivy for that but perhaps that won't hurt.
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.
My understanding is that these secret scans are based on heuristics and rules. It is probably a good idea to have both to benefit from the different rules/attempts to discover secrets
fixes #958
CVE checks will now run only when infrastructure files change. The workflow won't trigger for unrelated application code changes. Notifications will work correctly for scheduled runs if CVE checks fail.
What changes did you make? (Give an overview)
Is there anything you'd like reviewers to focus on?
How Has This Been Tested? (put an "x" (case-sensitive!) next to an item)
Checklist (put an "x" (case-sensitive!) next to all the items, otherwise the build will fail)
Check out Contributing and Code of Conduct
A picture of a cute animal (not mandatory but encouraged)