-
Notifications
You must be signed in to change notification settings - Fork 176
ci: add zizmor scanning and fix workflow issues #1651
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
11b3db4
32e05b7
6f40c52
cf58509
6291ee3
3d135ef
64c1c18
49dd3b6
3ba24b1
223bf0e
e1618c1
c8fc0b0
a4eed15
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,8 @@ | ||
| name: Publish to NPM | ||
| on: | ||
| release: | ||
| # False positive: setup-node step doesn't use cache input | ||
| # zizmor: ignore[cache-poisoning] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pretty sure this workflow does use caching by default
https://github.com/actions/setup-node#usage
https://github.com/finos/git-proxy/actions/runs/31766562727/job/94663585798
|
||
| types: [published] | ||
| workflow_dispatch: | ||
| inputs: | ||
|
|
@@ -26,8 +28,10 @@ jobs: | |
| egress-policy: audit | ||
|
|
||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| persist-credentials: false | ||
| # Setup .npmrc file to publish to npm | ||
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v6 | ||
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | ||
| with: | ||
| node-version: '24' | ||
| registry-url: 'https://registry.npmjs.org' | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,8 @@ | |
| name: 'PR' | ||
|
|
||
| on: | ||
| # PR target used in accordance with README | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. specifying the README would be useful https://github.com/amannn/action-semantic-pull-request#event-triggers |
||
| # zizmor: ignore[dangerous-triggers] | ||
| pull_request_target: | ||
| types: | ||
| - opened | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,8 @@ name: Publish samples to NPM | |
| on: | ||
| push: | ||
| tags: | ||
| # False positive: setup-node step doesn't use cache input | ||
| # zizmor: ignore[cache-poisoning] | ||
|
Comment on lines
+6
to
+7
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same as npm.yml? |
||
| - 'sample-*' | ||
|
|
||
| permissions: | ||
|
|
@@ -17,8 +19,11 @@ jobs: | |
| with: | ||
| egress-policy: audit | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| # Setup .npmrc file to publish to npm | ||
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v6 | ||
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | ||
| with: | ||
| node-version: '24.x' | ||
| registry-url: 'https://registry.npmjs.org' | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| name: zizmor | ||
|
|
||
| # Static analysis of GitHub Actions workflows with zizmor | ||
| # (https://docs.zizmor.sh). Results are uploaded as SARIF to | ||
| # Code Scanning; findings do not fail the build. | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
| branches: [main] | ||
|
|
||
| permissions: {} | ||
|
|
||
| jobs: | ||
| zizmor: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| actions: read | ||
| contents: read | ||
| security-events: write # SARIF upload to Code Scanning | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Run zizmor | ||
| uses: zizmorcore/zizmor-action@192e21d79ab29983730a13d1382995c2307fbcaa # v0.5.7 | ||
| with: | ||
| min-severity: low | ||
| min-confidence: low |

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the workflow didn't need write access for PRs anyway or some prior capability was previously taken out?