Add explicit permissions to CI workflow
Set minimal `contents: read` permission following the principle of least privilege. This prevents using overly permissive repository defaults.
This commit is contained in:
parent
fd1d7a61ec
commit
e484029d53
1 changed files with 6 additions and 0 deletions
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
|
|
@ -4,6 +4,8 @@ on: [push, pull_request]
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
entry:
|
entry:
|
||||||
|
|
@ -27,6 +29,8 @@ jobs:
|
||||||
|
|
||||||
rubocop:
|
rubocop:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
name: RuboCop
|
name: RuboCop
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
|
|
@ -38,6 +42,8 @@ jobs:
|
||||||
|
|
||||||
yard:
|
yard:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
name: YARD Documentation
|
name: YARD Documentation
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue