Declare permissions

Repositories can be configured with Default access (restricted)
https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token

Best practice says that workflows should declare the minimal permissions they require.
Without declaring permissions, paranoid forks fail miserably.
This commit is contained in:
Josh Soref
2024-01-31 03:31:54 -05:00
parent e468f4062f
commit b58c856756
29 changed files with 97 additions and 5 deletions

View File

@@ -15,8 +15,13 @@ on:
- .github/workflows/go-tests.yml
- .github/actions/**
- codeql-workspace.yml
env:
GO_VERSION: '~1.21.0'
permissions:
contents: read
jobs:
test-linux:
if: github.repository_owner == 'github'