summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authornathannaveen <42319948+nathannaveen@users.noreply.github.com>2022-06-04 04:10:22 -0500
committerGitHub <noreply@github.com>2022-06-04 11:10:22 +0200
commit0dd2cc8ddfb7a48b693c12f20d68964a78912e59 (patch)
tree7da018f1a6b20948e244c28dc76389d839dee9f4 /.github
parent67a7b94927fe13aa3e74d9172e07abb1fd148f80 (diff)
downloadalembic-0dd2cc8ddfb7a48b693c12f20d68964a78912e59.tar.gz
chore: Set permissions for GitHub actions (#1035)
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: nathannaveen <42319948+nathannaveen@users.noreply.github.com>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/run-on-pr.yaml3
-rw-r--r--.github/workflows/run-test.yaml3
2 files changed, 6 insertions, 0 deletions
diff --git a/.github/workflows/run-on-pr.yaml b/.github/workflows/run-on-pr.yaml
index e3bc5f2..360a6cf 100644
--- a/.github/workflows/run-on-pr.yaml
+++ b/.github/workflows/run-on-pr.yaml
@@ -12,6 +12,9 @@ env:
# global env to all steps
TOX_WORKERS: -n2
+permissions:
+ contents: read
+
jobs:
run-test-amd64:
name: ${{ matrix.python-version }}-${{ matrix.sqlalchemy }}-${{ matrix.os }}
diff --git a/.github/workflows/run-test.yaml b/.github/workflows/run-test.yaml
index 1f19116..3ff5e51 100644
--- a/.github/workflows/run-test.yaml
+++ b/.github/workflows/run-test.yaml
@@ -15,6 +15,9 @@ env:
# global env to all steps
TOX_WORKERS: -n2
+permissions:
+ contents: read
+
jobs:
run-test:
name: ${{ matrix.python-version }}-${{ matrix.sqlalchemy }}-${{ matrix.os }}