build: add GitHub token permissions for workflows
Signed-off-by: Varun Sharma <varunsh@stepsecurity.io> PR-URL: https://github.com/nodejs/node/pull/43743 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
parent
feb3aa205b
commit
d6988ec9be
3
.github/workflows/authors.yml
vendored
3
.github/workflows/authors.yml
vendored
@ -6,6 +6,9 @@ on:
|
|||||||
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
authors_update:
|
authors_update:
|
||||||
if: github.repository == 'nodejs/node'
|
if: github.repository == 'nodejs/node'
|
||||||
|
8
.github/workflows/auto-start-ci.yml
vendored
8
.github/workflows/auto-start-ci.yml
vendored
@ -13,8 +13,13 @@ concurrency: ${{ github.workflow }}
|
|||||||
env:
|
env:
|
||||||
NODE_VERSION: lts/*
|
NODE_VERSION: lts/*
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
get-prs-for-ci:
|
get-prs-for-ci:
|
||||||
|
permissions:
|
||||||
|
pull-requests: read
|
||||||
if: github.repository == 'nodejs/node'
|
if: github.repository == 'nodejs/node'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
@ -32,6 +37,9 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
start-ci:
|
start-ci:
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pull-requests: write
|
||||||
needs: get-prs-for-ci
|
needs: get-prs-for-ci
|
||||||
if: needs.get-prs-for-ci.outputs.numbers != ''
|
if: needs.get-prs-for-ci.outputs.numbers != ''
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
3
.github/workflows/build-tarball.yml
vendored
3
.github/workflows/build-tarball.yml
vendored
@ -31,6 +31,9 @@ env:
|
|||||||
PYTHON_VERSION: '3.10'
|
PYTHON_VERSION: '3.10'
|
||||||
FLAKY_TESTS: dontcare
|
FLAKY_TESTS: dontcare
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-tarball:
|
build-tarball:
|
||||||
if: github.event.pull_request.draft == false
|
if: github.event.pull_request.draft == false
|
||||||
|
3
.github/workflows/build-windows.yml
vendored
3
.github/workflows/build-windows.yml
vendored
@ -26,6 +26,9 @@ env:
|
|||||||
PYTHON_VERSION: '3.10'
|
PYTHON_VERSION: '3.10'
|
||||||
FLAKY_TESTS: dontcare
|
FLAKY_TESTS: dontcare
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-windows:
|
build-windows:
|
||||||
if: github.event.pull_request.draft == false
|
if: github.event.pull_request.draft == false
|
||||||
|
@ -28,8 +28,14 @@ env:
|
|||||||
[feature request management document](https://github.com/nodejs/node/blob/HEAD/doc/contributing/feature-request-management.md).
|
[feature request management document](https://github.com/nodejs/node/blob/HEAD/doc/contributing/feature-request-management.md).
|
||||||
# yamllint enable
|
# yamllint enable
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
stale:
|
stale:
|
||||||
|
permissions:
|
||||||
|
issues: write # for actions/stale to close stale issues
|
||||||
|
pull-requests: write # for actions/stale to close stale PRs
|
||||||
if: github.repository == 'nodejs/node'
|
if: github.repository == 'nodejs/node'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
6
.github/workflows/close-stalled.yml
vendored
6
.github/workflows/close-stalled.yml
vendored
@ -9,8 +9,14 @@ env:
|
|||||||
is still relevant, or to ping the collaborator who labelled it stalled if
|
is still relevant, or to ping the collaborator who labelled it stalled if
|
||||||
you have any questions.
|
you have any questions.
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
stale:
|
stale:
|
||||||
|
permissions:
|
||||||
|
issues: write # for actions/stale to close stale issues
|
||||||
|
pull-requests: write # for actions/stale to close stale PRs
|
||||||
if: github.repository == 'nodejs/node'
|
if: github.repository == 'nodejs/node'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
8
.github/workflows/comment-labeled.yml
vendored
8
.github/workflows/comment-labeled.yml
vendored
@ -11,8 +11,14 @@ env:
|
|||||||
If it should remain open, please leave a comment explaining why it should remain open.
|
If it should remain open, please leave a comment explaining why it should remain open.
|
||||||
FAST_TRACK_MESSAGE: Fast-track has been requested by @${{ github.actor }}. Please 👍 to approve.
|
FAST_TRACK_MESSAGE: Fast-track has been requested by @${{ github.actor }}. Please 👍 to approve.
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
stale-comment:
|
stale-comment:
|
||||||
|
permissions:
|
||||||
|
issues: write
|
||||||
|
pull-requests: write
|
||||||
if: github.repository == 'nodejs/node' && github.event.label.name == 'stalled'
|
if: github.repository == 'nodejs/node' && github.event.label.name == 'stalled'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@ -23,6 +29,8 @@ jobs:
|
|||||||
run: gh issue comment "$NUMBER" --repo ${{ github.repository }} --body "$STALE_MESSAGE"
|
run: gh issue comment "$NUMBER" --repo ${{ github.repository }} --body "$STALE_MESSAGE"
|
||||||
|
|
||||||
fast-track:
|
fast-track:
|
||||||
|
permissions:
|
||||||
|
pull-requests: write
|
||||||
if: github.repository == 'nodejs/node' && github.event_name == 'pull_request_target' && github.event.label.name == 'fast-track'
|
if: github.repository == 'nodejs/node' && github.event_name == 'pull_request_target' && github.event.label.name == 'fast-track'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
3
.github/workflows/commit-lint.yml
vendored
3
.github/workflows/commit-lint.yml
vendored
@ -5,6 +5,9 @@ on: [pull_request]
|
|||||||
env:
|
env:
|
||||||
NODE_VERSION: lts/*
|
NODE_VERSION: lts/*
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint-commit-message:
|
lint-commit-message:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
5
.github/workflows/commit-queue.yml
vendored
5
.github/workflows/commit-queue.yml
vendored
@ -18,8 +18,13 @@ concurrency: ${{ github.workflow }}
|
|||||||
env:
|
env:
|
||||||
NODE_VERSION: lts/*
|
NODE_VERSION: lts/*
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
get_mergeable_prs:
|
get_mergeable_prs:
|
||||||
|
permissions:
|
||||||
|
pull-requests: read
|
||||||
if: github.repository == 'nodejs/node'
|
if: github.repository == 'nodejs/node'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
|
3
.github/workflows/coverage-linux.yml
vendored
3
.github/workflows/coverage-linux.yml
vendored
@ -29,6 +29,9 @@ env:
|
|||||||
PYTHON_VERSION: '3.10'
|
PYTHON_VERSION: '3.10'
|
||||||
FLAKY_TESTS: dontcare
|
FLAKY_TESTS: dontcare
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
coverage-linux:
|
coverage-linux:
|
||||||
if: github.event.pull_request.draft == false
|
if: github.event.pull_request.draft == false
|
||||||
|
3
.github/workflows/coverage-windows.yml
vendored
3
.github/workflows/coverage-windows.yml
vendored
@ -31,6 +31,9 @@ env:
|
|||||||
PYTHON_VERSION: '3.10'
|
PYTHON_VERSION: '3.10'
|
||||||
FLAKY_TESTS: dontcare
|
FLAKY_TESTS: dontcare
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
coverage-windows:
|
coverage-windows:
|
||||||
if: github.event.pull_request.draft == false
|
if: github.event.pull_request.draft == false
|
||||||
|
3
.github/workflows/daily.yml
vendored
3
.github/workflows/daily.yml
vendored
@ -8,6 +8,9 @@ on:
|
|||||||
env:
|
env:
|
||||||
NODE_VERSION: lts/*
|
NODE_VERSION: lts/*
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-lto:
|
build-lto:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
3
.github/workflows/doc.yml
vendored
3
.github/workflows/doc.yml
vendored
@ -16,6 +16,9 @@ concurrency:
|
|||||||
env:
|
env:
|
||||||
NODE_VERSION: lts/*
|
NODE_VERSION: lts/*
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-docs:
|
build-docs:
|
||||||
if: github.event.pull_request.draft == false
|
if: github.event.pull_request.draft == false
|
||||||
|
@ -10,6 +10,9 @@ on:
|
|||||||
env:
|
env:
|
||||||
NODE_VERSION: lts/*
|
NODE_VERSION: lts/*
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
find:
|
find:
|
||||||
if: github.repository == 'nodejs/node'
|
if: github.repository == 'nodejs/node'
|
||||||
|
3
.github/workflows/find-inactive-tsc.yml
vendored
3
.github/workflows/find-inactive-tsc.yml
vendored
@ -10,6 +10,9 @@ on:
|
|||||||
env:
|
env:
|
||||||
NODE_VERSION: lts/*
|
NODE_VERSION: lts/*
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
find:
|
find:
|
||||||
if: github.repository == 'nodejs/node'
|
if: github.repository == 'nodejs/node'
|
||||||
|
3
.github/workflows/label-pr.yml
vendored
3
.github/workflows/label-pr.yml
vendored
@ -4,6 +4,9 @@ on:
|
|||||||
pull_request_target:
|
pull_request_target:
|
||||||
types: [opened]
|
types: [opened]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
label:
|
label:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
6
.github/workflows/license-builder.yml
vendored
6
.github/workflows/license-builder.yml
vendored
@ -6,8 +6,14 @@ on:
|
|||||||
- cron: 0 0 * * 1
|
- cron: 0 0 * * 1
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
update_license:
|
update_license:
|
||||||
|
permissions:
|
||||||
|
contents: write # for gr2m/create-or-update-pull-request-action to push local changes
|
||||||
|
pull-requests: write # for gr2m/create-or-update-pull-request-action to create a PR
|
||||||
if: github.repository == 'nodejs/node'
|
if: github.repository == 'nodejs/node'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
3
.github/workflows/linters.yml
vendored
3
.github/workflows/linters.yml
vendored
@ -17,6 +17,9 @@ env:
|
|||||||
PYTHON_VERSION: '3.10'
|
PYTHON_VERSION: '3.10'
|
||||||
NODE_VERSION: lts/*
|
NODE_VERSION: lts/*
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint-addon-docs:
|
lint-addon-docs:
|
||||||
if: github.event.pull_request.draft == false
|
if: github.event.pull_request.draft == false
|
||||||
|
3
.github/workflows/notify-force-push.yml
vendored
3
.github/workflows/notify-force-push.yml
vendored
@ -4,6 +4,9 @@ on:
|
|||||||
- main
|
- main
|
||||||
|
|
||||||
name: Notify on Force Push
|
name: Notify on Force Push
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
slackNotification:
|
slackNotification:
|
||||||
name: Slack Notification
|
name: Slack Notification
|
||||||
|
3
.github/workflows/test-asan.yml
vendored
3
.github/workflows/test-asan.yml
vendored
@ -33,6 +33,9 @@ env:
|
|||||||
PYTHON_VERSION: '3.10'
|
PYTHON_VERSION: '3.10'
|
||||||
FLAKY_TESTS: dontcare
|
FLAKY_TESTS: dontcare
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test-asan:
|
test-asan:
|
||||||
if: github.event.pull_request.draft == false
|
if: github.event.pull_request.draft == false
|
||||||
|
3
.github/workflows/test-internet.yml
vendored
3
.github/workflows/test-internet.yml
vendored
@ -24,6 +24,9 @@ env:
|
|||||||
PYTHON_VERSION: '3.10'
|
PYTHON_VERSION: '3.10'
|
||||||
FLAKY_TESTS: dontcare
|
FLAKY_TESTS: dontcare
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test-internet:
|
test-internet:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
3
.github/workflows/test-linux.yml
vendored
3
.github/workflows/test-linux.yml
vendored
@ -26,6 +26,9 @@ env:
|
|||||||
PYTHON_VERSION: '3.10'
|
PYTHON_VERSION: '3.10'
|
||||||
FLAKY_TESTS: dontcare
|
FLAKY_TESTS: dontcare
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test-linux:
|
test-linux:
|
||||||
if: github.event.pull_request.draft == false
|
if: github.event.pull_request.draft == false
|
||||||
|
3
.github/workflows/test-macos.yml
vendored
3
.github/workflows/test-macos.yml
vendored
@ -32,6 +32,9 @@ env:
|
|||||||
PYTHON_VERSION: '3.10'
|
PYTHON_VERSION: '3.10'
|
||||||
FLAKY_TESTS: dontcare
|
FLAKY_TESTS: dontcare
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test-macOS:
|
test-macOS:
|
||||||
if: github.event.pull_request.draft == false
|
if: github.event.pull_request.draft == false
|
||||||
|
3
.github/workflows/tools.yml
vendored
3
.github/workflows/tools.yml
vendored
@ -6,6 +6,9 @@ on:
|
|||||||
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
tools-deps-update:
|
tools-deps-update:
|
||||||
if: github.repository == 'nodejs/node'
|
if: github.repository == 'nodejs/node'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user