Skip to content

Commit 15ab481

Browse files
authored
chore: Set permissions for GitHub actions (#6467)
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-workflows/workflow-syntax-for-github-actions#permissions https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs [Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/) Signed-off-by: neilnaveen <42328488+neilnaveen@users.noreply.github.com>
1 parent 7d932e5 commit 15ab481

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/linter.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,14 @@ name: Lint Code Base
1919

2020
on: [pull_request]
2121

22+
permissions:
23+
contents: read
24+
2225
jobs:
2326
build:
27+
permissions:
28+
contents: read # for actions/checkout to fetch code
29+
statuses: write # for github/super-linter to mark status of each linter run
2430
name: SuperLinter Check
2531
runs-on: ubuntu-latest
2632
steps:

0 commit comments

Comments
 (0)