Skip to content

ci: gate Security Scan on high findings and fix all high findings#89

Merged
crowecawcaw merged 1 commit into
aws-deadline:mainlinefrom
crowecawcaw:security-scan-fail-on-high
Jul 7, 2026
Merged

ci: gate Security Scan on high findings and fix all high findings#89
crowecawcaw merged 1 commit into
aws-deadline:mainlinefrom
crowecawcaw:security-scan-fail-on-high

Conversation

@crowecawcaw

Copy link
Copy Markdown

Follow-up to the initial Security Scan setup. Two things:

1. Flip the gate to blocking, report in logs

Per team decision, the Security Scan now fails the check on findings and reports in the run log + inline PR annotations (not the Security tab):

  • advanced-security: false + annotations: true → findings print in the Actions log and as PR annotations.
  • New min-severity input, default high → only high-severity findings fail the job. Medium/low are not reported, so PRs are gated on serious issues without being red-walled by hygiene noise. Lower per-repo to medium once a repo's high backlog is at zero.
  • Removed continue-on-error (it's a gate now) and the security-events: write permission (no SARIF upload).

2. Fix all 22 high findings so this repo passes its own gate

template-injection (18) — moved every ${{ inputs.* }} / ${{ github.* }} out of run: blocks into env: vars referenced as shell $VARS. Behavior-preserving; closes the shell-injection surface. Files: check-release, tag-release, reusable_bump, reusable_label_pr, reusable_release.

unsound-condition (4) — these were real bugs: a nested ${{ }} inside an if: expression context made the condition always evaluate true, silently defeating the guard. Rewritten as pure expressions:

  • reusable_canary, reusable_e2e_test, reusable_integration_test: github.repository == format('aws-deadline/{0}', inputs.repository) (the repo guard now actually works)
  • reusable_publish_v2: ... && inputs.installer_oses != ''

After: zizmor --min-severity high reports 0 findings on .github/. YAML validated.

On medium findings (why they're not gated)

The remaining mediums are hygiene, not exploitable code paths on their own: artipacked (19, checkouts not setting persist-credentials: false), excessive-permissions (3), secrets-inherit (2). Reasonable to accept as non-blocking for now and burn down separately — see PR description discussion.

🤖 Draft — not published for review yet.

Change the reusable Security Scan to a blocking gate that reports in the
run log / PR annotations instead of the Security tab:
- advanced-security: false + annotations: true (findings in logs)
- min-severity input (default high) fails the job on high findings only,
  so PRs are gated on serious issues without red-walling on hygiene noise
- drop continue-on-error and the now-unneeded security-events permission

Fix all 22 high findings so .github passes its own gate:
- template-injection (18): move ${{ inputs.* }} / ${{ github.* }} out of
  run: blocks into env: vars referenced as shell $VARS. Behavior-preserving.
- unsound-condition (4): nested ${{ }} inside an if: expression made the
  condition always true, defeating the guard. Rewrite as pure expressions
  (format() for the repo check; inputs.installer_oses != '').

Signed-off-by: Stephen Crowe <6042774+crowecawcaw@users.noreply.github.com>
@crowecawcaw
crowecawcaw marked this pull request as ready for review July 7, 2026 19:28
@crowecawcaw
crowecawcaw requested a review from a team as a code owner July 7, 2026 19:28
@crowecawcaw
crowecawcaw merged commit 4254820 into aws-deadline:mainline Jul 7, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants