From bd1434fcb25b138f1d60def3b681bf4986d0da3d Mon Sep 17 00:00:00 2001 From: Naveen <172697+naveensrinivasan@users.noreply.github.com> Date: Wed, 10 Aug 2022 22:05:58 -1000 Subject: [PATCH] Set permissions for GitHub actions (#6820) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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/) 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. Signed-off-by: naveensrinivasan <172697+naveensrinivasan@users.noreply.github.com> Signed-off-by: naveensrinivasan <172697+naveensrinivasan@users.noreply.github.com> --- .github/workflows/fpb-lint.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/fpb-lint.yml b/.github/workflows/fpb-lint.yml index 3762ea660..6bfbaed43 100644 --- a/.github/workflows/fpb-lint.yml +++ b/.github/workflows/fpb-lint.yml @@ -2,6 +2,9 @@ name: free-programming-books-lint on: [push, pull_request] +permissions: + contents: read + jobs: build: