Skip to content

Commit ed104a9

Browse files
musa-cfarpitjain099
andcommitted
ci: per-job permissions for publish-pypi, release-doctor, sync-labels, semgrep
- publish-pypi: contents: read -- publish step uses PYPI_TOKEN, not GITHUB_TOKEN. - release-doctor: contents: read -- only runs a local sanity-check script. - sync-labels: issues: write -- micnncim/action-label-syncer manages repo labels via GITHUB_TOKEN. - semgrep: contents: read -- only checks out code and runs semgrep ci. Matches the per-job permissions style already used in ci.yml and detect-breaking-changes.yml. Co-authored-by: arpitjain099 <arpitjain099@gmail.com>
1 parent 1a0b300 commit ed104a9

4 files changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/publish-pypi.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ on:
1111
jobs:
1212
publish:
1313
name: publish
14+
permissions:
15+
contents: read
1416
runs-on: ubuntu-latest
1517

1618
steps:

.github/workflows/release-doctor.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ concurrency:
1313
jobs:
1414
release_doctor:
1515
name: release doctor
16+
permissions:
17+
contents: read
1618
runs-on: ubuntu-latest
1719
timeout-minutes: 2
1820
if: github.repository == 'cloudflare/cloudflare-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')

.github/workflows/semgrep.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ name: Semgrep config
66
jobs:
77
semgrep:
88
name: semgrep/ci
9+
permissions:
10+
contents: read
911
runs-on: ubuntu-latest
1012
env:
1113
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}

.github/workflows/sync-labels.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
- .github/labels.yml
99
jobs:
1010
build:
11+
permissions:
12+
issues: write # action-label-syncer creates/updates repo labels
1113
runs-on: ubuntu-latest
1214
steps:
1315
- uses: actions/checkout@v2

0 commit comments

Comments
 (0)