Skip to content

Grant PR Risk an OIDC token for federated model credentials - #550

Open
rgarcia wants to merge 1 commit into
mainfrom
hypeship/pr-risk-id-token
Open

rgarcia wants to merge 1 commit into
mainfrom
hypeship/pr-risk-id-token

Conversation

@rgarcia

@rgarcia rgarcia commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Lets the PR Risk check run on federated model credentials instead of stored API keys.

kernel/security-workflows#36 changes the reusable pr-risk.yml so its classify job requests id-token: write. It exchanges the job's GitHub OIDC token for short-lived Anthropic/OpenAI credentials. A reusable workflow job can't request more permissions than its caller grants, so this caller grants id-token: write.

Merge this before kernel/security-workflows#36. It changes nothing with the current pr-risk.yml, which ignores the extra permission. If #36 merges first, PR Risk fails to start here until this lands.

The ANTHROPIC_API_KEY / OPENAI_API_KEY secrets are still passed. #36 ignores them, and they'll be removed in a follow-up once every caller has switched.

Testing

kernel/security-workflows#36 was tested end to end: a caller granting id-token: write called the new pr-risk.yml on a throwaway PR with no API keys passed, and the classifier ran and posted its comment.

@rgarcia

rgarcia commented Nov 8, 2026

Copy link
Copy Markdown
Contributor Author

Picked tnsardesai to review these related PRs (kernel/security-workflows#36, kernel/kernel#5359, #550, kernel/infra#2088, kernel/kernel-images-private#584): touched the changed code in workflows; 4 pending

This branch has not been deployed

No deployments
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