Skip to content

Commit

Permalink
Restrict GITHUB_TOKEN in markdownlint action (#61622)
Browse files Browse the repository at this point in the history
Currently, Actions in the dotnet/runtime repository have read/write
access by default, unless their permissions have been explicitly declared.

The markdownlint workflow can be restricted from all access except the
repository contents. This limits what the 3rd party `markdownlint-cli`
npm package can do which is installed as part of the workflow.
  • Loading branch information
vcsjones authored Nov 15, 2021
1 parent d471a03 commit 6401f33
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/markdownlint.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Markdownlint

permissions:
contents: read

on:
pull_request:
paths:
Expand Down

0 comments on commit 6401f33

Please sign in to comment.