Skip to content

Commit 948a0cd

Browse files
blarghmateyclaude
andauthored
Add zizmor GitHub Actions static analysis (#78)
* Add zizmor GitHub Actions static analysis Also applies zizmor --fix=all to existing workflows: pins previously unpinned/mutable action refs to commit SHAs and adds persist-credentials: false to checkout steps, clearing every pre-existing high-severity finding. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * fix(ci): add back pull_request trigger for zizmor workflow, scope push to master Bot reviewers (Copilot, Sentry) correctly flagged that a push-only trigger misses fork-based PRs and can't act as a required merge-gate status check. Scoping push to the default branch avoids the original double-run problem (push firing on every commit to a same-repo PR branch, redundant with pull_request) while restoring PR-gate coverage. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * fix(ci): lower zizmor gate to min-severity=medium, fix resulting findings - ci.yml: add `permissions: contents: read` to javascript-tests job (checkout, yarn install, lint, test, rollup build only, no writes needed) - actions-static-analysis.yml: lower zizmor gate from min-severity=high to min-severity=medium now that the excessive-permissions finding above is fixed Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
1 parent 03bfb6d commit 948a0cd

2 files changed

Lines changed: 40 additions & 2 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: GitHub Actions Static Analysis
2+
3+
on:
4+
push:
5+
branches:
6+
- "master"
7+
paths:
8+
- ".github/workflows/**"
9+
pull_request:
10+
paths:
11+
- ".github/workflows/**"
12+
13+
permissions: {}
14+
15+
jobs:
16+
zizmor:
17+
name: Run zizmor
18+
runs-on: ubuntu-latest
19+
permissions:
20+
contents: read
21+
actions: read
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
25+
with:
26+
persist-credentials: false
27+
28+
- name: Run zizmor 🌈
29+
uses: zizmorcore/zizmor-action@3dc1ecc9bcb9e94e9b2c709687979e1298497054 # v0.6.2
30+
with:
31+
inputs: ".github/workflows/"
32+
min-severity: medium
33+
min-confidence: medium
34+
advanced-security: false

.github/workflows/ci.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@ on: [push]
33
jobs:
44
javascript-tests:
55
runs-on: ubuntu-latest
6+
permissions:
7+
contents: read
68
steps:
7-
- uses: actions/checkout@v2
9+
- uses: actions/checkout@0717577d45739eb3c851188b29f50ed6c0b2194e # v2.8.0
10+
with:
11+
persist-credentials: false
812

913
- name: Set up NodeJS
10-
uses: actions/setup-node@v2-beta
14+
uses: actions/setup-node@27082cecf3ff7a1742dbd5e12605f0cb59dce2d9 # v2.1.3 (resolved from v2-beta tag)
1115
with:
1216
node-version: 16.20.2
1317

0 commit comments

Comments
 (0)