Skip to content

ci: add Security Scan stub (zizmor via reusable org workflow)#1256

Merged
crowecawcaw merged 3 commits into
aws-deadline:mainlinefrom
crowecawcaw:add-security-scan-stub
Jul 8, 2026
Merged

ci: add Security Scan stub (zizmor via reusable org workflow)#1256
crowecawcaw merged 3 commits into
aws-deadline:mainlinefrom
crowecawcaw:add-security-scan-stub

Conversation

@crowecawcaw

@crowecawcaw crowecawcaw commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

What

  1. security_scan.yml stub — thin caller for the org's reusable reusable_security_scan.yml (zizmor GitHub Actions static analysis). Mirrors the codeql.yml caller.

  2. 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. Internal aws-deadline/*@mainline refs left as-is (intentional central-bump model).

template-injection (8) — moved ${{ github.base_ref }} out of run: blocks in api-change-detection.yml into env: 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_run in claude_pr_review / on_opened_pr runs 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 high reports 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 so reusable_security_scan.yml@mainline resolves with the new behavior.

🤖 Draft — not published for review yet.

@github-actions github-actions Bot added the waiting-on-maintainers Waiting on the maintainers to review. label Jul 7, 2026
Comment thread .github/workflows/security_scan.yml Outdated
# 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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: write

Without 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Intentional

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

But I do appreciate the irony

@crowecawcaw
crowecawcaw force-pushed the add-security-scan-stub branch from 784beeb to 68819e1 Compare July 7, 2026 17:14
@crowecawcaw crowecawcaw changed the title Add Security Scan stub (zizmor via reusable org workflow) ci: add Security Scan stub (zizmor via reusable org workflow) Jul 7, 2026
@crowecawcaw
crowecawcaw force-pushed the add-security-scan-stub branch 2 times, most recently from 2832f1d to 9935439 Compare July 7, 2026 17:26
@github-advanced-security

Copy link
Copy Markdown

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:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@crowecawcaw
crowecawcaw force-pushed the add-security-scan-stub branch from af3eced to 633db7e Compare July 7, 2026 17:58
@crowecawcaw
crowecawcaw marked this pull request as ready for review July 7, 2026 19:27
@crowecawcaw
crowecawcaw requested a review from a team as a code owner July 7, 2026 19:27
@crowecawcaw
crowecawcaw force-pushed the add-security-scan-stub branch from 633db7e to 795b44b Compare July 7, 2026 20:13
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>
@crowecawcaw
crowecawcaw force-pushed the add-security-scan-stub branch from 795b44b to a1a093a Compare July 7, 2026 20:16
@crowecawcaw
crowecawcaw enabled auto-merge (squash) July 7, 2026 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-on-maintainers Waiting on the maintainers to review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants