Skip to content

fix: keep PR provenance checks least privilege - #10

Merged
Sythos merged 1 commit into
mainfrom
fix/lp5-pr-attestation-least-privilege
Aug 25, 2026
Merged

fix: keep PR provenance checks least privilege#10
Sythos merged 1 commit into
mainfrom
fix/lp5-pr-attestation-least-privilege

Conversation

@Sythos

@Sythos Sythos commented Aug 25, 2026

Copy link
Copy Markdown
Owner

Summary\n- inherit provenance permissions from each caller instead of elevating them in the reusable workflow\n- keep pull-request validation read-only while push/manual callers retain attestation permissions\n- make the static permission assertions check commit-tests.yml, the effective write-capable caller\n\n## Verification\n- npm test\n- git diff --check\n- static workflow permission assertions\n\nThis corrects the startup failure observed in run 32871809589 without granting write permissions to pull-request code.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c35118be40

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 25 to 26
permissions:
contents: read

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 Skip attestations for read-only manual PR validation

When pr-validation.yml is started through its retained workflow_dispatch trigger, the reusable workflow still executes Generate OCI artifact attestations because its condition accepts every workflow_dispatch event (quality-gates.yml:764-766). This caller now grants only contents: read, so the attestation action cannot obtain the required identity-token and attestation permissions and the manual validation fails. Either exclude the pull-request context from that condition or route manual runs through a write-capable caller.

Useful? React with 👍 / 👎.

@Sythos
Sythos merged commit e4a0f9d into main Aug 25, 2026
2 checks passed
@Sythos
Sythos deleted the fix/lp5-pr-attestation-least-privilege branch August 25, 2026 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant