Skip to content

Commit

Permalink
ci: fix overly broad permissions reported by zizmor (#8611)
Browse files Browse the repository at this point in the history
  • Loading branch information
Boshen authored Jan 20, 2025
1 parent 11f33af commit a78a72f
Show file tree
Hide file tree
Showing 25 changed files with 57 additions and 12 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: autofix.ci # For security reasons, the workflow in which the autofix.ci action is used must be named "autofix.ci".

permissions: {}

on:
pull_request:
types: [opened, synchronize]
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

name: Benchmark

permissions: {}

on:
workflow_dispatch:
pull_request:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/bloat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

name: Cargo Bloat

permissions: {}

on:
workflow_dispatch:

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cargo_llvm_lines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

name: Cargo LLVM Lines

permissions: {}

on:
workflow_dispatch:

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: CI

permissions: {}

on:
workflow_dispatch:
pull_request:
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/ci_security.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: GitHub Actions Security Analysis

permissions: {}

on:
workflow_dispatch:
pull_request:
Expand All @@ -20,10 +22,7 @@ jobs:
permissions:
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
persist-credentials: false
- uses: taiki-e/checkout-action@b13d20b7cda4e2f325ef19895128f7ff735c0b3d # v1.3.1

- uses: taiki-e/install-action@a7adeb15af2926b0ac7478ad165047cd2d8ba350 # v2.47.18
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci_vscode.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: CI VSCode

permissions: {}

on:
workflow_dispatch:
pull_request:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

name: Code Coverage

permissions: {}

on:
workflow_dispatch:
push:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/deny.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Cargo Deny

permissions: {}

on:
workflow_dispatch:
pull_request:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/link_check.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Check Links

permissions: {}

on:
workflow_dispatch:
push:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/lint_rules.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Update implementation status of all linter plugins

permissions: {}

on:
push:
branches:
Expand All @@ -13,6 +15,9 @@ on:
jobs:
lint_rules:
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
steps:
- name: Checkout Branch
uses: taiki-e/checkout-action@b13d20b7cda4e2f325ef19895128f7ff735c0b3d # v1.3.1
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/miri.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Miri

permissions: {}

on:
workflow_dispatch:
pull_request:
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Check PR

permissions: {}

on:
pull_request_target: # zizmor: ignore[dangerous-triggers]
types:
Expand Down Expand Up @@ -27,12 +29,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
requireScope: true
disallowScopes: |
build
chore
ci
release
revert
types: |
build
chore
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/prepare_release_crates.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Prepare Release Crates

permissions: {}

on:
workflow_dispatch:

Expand Down Expand Up @@ -33,6 +35,9 @@ jobs:
needs: prepare
name: Trigger Monitor Oxc
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: taiki-e/checkout-action@b13d20b7cda4e2f325ef19895128f7ff735c0b3d # v1.3.1

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/prepare_release_oxlint.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Prepare Release Oxlint

permissions: {}

on:
workflow_dispatch:
push:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release_crates.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Release Crates

permissions: {}

on:
workflow_dispatch:
push:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release_napi_minify.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Release NAPI Minify

permissions: {}

on:
push:
branches:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release_napi_parser.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Release NAPI Parser

permissions: {}

on:
push:
branches:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release_napi_transform.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Release NAPI Transform

permissions: {}

on:
push:
branches:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release_oxlint.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Release Oxlint

permissions: {}

on:
workflow_dispatch:
push:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release_types.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Release @oxc-project/types

permissions: {}

on:
workflow_dispatch:
push:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release_vscode.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Reference: https://github.com/biomejs/biome/blob/main/.github/workflows/release_lsp.yml

name: Release VSCode

permissions: {}

on:
push:
branches:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release_wasm.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Release WASM

permissions: {}

on:
workflow_dispatch:
push:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/reusable_prepare_release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Prepare Release

permissions: {}

on:
workflow_call:
inputs:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/reusable_release_napi.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Release NAPI

permissions: {}

on:
workflow_call:
inputs:
Expand Down

0 comments on commit a78a72f

Please sign in to comment.