Skip to content

Commit b14bb69

Browse files
authored
ci: add Security Scan stub (zizmor via reusable org workflow) (aws-deadline#252)
* ci: fix all high-severity zizmor findings in workflows Suppress 2 high-severity zizmor dangerous-triggers findings that are intentional design: - dangerous-triggers (2): claude_pr_review.yml and on_opened_pr.yml both use workflow_run, which runs from the default branch with this repo's context (never a fork's copy). Fork PRs cannot alter behavior or access secrets, so the trigger is safe here. Added inline # zizmor: ignore[dangerous-triggers] with justification. No unpinned-uses findings: all uses: refs are internal aws-deadline/*@mainline reusable workflows, allowed as ref-pin by the central config. Signed-off-by: Stephen Crowe <6042774+crowecawcaw@users.noreply.github.com> * ci: add Security Scan stub calling the reusable org workflow Adds .github/workflows/security_scan.yml, a thin stub that calls the central reusable_security_scan.yml in aws-deadline/.github@mainline. Gates PRs on high-severity zizmor findings; new central checks apply automatically with no per-repo change. Signed-off-by: Stephen Crowe <6042774+crowecawcaw@users.noreply.github.com> --------- Signed-off-by: Stephen Crowe <6042774+crowecawcaw@users.noreply.github.com>
1 parent d7684df commit b14bb69

3 files changed

Lines changed: 26 additions & 2 deletions

File tree

.github/workflows/claude_pr_review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# workflow_run identifiers and the role-ARN secret.
1212
name: Claude PR Review
1313

14-
on:
14+
on: # zizmor: ignore[dangerous-triggers] -- workflow_run is intentional and safe here; see the header comment above (runs from default branch, fork PRs cannot alter behavior/secrets)
1515
workflow_run:
1616
workflows: ["Claude PR Review (collect)"]
1717
types:

.github/workflows/on_opened_pr.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: On Opened PR
22

3-
on:
3+
on: # zizmor: ignore[dangerous-triggers]
4+
# workflow_run is intentional: it runs from the default branch with this
5+
# repo's context (never a fork's copy), and only consumes the PR artifact via
6+
# the reusable extract-PR-details workflow. A fork PR cannot alter behavior.
47
workflow_run:
58
workflows: ["Record PR"]
69
types:
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: "Security Scan"
2+
3+
on:
4+
push:
5+
branches: [ "mainline", "feature_*", "patch_*" ]
6+
pull_request:
7+
branches: [ "mainline", "feature_*", "patch_*" ]
8+
schedule:
9+
- cron: '0 8 * * MON'
10+
11+
jobs:
12+
Scan:
13+
name: Scan
14+
# Central, extensible security-scan workflow (currently zizmor). New checks
15+
# added there apply here automatically — no change needed to this stub.
16+
uses: aws-deadline/.github/.github/workflows/reusable_security_scan.yml@mainline
17+
permissions:
18+
# The reusable workflow checks out this repo and fetches the central
19+
# zizmor config, and reports findings to the run log / PR annotations
20+
# (not the Security tab), so it only needs read access.
21+
contents: read

0 commit comments

Comments
 (0)