Skip to content
Merged
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
5 changes: 5 additions & 0 deletions .github/workflows/PTR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ on:
default: "120"
type: string

permissions:
contents: read

jobs:
# PHASE 1: Rust Fuzz Corpus Generation
rust-fuzz-oracle:
Expand Down Expand Up @@ -202,6 +205,8 @@ jobs:
needs: [python-property-resonator]
runs-on: ubuntu-24.04
if: always()
permissions:
contents: write

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid granting write access for commit comments

The only GitHub API call in this job is github.rest.repos.createCommitComment, and GitHub's REST docs for “Create a commit comment” list the required fine-grained permission as "Contents" repository permissions (read). Granting contents: write gives every action/script in this scheduled/manual reporter job a repository-write token if an action is compromised or the script is later expanded, so keep this at contents: read or omit the job override to preserve least privilege.

Useful? React with 👍 / 👎.

steps:
- uses: actions/download-artifact@v8
with:
Expand Down
Loading