mirror of
https://github.com/nvm-sh/nvm.git
synced 2026-06-05 22:07:09 +08:00
[actions] set per-job permissions in the nvm install workflow
CodeQL (actions/missing-workflow-permissions) flagged the matrix, test, and finisher jobs of nvm-install-test.yml for not declaring permissions. Every other test workflow already sets least-privilege permissions per job; add them here to match: `contents: read` for the matrix and test jobs, `contents: none` for the no-op finisher.
This commit is contained in:
6
.github/workflows/nvm-install-test.yml
vendored
6
.github/workflows/nvm-install-test.yml
vendored
@@ -15,6 +15,8 @@ permissions:
|
||||
|
||||
jobs:
|
||||
matrix:
|
||||
permissions:
|
||||
contents: read
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
matrix: ${{ steps.matrix.outputs.matrix }}
|
||||
@@ -43,6 +45,8 @@ jobs:
|
||||
fi
|
||||
|
||||
test:
|
||||
permissions:
|
||||
contents: read
|
||||
needs: [matrix]
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: ${{ matrix.ref == 'v0.40.0' }} # https://github.com/nvm-sh/nvm/issues/3405
|
||||
@@ -101,6 +105,8 @@ jobs:
|
||||
fi
|
||||
|
||||
finisher:
|
||||
permissions:
|
||||
contents: none
|
||||
runs-on: ubuntu-latest
|
||||
needs: [test]
|
||||
steps:
|
||||
|
||||
Reference in New Issue
Block a user