ci: add Security Scan stub (zizmor via reusable org workflow)#1256
Conversation
| # added there apply here automatically — no change needed to this stub. | ||
| uses: aws-deadline/.github/.github/workflows/reusable_security_scan.yml@mainline | ||
| permissions: | ||
| security-events: write |
There was a problem hiding this comment.
The job-level permissions: block only grants security-events: write. Once any permissions: key is declared, every scope you do not list defaults to none — so contents becomes none here. A security scan almost certainly needs to check out the repository (and the reusable workflow inherits these permissions when called via uses:), so it likely also needs contents: read:
permissions:
contents: read
security-events: writeWithout it, actions/checkout in the reusable workflow may fail (definitely on a private repo; behavior on public repos is less predictable). Worth confirming against what reusable_security_scan.yml actually requires.
| name: Scan | ||
| # Central, extensible security-scan workflow (currently zizmor). New checks | ||
| # added there apply here automatically — no change needed to this stub. | ||
| uses: aws-deadline/.github/.github/workflows/reusable_security_scan.yml@mainline |
There was a problem hiding this comment.
The reusable workflow is referenced by the mutable branch ref @mainline rather than a pinned commit SHA. This is the same class of finding that zizmor itself flags (unpinned-uses), so it is slightly ironic in a security-scan stub. Since the target lives in the same org (aws-deadline/.github) the supply-chain risk is lower than a third-party action, and pinning a same-org reusable workflow to a SHA does add maintenance overhead — so this may be an intentional trade-off. Flagging for awareness.
There was a problem hiding this comment.
But I do appreciate the irony
784beeb to
68819e1
Compare
2832f1d to
9935439
Compare
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
af3eced to
633db7e
Compare
633db7e to
795b44b
Compare
Thin caller for aws-deadline/.github reusable_security_scan.yml, which runs zizmor (GitHub Actions static analysis) and is the single place new security checks are added. Mirrors the codeql.yml caller: same triggers, @mainline reference, and security-events: write. Advisory during rollout (the reusable workflow defaults fail-on-findings to false); SARIF still lands in the Security tab. Copy this file to the other aws-deadline repos to extend coverage. Signed-off-by: Stephen Crowe <6042774+crowecawcaw@users.noreply.github.com>
Make deadline-cloud pass the new fail-on-high Security Scan gate. - unpinned-uses (46): pin all third-party actions (actions/*, aws-actions/*, dependabot/*, pypa/*) to full commit SHAs with version comments. Dependabot keeps them current. Internal aws-deadline/* @mainline refs left as-is. - template-injection (8): move ${{ github.base_ref }} out of run: blocks in api-change-detection.yml into env: vars referenced as shell $VARS. Suppress-with-justification for 10 findings that are intentional design, not bugs (fixing them would break working features): - dangerous-triggers (2): workflow_run in claude_pr_review / on_opened_pr runs from the default branch; fork PRs cannot alter behavior or secrets. - bot-conditions (1): canonical dependabot auto-approve actor check. - cache-poisoning (7): test-only workflow, deterministic cache keys, no published release artifacts. zizmor --min-severity high now reports 0 findings on .github/. Signed-off-by: Stephen Crowe <6042774+crowecawcaw@users.noreply.github.com>
795b44b to
a1a093a
Compare
What
security_scan.ymlstub — thin caller for the org's reusablereusable_security_scan.yml(zizmor GitHub Actions static analysis). Mirrors thecodeql.ymlcaller.Fix all high-severity findings so this repo passes the new fail-on-high gate:
unpinned-uses (46) — pinned all third-party actions (
actions/*,aws-actions/*,dependabot/*,pypa/*) to full commit SHAs with version comments. Dependabot keeps them current. Internalaws-deadline/*@mainlinerefs left as-is (intentional central-bump model).template-injection (8) — moved
${{ github.base_ref }}out ofrun:blocks inapi-change-detection.ymlintoenv:vars referenced as shell$VARS. Behavior-preserving; closes the shell-injection surface.Suppressed-with-justification (10) — intentional design, not bugs; "fixing" would break working features:
dangerous-triggers(2):workflow_runinclaude_pr_review/on_opened_prruns from the default branch, so fork PRs cannot alter behavior or secrets.bot-conditions(1): canonical Dependabot auto-approve actor check.cache-poisoning(7): test-only workflow, deterministic cache keys, no published release artifacts.After:
zizmor --min-severity highreports 0 findings on.github/.Gate behavior
Inherits the org reusable workflow's fail-on-high gate (findings reported in the run log + PR annotations). Medium/low findings (
excessive-permissions,secrets-inherit,artipacked) remain visible but non-blocking — accepted as hygiene follow-up per the org standard.Depends on
aws-deadline/.github#89(gate + high fixes in the reusable workflow). Merge that first soreusable_security_scan.yml@mainlineresolves with the new behavior.🤖 Draft — not published for review yet.