mirror of
https://github.com/neovim/neovim.git
synced 2026-03-28 03:12:00 +00:00
ci: set default permissions for workflows
The default workflow permissions are overly broad; setting permissions explicitly at the workflow level ensures excessive permissions are not unintentionally granted to jobs. For details, see: https://docs.zizmor.sh/audits/#excessive-permissions
This commit is contained in:
3
.github/workflows/backport.yml
vendored
3
.github/workflows/backport.yml
vendored
@@ -2,6 +2,9 @@ name: backport
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [closed, labeled]
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
backport:
|
||||
permissions:
|
||||
|
||||
3
.github/workflows/build.yml
vendored
3
.github/workflows/build.yml
vendored
@@ -12,6 +12,9 @@ on:
|
||||
- '.github/**'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
2
.github/workflows/build_dummy.yml
vendored
2
.github/workflows/build_dummy.yml
vendored
@@ -14,6 +14,8 @@ on:
|
||||
- 'cmake.*/**'
|
||||
- '.github/**'
|
||||
|
||||
permissions: {}
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
2
.github/workflows/codeql.yml
vendored
2
.github/workflows/codeql.yml
vendored
@@ -12,6 +12,8 @@ on:
|
||||
branches: [ "master" ]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
|
||||
3
.github/workflows/coverity.yml
vendored
3
.github/workflows/coverity.yml
vendored
@@ -4,6 +4,9 @@ on:
|
||||
- cron: '10 0 * * *' # Run every day at 00:10
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
scan:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
3
.github/workflows/docs.yml
vendored
3
.github/workflows/docs.yml
vendored
@@ -2,6 +2,9 @@ name: docs
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, ready_for_review]
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
docs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
3
.github/workflows/labeler_issue.yml
vendored
3
.github/workflows/labeler_issue.yml
vendored
@@ -2,6 +2,9 @@ name: "labeler: issue"
|
||||
on:
|
||||
issues:
|
||||
types: [opened]
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
labeler:
|
||||
permissions:
|
||||
|
||||
3
.github/workflows/labeler_pr.yml
vendored
3
.github/workflows/labeler_pr.yml
vendored
@@ -2,6 +2,9 @@ name: "labeler: PR"
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened]
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
changed-files:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
4
.github/workflows/lintcommit.yml
vendored
4
.github/workflows/lintcommit.yml
vendored
@@ -4,6 +4,10 @@ on:
|
||||
types: [opened, synchronize, reopened, ready_for_review]
|
||||
branches:
|
||||
- 'master'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
lint-commits:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
3
.github/workflows/lintcommit_dummy.yml
vendored
3
.github/workflows/lintcommit_dummy.yml
vendored
@@ -8,6 +8,9 @@ on:
|
||||
types: [opened, synchronize, reopened, ready_for_review]
|
||||
branches:
|
||||
- 'release-[0-9]+.[0-9]+'
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
lint-commits:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
2
.github/workflows/lintdocurls.yml
vendored
2
.github/workflows/lintdocurls.yml
vendored
@@ -4,6 +4,8 @@ on:
|
||||
- cron: '22 22 * * 5'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
check-unreachable-urls:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
4
.github/workflows/news.yml
vendored
4
.github/workflows/news.yml
vendored
@@ -4,6 +4,10 @@ on:
|
||||
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]
|
||||
branches:
|
||||
- 'master'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
3
.github/workflows/optional.yml
vendored
3
.github/workflows/optional.yml
vendored
@@ -4,6 +4,9 @@ on:
|
||||
types: [labeled, opened, synchronize, reopened]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
3
.github/workflows/release.yml
vendored
3
.github/workflows/release.yml
vendored
@@ -12,6 +12,9 @@ on:
|
||||
tags:
|
||||
- v[0-9]+.[0-9]+.[0-9]+
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
# Build on the oldest supported images, so we have broader compatibility
|
||||
jobs:
|
||||
setup:
|
||||
|
||||
2
.github/workflows/response.yml
vendored
2
.github/workflows/response.yml
vendored
@@ -5,6 +5,8 @@ on:
|
||||
workflow_dispatch:
|
||||
issue_comment:
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
close:
|
||||
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
|
||||
|
||||
3
.github/workflows/reviewers_add.yml
vendored
3
.github/workflows/reviewers_add.yml
vendored
@@ -3,6 +3,9 @@ on:
|
||||
pull_request_target:
|
||||
types: [labeled, ready_for_review, reopened]
|
||||
workflow_call:
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
request-reviewer:
|
||||
if: github.event.pull_request.state == 'open' && github.event.pull_request.draft == false && !endsWith(github.actor, '[bot]')
|
||||
|
||||
3
.github/workflows/reviewers_remove.yml
vendored
3
.github/workflows/reviewers_remove.yml
vendored
@@ -2,6 +2,9 @@ name: "reviewers: remove"
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [converted_to_draft, closed]
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
remove-reviewers:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
3
.github/workflows/test.yml
vendored
3
.github/workflows/test.yml
vendored
@@ -10,6 +10,9 @@ on:
|
||||
- 'release-[0-9]+.[0-9]+'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
3
.github/workflows/test_windows.yml
vendored
3
.github/workflows/test_windows.yml
vendored
@@ -9,6 +9,9 @@ on:
|
||||
type: number
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
windows:
|
||||
runs-on: windows-2025
|
||||
|
||||
2
.github/workflows/vim_patches.yml
vendored
2
.github/workflows/vim_patches.yml
vendored
@@ -4,6 +4,8 @@ on:
|
||||
- cron: '3 3 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
update-vim-patches:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
Reference in New Issue
Block a user