Skip to content

Commit

Permalink
ci: define minimal permissions to github workflows (#1295)
Browse files Browse the repository at this point in the history
Signed-off-by: Diogo Teles Sant'Anna <diogoteles@google.com>
  • Loading branch information
diogoteles08 committed Jun 19, 2023
1 parent f6bb79e commit 553eb4c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/codeql-analysis.yml
Expand Up @@ -20,6 +20,10 @@ on:
schedule:
- cron: '31 21 * * 6'

# Minimal permissions to be inherited by any job that don't declare it's own permissions
permissions:
contents: read

jobs:
analyze:
name: Analyze
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/go.yml
Expand Up @@ -7,6 +7,10 @@ on:
- main
- 'release-*'

# Minimal permissions to be inherited by any job that don't declare it's own permissions
permissions:
contents: read

jobs:
test:
name: Tests
Expand Down Expand Up @@ -39,4 +43,4 @@ jobs:

- name: Run style and unused
if: ${{ matrix.go_version == '1.20' }}
run: make style unused
run: make style unused

0 comments on commit 553eb4c

Please sign in to comment.