Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 26 additions & 26 deletions .github/workflows/wf4.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
name: Test GitHubToken Excessive Permissions
on:
push:
branches:
- main
jobs:
test-permissions:
runs-on: ubuntu-latest
# Overly broad permissions for GITHUB_TOKEN
permissions:
contents: write
issues: write
pull-requests: write
actions: write
checks: write
deployments: write
statuses: write
packages: write
repository-projects: write
discussions: write
security-events: write # This one, in particular, should raise a flag as it's typically not needed for most workflows
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Dummy Step
run: echo "This is to test excessive token permissions"
name: Test GitHubToken Permissions
on:
push:
branches:
- main
jobs:
test-permissions:
runs-on: ubuntu-latest
# Minimal permissions for GITHUB_TOKEN
permissions:
contents: read
issues: none
pull-requests: none
actions: none
checks: read
deployments: none
statuses: read
packages: none
repository-projects: none
discussions: none
security-events: none
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Dummy Step
run: echo "Testing minimal token permissions"
Loading