Set permissions for GitHub actions (#7984)

This limits the damage that a compromised GitHub action could do.

See https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions
https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
This commit is contained in:
Naveen 2022-03-24 11:32:57 -05:00 committed by GitHub
parent 8d04565394
commit f4a7ba967e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 0 deletions

View file

@ -1,6 +1,9 @@
name: commit-validation
on: [ push, pull_request ]
permissions:
contents: read
jobs:
check-commit-msg-length:
runs-on: ubuntu-latest

View file

@ -26,6 +26,9 @@ on:
- 'test/tables/planets.jats_archiving'
- 'test/tables/students.jats_archiving'
permissions:
contents: read
jobs:
jats:
name: JATS

View file

@ -14,6 +14,9 @@ on:
- stack.yaml
- .travis.yml
permissions:
contents: read
jobs:
lint:
name: Lint

View file

@ -5,6 +5,9 @@ on:
branches:
- 'rc/**'
permissions:
contents: read
jobs:
linux: