Skip to content

Commit ef0b272

Browse files
authored
Merge pull request #469 from rajbos/workflow-permissions
Prevent securituy alerts
2 parents 3ebd743 + 105050c commit ef0b272

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

.github/workflows/check-models.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ jobs:
2020
runs-on: ubuntu-latest
2121
if: github.actor != 'dependabot[bot]' && !startsWith(github.ref_name, 'dependabot/')
2222
permissions:
23-
contents: write # Need write permission to create branches and push changes
24-
pull-requests: write # Need write permission to create PRs
25-
id-token: write # Keep for potential future use
23+
contents: write # needed to create branches and push changes
24+
pull-requests: write # needed to create PRs
2625

2726
steps:
2827
- name: Harden the runner (Audit all outbound calls)

.github/workflows/cli-publish.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,16 @@ on:
2727
- 'cli/package-lock.json'
2828

2929
permissions:
30-
contents: write
31-
pull-requests: write
32-
id-token: write # Required for OIDC to npm registry
30+
contents: read
3331

3432
jobs:
3533
publish:
3634
name: Publish CLI to npm
3735
runs-on: ubuntu-latest
36+
permissions:
37+
contents: write # needed to push version bump branch and create PR
38+
pull-requests: write # needed to open the version bump PR
39+
id-token: write # required for OIDC authentication to npm registry
3840
defaults:
3941
run:
4042
working-directory: cli

0 commit comments

Comments
 (0)