Add CodeQL scanning workflow #1803
Open
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.
Add CodeQL scanning workflow for security analysis
This PR adds a GitHub Actions workflow using CodeQL to enable automatic code scanning for potential security vulnerabilities. Currently, Flatcar repositories using CodeQL-based rulesets are not all properly configured to run the scanner, which leads to stuck checks and confusion for contributors. This fixes that by explicitly adding a
.github/workflows/codeql.ymlfile.The workflow is configured to scan for C/C++ vulnerabilities and will run on every push, pull request to the
mainbranch, and weekly via a scheduled cron job.How to use
Once this PR is merged, GitHub's Security tab will begin showing CodeQL analysis results. No manual intervention is required unless further customization is needed for supported languages.
Testing done
This workflow file is based on GitHub's officially supported CodeQL scanning configuration. Manual verification was done in a GitHub Codespace with the following steps:
.github/workflows/codeql.ymlusingnanoenable-codeql-integrationbranch