summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornaveensrinivasan <172697+naveensrinivasan@users.noreply.github.com>2022-04-10 00:12:01 +0000
committernaveensrinivasan <172697+naveensrinivasan@users.noreply.github.com>2022-04-10 00:12:01 +0000
commit386f834f7fa772a8015a4d642df6536edf06c847 (patch)
tree9dbe6dc6b321dd354141857006ea86aacb072869
parentecac9bc41e7aff16786af373029d685ac7f558d4 (diff)
downloadohai-386f834f7fa772a8015a4d642df6536edf06c847.tar.gz
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: naveensrinivasan <172697+naveensrinivasan@users.noreply.github.com>
-rw-r--r--.github/workflows/exec.yml3
-rw-r--r--.github/workflows/unit.yml3
2 files changed, 6 insertions, 0 deletions
diff --git a/.github/workflows/exec.yml b/.github/workflows/exec.yml
index 49a50579..4aabba5e 100644
--- a/.github/workflows/exec.yml
+++ b/.github/workflows/exec.yml
@@ -9,6 +9,9 @@ name: exec
- 1=7-stable
- 16-stable
+permissions:
+ contents: read
+
jobs:
test:
strategy:
diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml
index 9bc13e99..8ec47d47 100644
--- a/.github/workflows/unit.yml
+++ b/.github/workflows/unit.yml
@@ -9,6 +9,9 @@ name: unit
- 17-stable
- 16-stable
+permissions:
+ contents: read
+
jobs:
test:
strategy: