-
Notifications
You must be signed in to change notification settings - Fork 45
ci: update egress policies, apply zizmor recommendations #792
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
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 |
|---|---|---|
|
|
@@ -12,8 +12,6 @@ on: | |
|
|
||
| permissions: | ||
| contents: read | ||
| # For npm OIDC (https://docs.npmjs.com/trusted-publishers) | ||
| id-token: write | ||
|
|
||
| env: | ||
| COMMIT_SHA: ${{ github.sha }} | ||
|
|
@@ -28,7 +26,10 @@ jobs: | |
| - name: Harden Runner | ||
| uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0 | ||
| with: | ||
| egress-policy: audit | ||
| egress-policy: block | ||
| allowed-endpoints: > | ||
| github.com:443 | ||
| api.github.com:443 | ||
|
|
||
| - name: Verify commit authenticity | ||
| env: | ||
|
|
@@ -58,6 +59,7 @@ jobs: | |
| - name: Checkout repository | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| persist-credentials: false | ||
| fetch-depth: 2 # Need at least 2 commits to detect changes between commits | ||
|
|
||
| - name: Check if we should publish | ||
|
|
@@ -75,6 +77,9 @@ jobs: | |
| needs: prepare | ||
| runs-on: ubuntu-latest | ||
| if: needs.prepare.outputs.should_publish == 'true' | ||
| permissions: | ||
| # For npm OIDC (https://docs.npmjs.com/trusted-publishers) | ||
| id-token: write | ||
|
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. Publish job loses
|
||
| steps: | ||
| - uses: nodejs/web-team/actions/setup-environment@9f3c83af227d721768d9dbb63009a47ed4f4282f | ||
| with: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| name: GitHub Actions Security Analysis with zizmor 🌈 | ||
|
|
||
| on: | ||
| push: | ||
| branches: main | ||
| pull_request: | ||
| branches: main | ||
|
|
||
| permissions: {} | ||
|
|
||
| jobs: | ||
| zizmor: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| security-events: write | ||
| contents: read | ||
| actions: read | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Run zizmor 🌈 | ||
| uses: zizmorcore/zizmor-action@b1d7e1fb5de872772f31590499237e7cce841e8e # v0.5.3 |


Uh oh!
There was an error while loading. Please reload this page.