mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-08 03:50:35 +00:00
fix(ci): replace broad permissions with specific scopes in workflows
Replace read-all/write-all with minimum required permission scopes across all GitHub Actions workflows to follow the principle of least privilege (SonarCloud rule githubactions:S8234).
This commit is contained in:
6
.github/workflows/changelog.yml
vendored
6
.github/workflows/changelog.yml
vendored
@@ -9,13 +9,15 @@ concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions: read-all
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
debug-changelog:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions: write-all
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
|
||||
3
.github/workflows/linters.yml
vendored
3
.github/workflows/linters.yml
vendored
@@ -11,7 +11,8 @@ concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions: read-all
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
Linter:
|
||||
|
||||
6
.github/workflows/new-release.yml
vendored
6
.github/workflows/new-release.yml
vendored
@@ -11,13 +11,15 @@ concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions: read-all
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
new-daily-release:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions: write-all
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
outputs:
|
||||
created: ${{ steps.daily-version.outputs.created }}
|
||||
|
||||
3
.github/workflows/pre-commit-autoupdate.yml
vendored
3
.github/workflows/pre-commit-autoupdate.yml
vendored
@@ -12,7 +12,8 @@ concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions: read-all
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
auto-update:
|
||||
|
||||
3
.github/workflows/semantic-pr.yml
vendored
3
.github/workflows/semantic-pr.yml
vendored
@@ -14,7 +14,8 @@ concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions: read-all
|
||||
permissions:
|
||||
pull-requests: read
|
||||
|
||||
jobs:
|
||||
semantic-pr:
|
||||
|
||||
3
.github/workflows/sync-labels.yml
vendored
3
.github/workflows/sync-labels.yml
vendored
@@ -19,7 +19,8 @@ concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions: read-all
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
SyncLabels:
|
||||
|
||||
6
.github/workflows/update-submodules.yml
vendored
6
.github/workflows/update-submodules.yml
vendored
@@ -12,13 +12,15 @@ concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions: read-all
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
update-submodules:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions: write-all
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
|
||||
Reference in New Issue
Block a user