diff --git a/.github/workflows/client-versions.yaml b/.github/workflows/client-versions.yaml index 05be514b..f19d4553 100644 --- a/.github/workflows/client-versions.yaml +++ b/.github/workflows/client-versions.yaml @@ -4,6 +4,10 @@ on: workflow_dispatch: workflow_call: +# Least-privilege default: this report only reads the repo to census notebooks. +permissions: + contents: read + jobs: analyze-client-versions: runs-on: ubuntu-latest diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 43efd238..6d24e578 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -6,6 +6,10 @@ on: branches: - main +# Least-privilege default: lint and notebook tests only read the repo. +permissions: + contents: read + jobs: lint: uses: './.github/workflows/lint.yaml' diff --git a/.github/workflows/test-notebooks-all.yaml b/.github/workflows/test-notebooks-all.yaml index 1ea2ded8..2ec2c192 100644 --- a/.github/workflows/test-notebooks-all.yaml +++ b/.github/workflows/test-notebooks-all.yaml @@ -9,6 +9,10 @@ on: default: 'docs' type: string +# Least-privilege default: notebook validation and execution only read the repo. +permissions: + contents: read + jobs: validate-notebooks: runs-on: ubuntu-latest diff --git a/.github/workflows/test-notebooks-changed.yaml b/.github/workflows/test-notebooks-changed.yaml index 68e1bdef..6355ce09 100644 --- a/.github/workflows/test-notebooks-changed.yaml +++ b/.github/workflows/test-notebooks-changed.yaml @@ -8,6 +8,10 @@ on: type: string default: 'main' +# Least-privilege default: change detection and notebook execution only read the repo. +permissions: + contents: read + jobs: validate-notebooks: runs-on: ubuntu-latest