ci: Set permissions for GitHub actions

Restrict the GitHub token permissions only to the required ones; this way,
 even if the attackers will succeed in compromising your workflow,
 they won’t be able to do much.

- Included permissions for the action.
https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions

https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

Signed-off-by: naveen <172697+naveensrinivasan@users.noreply.github.com>
naveensrinivasan <172697+naveensrinivasan@users.noreply.github.com>
This commit is contained in:
naveen
2022-05-01 01:00:30 +00:00
committed by Madhu Rajanna
parent b1a0f42b31
commit 2672fad90a
11 changed files with 37 additions and 0 deletions

View File

@ -5,6 +5,9 @@ on:
pull_request:
branches:
- '*'
permissions:
contents: read
jobs:
golangci-lint:
name: golangci-lint