Skip to content

Commit

Permalink
ci: apply zizmor suggestions (#1067)
Browse files Browse the repository at this point in the history
  • Loading branch information
antongolub authored Jan 7, 2025
1 parent 73347ac commit 3798607
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 12 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/dev-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jobs:
id-token: write
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version: 22
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,16 @@ on:
release:
types: [created]

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: 'pages'
cancel-in-progress: false

jobs:
deploy:
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand All @@ -23,6 +22,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
ref: main
- name: Setup Pages
uses: actions/configure-pages@v3
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
id-token: write
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version: 22
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/osv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,12 @@ on:
push:
branches: ['main']

permissions:
# Require writing security events to upload SARIF file to security tab
security-events: write
# Read commit contents
contents: read

jobs:
scan-scheduled:
if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }}
permissions:
security-events: write
contents: read
uses: 'google/osv-scanner-action/.github/workflows/osv-scanner-reusable.yml@1f1242919d8a60496dd1874b24b62b2370ed4c78' # v1.7.1
with:
# Example of specifying custom arguments
Expand All @@ -39,6 +36,9 @@ jobs:
./
scan-pr:
if: ${{ github.event_name == 'pull_request' || github.event_name == 'merge_group' }}
permissions:
security-events: write
contents: read
uses: 'google/osv-scanner-action/.github/workflows/osv-scanner-reusable-pr.yml@1f1242919d8a60496dd1874b24b62b2370ed4c78' # v1.7.1
with:
# Example of specifying custom arguments
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Use Node.js 22.x
uses: actions/setup-node@v4
Expand All @@ -39,6 +41,8 @@ jobs:
FORCE_COLOR: 3
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Use Node.js 22.x
uses: actions/setup-node@v4
Expand Down Expand Up @@ -73,6 +77,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Use Node.js 22.x
uses: actions/setup-node@v4
Expand All @@ -96,6 +102,9 @@ jobs:
needs: build
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Use Node.js 16.x
uses: actions/setup-node@v4
with:
Expand All @@ -115,6 +124,9 @@ jobs:
needs: build
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup Bun
uses: antongolub/action-setup-bun@v1
- uses: actions/download-artifact@v4
Expand All @@ -135,6 +147,8 @@ jobs:
deno-version: [v1.x, v2.x]
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup Deno
uses: denoland/setup-deno@v2
with:
Expand All @@ -156,6 +170,8 @@ jobs:
node-version: [12, 14, 16, 18, 20, 22, 22-nightly, 23]
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
Expand All @@ -179,6 +195,8 @@ jobs:
ts: [4, 5, rc]
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Use Node.js 22.x
uses: actions/setup-node@v4
with:
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@
"test:smoke:win32": "node ./test/smoke/win32.test.js",
"test:smoke:cjs": "node ./test/smoke/node.test.cjs",
"test:smoke:mjs": "node ./test/smoke/node.test.mjs",
"test:smoke:deno": "deno test ./test/smoke/deno.test.js --allow-read --allow-sys --allow-env --allow-run"
"test:smoke:deno": "deno test ./test/smoke/deno.test.js --allow-read --allow-sys --allow-env --allow-run",
"test:workflow": "zizmor .github/workflows -v -p"
},
"optionalDependencies": {
"@types/fs-extra": ">=11",
Expand Down

0 comments on commit 3798607

Please sign in to comment.