Commit ebafac1
committed
workflows: add CodeQL analysis workflow for GitHub Actions
Introduce a new CodeQL scanning workflow (.github/workflows/codeql.yml)
that statically analyzes all GitHub Actions workflow files in the
repository on every pull request targeting main.
What it does:
- Runs CodeQL with the 'actions' language target, which scans .yml
workflow files for security misconfigurations such as missing
permissions, unpinned action tags, script injection, and other GitHub
Actions-specific vulnerabilities.
- Uploads SARIF results to the GitHub Security tab, making findings
visible directly in pull requests and the repository's security
overview.
- Uses concurrency groups to cancel superseded runs on the same branch,
avoiding wasted CI time.
Security posture of the workflow itself:
- Top-level permissions default to contents: read.
- The analyze job explicitly declares the minimum required scopes:
actions: read (to inspect workflow metadata) and contents: read (to
checkout the repository).
- All third-party actions are pinned to immutable commit SHAs to prevent
supply chain attacks:
* actions/checkout @ de0fac2e4500dabe0009e67214ff5f5447ce83dd #
v6.0.2
* codeql-action/init @ 0d579ffd059c29b07949a3cce3983f0780820c98 #
v4
* codeql-action/analyze @ 0d579ffd059c29b07949a3cce3983f0780820c98 #
v4
- persist-credentials: false is set on checkout to avoid leaking the
GITHUB_TOKEN to subsequent steps.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>1 parent 6051c9b commit ebafac1
1 file changed
+50
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
0 commit comments