ci: mimic the "restricted" mode

Judging by https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token
it should be enough to grant the "read contents" permission to
most of our actions. The "read metadata" permission is set impliciclty
somewhere and can't be set via the "permissions" setting:
```
The workflow is not valid. .github/workflows/linter.yml (Line: 14, Col: 3): Unexpected value 'metadata'
```
This commit is contained in:
Evgeny Vereshchagin 2021-11-13 22:34:04 +00:00 committed by Frantisek Sumsal
parent 10b1c3cd24
commit e7a966915d
6 changed files with 12 additions and 6 deletions

View file

@ -12,7 +12,8 @@ on:
- 'src/**'
- 'test/fuzz/**'
permissions: read-all
permissions:
contents: read
jobs:
build:

View file

@ -5,7 +5,8 @@
name: CIFuzz
permissions: read-all
permissions:
contents: read
on:
pull_request:

View file

@ -9,7 +9,8 @@ on:
# Run Coverity daily at midnight
- cron: '0 0 * * *'
permissions: read-all
permissions:
contents: read
jobs:
build:

View file

@ -10,7 +10,8 @@ on:
- main
- v[0-9]+-stable
permissions: read-all
permissions:
contents: read
jobs:
build:

View file

@ -14,7 +14,8 @@ on:
- main
- v[0-9]+-stable
permissions: read-all
permissions:
contents: read
jobs:
ci:

View file

@ -9,7 +9,8 @@ on:
- main
- v[0-9]+-stable
permissions: read-all
permissions:
contents: read
jobs:
build: