-
Notifications
You must be signed in to change notification settings - Fork 66
Harden CI: point the security audit's zizmor scan at composite actions #5916
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -249,17 +249,26 @@ jobs: | |
| GH_TOKEN: ${{ github.token }} | ||
| run: | | ||
| mkdir -p audit | ||
| # Workflow definitions only, which is the scope the SecurityAuditScanner | ||
| # component describes. | ||
| # Workflow definitions AND the composite actions under .github/actions. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The SecurityAuditScanner blueprint specifies scanning "the workflow definitions themselves," but the code now scans both workflows and composite actions under .github/actions. This scope expansion is not reflected in the blueprint's description of SecurityAuditScanner's responsibilities. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The SecurityAuditScanner blueprint specifies scanning "the workflow definitions themselves," but the code now scans both workflow definitions and composite actions under .github/actions/. This scope expansion is not reflected in the blueprint's responsibilities. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The SecurityAuditScanner blueprint specifies scanning "the workflow definitions themselves," but the code now scans both workflow definitions and composite actions under .github/actions/. This scope expansion is not reflected in the blueprint's responsibilities. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The SecurityAuditScanner blueprint specifies scanning "the workflow definitions themselves," but this PR expands the implementation to scan both workflow definitions and composite actions under .github/actions/. The scope expansion is not reflected in the blueprint's documented responsibilities. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The SecurityAuditScanner component specifies scanning "the workflow definitions themselves," but the implementation now scans both workflow definitions and composite actions under .github/actions/. This scope expansion is not reflected in the blueprint's documented responsibilities. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The blueprint specifies SecurityAuditScanner scans "the workflow definitions themselves," but the implementation now also scans composite actions under .github/actions/ (action.yml and action.yaml files), expanding the documented scope beyond what the blueprint specifies. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The blueprint specifies that SecurityAuditScanner scans "workflow definitions themselves," but the implementation now also scans composite actions under .github/actions/ (action.yml and action.yaml files), expanding the documented scope beyond workflow definitions alone. |
||
| # | ||
| # The composite action under .github/actions/ is a real gap and is NOT | ||
| # covered here: its steps run inline in the calling job, with that job's | ||
| # token and secrets, so it carries the same rule families a workflow | ||
| # does, and nothing scans it today. Widening this input set to include | ||
| # it is a one-line change, but it is a scope the blueprint does not | ||
| # describe, so it needs the product record first rather than arriving | ||
| # as a side effect of turning the scanner on. Tracked as follow-up. | ||
| # A composite action's steps run inline in the calling job, with that | ||
| # job's token and secrets, so it carries the same rule families a | ||
| # workflow does — and until now nothing scanned it. This was recorded | ||
| # here as a known gap and deferred; clawmetry-cloud closed the same | ||
| # gap on its own mirror of this scan (cloud #2299), which left this | ||
| # repo the only one of the three whose actions nothing audited. | ||
| # | ||
| # Composite actions are named individually rather than by directory: | ||
| # pointing zizmor at a directory hands it every YAML file inside, and | ||
| # a non-action YAML landing there later would abort the audit | ||
| # (recorded as a scanner outage below) rather than be skipped. | ||
| inputs=".github/workflows" | ||
| if [ -d .github/actions ]; then | ||
| while IFS= read -r a; do | ||
| inputs="$inputs $a" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The SecurityAuditScanner component specifies scanning "workflow definitions themselves," but the implementation now scans both workflow definitions and composite actions under .github/actions/ (lines 268-271), expanding the documented scope. |
||
| done < <(find .github/actions -type f \ | ||
|
Comment on lines
+252
to
+269
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The SecurityAuditScanner component blueprint specifies scanning "the workflow definitions themselves," but the code now scans both workflow definitions and composite actions under .github/actions/. This scope expansion is not reflected in the blueprint's responsibilities. |
||
| \( -name 'action.yml' -o -name 'action.yaml' \) | sort) | ||
| fi | ||
|
Comment on lines
+268
to
+271
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The SecurityAuditScanner component specifies scanning "the workflow definitions themselves," but the implementation now scans both workflow definitions and composite actions under .github/actions/ (lines 268-271). This scope expansion contradicts the documented responsibility. |
||
| # Record the file set the scanner was handed. A finding list is | ||
| # identical whether it audited thirty-seven files or none, so | ||
| # coverage is the one thing the JSON cannot tell you afterwards. | ||
|
|
||
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.
The SecurityAuditScanner blueprint specifies scanning "workflow definitions themselves," but the code now scans both workflows and composite actions under .github/actions. This scope expansion is not reflected in the blueprint's description of SecurityAuditScanner's responsibilities.