Skip to content

Remove CodeQL scanner & move others to new weekly schedule#1109

Merged
mhucka merged 13 commits intomasterfrom
mh-update-scanner-workflows
Aug 26, 2025
Merged

Remove CodeQL scanner & move others to new weekly schedule#1109
mhucka merged 13 commits intomasterfrom
mh-update-scanner-workflows

Conversation

@mhucka
Copy link
Copy Markdown
Contributor

@mhucka mhucka commented Aug 25, 2025

GitHub enhanced their CodeQL scanner and its configuration options since the time I originally wrote the custom workflow file here. It's now easier to simply use GitHub's repository options for setting up CodeQL. No need to maintain our own workflow anymore.

Also, the other scanners (OSV and Scorecard) are run on every PR, so there is not much value in running also running them nightly. I moved them to a new weekly workflow because it's still worth running them regularly.

Finally, this updates the workflows to the latest versions used in our template repo.

mhucka added 4 commits August 24, 2025 22:14
GitHub enhanced their CodeQL scanner and its configuration options since
the time this was written, and it's now easier to simply use the
repository settings for setting up CodeQL. No need to maintain our own
workflow anymore.

Also, the other scanners (OSV and Scorecard) are run on every PR, so
there is not much value in running it nightly too. I moved them to a new
weekly workflow because it's still worth running them regularly.
This slightly updates the workflow and gives the file a name that's
hopefully more clear.
This updates the workflow to the latest version from our template repo.
This is currently the driver for the OSV and Scorecard workflows. In the
future, we may add others.
@mhucka mhucka marked this pull request as ready for review August 25, 2025 05:20
@mhucka mhucka requested review from mpharrigan and ncrubin August 25, 2025 05:25
@mhucka mhucka added the area/devops Involves build systems, Make files, Bazel files, continuous integration, and or other DevOps topics label Aug 25, 2025
@mhucka mhucka requested a review from pavoljuhas August 25, 2025 18:59
Comment thread .github/workflows/osv-scanner.yaml Outdated
Copy link
Copy Markdown
Contributor

@pavoljuhas pavoljuhas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check the downgrades of actions in this PR.

Also, quite a few workflows run with write-all permissions.
Can we change that to something more restrictive?
For example, the OSV scanner example at https://google.github.io/osv-scanner/github-action/#scan-on-pull-request, grants write permission for security-events only.

mhucka added 3 commits August 25, 2025 14:07
The hash was for version v5, but the comment said it was for v4.
Some of the actions were out of date.
@mhucka
Copy link
Copy Markdown
Contributor Author

mhucka commented Aug 25, 2025

Also, quite a few workflows run with write-all permissions. Can we change that to something more restrictive? For example, the OSV scanner example at google.github.io/osv-scanner/github-action#scan-on-pull-request, grants write permission for security-events only.

@pavoljuhas A fair point. I committed a change that restricts the permissions. It seems to work, although I remember having a lot of trouble finding working permissions and settled on write-all partly out of desperation. We will have to wait and see if this works once merged into the default branch.

Comment thread .github/workflows/scorecard-scanner.yaml Outdated
Comment thread .github/workflows/osv-scanner.yaml Outdated
Comment thread .github/workflows/osv-scanner.yaml Outdated
Comment thread .github/workflows/osv-scanner.yaml Outdated
Copy link
Copy Markdown
Contributor

@pavoljuhas pavoljuhas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with a couple of comment updates.

Thank you for taking care of permissions!

mhucka and others added 4 commits August 26, 2025 14:36
Co-authored-by: Pavol Juhas <pavol.juhas@gmail.com>
Co-authored-by: Pavol Juhas <pavol.juhas@gmail.com>
Co-authored-by: Pavol Juhas <pavol.juhas@gmail.com>
Co-authored-by: Pavol Juhas <pavol.juhas@gmail.com>
@mhucka mhucka added this pull request to the merge queue Aug 26, 2025
Merged via the queue into master with commit 61493eb Aug 26, 2025
27 checks passed
@mhucka mhucka deleted the mh-update-scanner-workflows branch August 26, 2025 22:05
mhucka added a commit to mhucka/OpenFermion that referenced this pull request Sep 25, 2025
…b#1109)

GitHub enhanced their CodeQL scanner and its configuration options since
the time I originally wrote the custom workflow file here. It's now
easier to simply use GitHub's repository options for setting up CodeQL.
No need to maintain our own workflow anymore.

Also, the other scanners (OSV and Scorecard) are run on every PR, so
there is not much value in running also running them nightly. I moved
them to a new weekly workflow because it's still worth running them
regularly.

Finally, this updates the workflows to the latest versions used in our
template repo.

---------

Co-authored-by: Pavol Juhas <pavol.juhas@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/devops Involves build systems, Make files, Bazel files, continuous integration, and or other DevOps topics

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants