Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Scan Workflow Permission #4

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
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
4 changes: 3 additions & 1 deletion .github/workflows/scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ on:
pull_request_target:
types: [opened, synchronize]

permissions: read-all

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should leave the permissions set to read-all here and update the permissions block on line 24 with:

permissions:
  contents: read
  security-events: write

Line 13 sets all scoped permissions to read , something like {actions: read, contents: read, issues: read, security-events: read, ...etc}. Line 24 then overrides all workflow level permissions to {security-events: write, actions: none, contents: none, ....etc}. Line 24 needs to be updated to explicitly include all other required scopes the job needs since they will be set to none if not explicitly set, even though the workflow permissions are set to read-all

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been updated @joseph-flinn

permissions:
contents: read
pull-requests: write

jobs:
check-run:
Expand Down
Loading