Skip to content

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Brijeshthummar02
Copy link
Contributor

  • Breaking change? (if so, please describe the impact and migration path for existing application instances)

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)

  • No need to
  • Manually (please, describe, if necessary)
  • Unit checks
  • Integration checks
  • Covered by existing automation

Checklist (put an "x" (case-sensitive!) next to all the items, otherwise the build will fail)

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (e.g. ENVIRONMENT VARIABLES)
  • My changes generate no new warnings (e.g. Sonar is happy)
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged

Check out Contributing and Code of Conduct

A picture of a cute animal (not mandatory but encouraged)

@Brijeshthummar02 Brijeshthummar02 requested a review from a team as a code owner March 22, 2025 15:27
@kapybro kapybro bot added status/triage Issues pending maintainers triage scope/infra CI, CD, dev. env, etc. status/triage/manual Manual triage in progress status/triage/completed Automatic triage completed and removed status/triage Issues pending maintainers triage labels Mar 22, 2025
@Brijeshthummar02
Copy link
Contributor Author

@Haarolean what you think, good to go?

@Haarolean
Copy link
Member

@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

@Brijeshthummar02 Brijeshthummar02 force-pushed the 958-cve branch 2 times, most recently from aef5954 to 1ae362a Compare March 29, 2025 08:31
@Brijeshthummar02
Copy link
Contributor Author

@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

updated it any further changes needed?

@Brijeshthummar02
Copy link
Contributor Author

@Haarolean Follow up on this PR.

@@ -2,18 +2,32 @@ name: "Infra: CVE checks"
on:
pull_request:
types: [ "opened", "reopened", "synchronize" ]
paths:
- 'backend/**'
Copy link
Member

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

Copy link
Collaborator

@yeikel yeikel Apr 17, 2025

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

Copy link
Member

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.

Copy link
Collaborator

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

@Haarolean Haarolean added type/enhancement En enhancement/improvement to an already existing feature and removed status/triage/manual Manual triage in progress labels Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope/infra CI, CD, dev. env, etc. status/triage/completed Automatic triage completed type/enhancement En enhancement/improvement to an already existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Infra: Limit CVE checks run on main
3 participants