Skip to content

Commit fe0dc24

Browse files
authored
Merge pull request #78 from marcofranssen/main
Document the required workflow permissions
2 parents 53821b4 + d8b6fff commit fe0dc24

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ To add the action, add `tfsec_pr_commenter.yml` into the `.github/workflows` dir
99

1010
The contents of `tfsec_pr_commenter.yml` should be;
1111

12+
> **Note**: The GITHUB_TOKEN injected to the workflow will need permissions to write on pull requests.
13+
>
14+
> This can be achieved by adding a permissions block in your workflow definition.
15+
>
16+
> See: [docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs](https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs)
17+
> for more details.
18+
1219
```yaml
1320
name: tfsec-pr-commenter
1421
on:
@@ -18,6 +25,10 @@ jobs:
1825
name: tfsec PR commenter
1926
runs-on: ubuntu-latest
2027

28+
permissions:
29+
contents: read
30+
pull-requests: write
31+
2132
steps:
2233
- name: Clone repo
2334
uses: actions/checkout@master

0 commit comments

Comments
 (0)