You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2022/06/17 05:33:45 UTC
[incubator-nuttx] branch master updated: chore: Set permissions for GitHub actions
This is an automated email from the ASF dual-hosted git repository.
pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 155c9a2070 chore: Set permissions for GitHub actions
155c9a2070 is described below
commit 155c9a20705f383144dd49d75decc5def193556a
Author: naveen <17...@users.noreply.github.com>
AuthorDate: Fri Jun 17 00:32:28 2022 +0000
chore: 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-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: naveen <17...@users.noreply.github.com>
---
.github/workflows/build.yml | 2 ++
.github/workflows/check.yml | 3 +++
.github/workflows/doc.yml | 3 +++
.github/workflows/docker_linux.yml | 3 +++
.github/workflows/lint.yml | 6 ++++++
5 files changed, 17 insertions(+)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index f825781bd0..3dc1c7d27c 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -165,6 +165,8 @@ jobs:
continue-on-error: true
macOS:
+ permissions:
+ contents: none
runs-on: macos-10.15
needs: Fetch-Source
strategy:
diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml
index 2fb5a77008..1a478635c5 100644
--- a/.github/workflows/check.yml
+++ b/.github/workflows/check.yml
@@ -21,6 +21,9 @@ concurrency:
group: check-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
+permissions:
+ contents: read
+
jobs:
check:
runs-on: ubuntu-18.04
diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml
index 4c2e610758..104e65aa55 100644
--- a/.github/workflows/doc.yml
+++ b/.github/workflows/doc.yml
@@ -19,6 +19,9 @@ concurrency:
group: docs-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
+permissions:
+ contents: read
+
jobs:
build-html:
runs-on: ubuntu-latest
diff --git a/.github/workflows/docker_linux.yml b/.github/workflows/docker_linux.yml
index 422bb841fd..85810b3baa 100644
--- a/.github/workflows/docker_linux.yml
+++ b/.github/workflows/docker_linux.yml
@@ -34,6 +34,9 @@ concurrency:
group: docker-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
+permissions:
+ contents: read
+
jobs:
# Push image to GitHub Packages.
push:
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index df35b1b7fd..58c6007d22 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -6,8 +6,14 @@ concurrency:
group: lint-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
+permissions:
+ contents: read
+
jobs:
lint:
+ permissions:
+ contents: read # for actions/checkout to fetch code
+ statuses: write # for github/super-linter to mark status of each linter run
name: Lint
runs-on: ubuntu-latest
steps: