Skip to content

Add shadow-mode PR risk check - #531

Merged
tnsardesai merged 2 commits into
mainfrom
hypeship/pr-risk-shadow
Oct 27, 2026
Merged

tnsardesai merged 2 commits into
mainfrom
hypeship/pr-risk-shadow

Conversation

@tnsardesai

@tnsardesai tnsardesai commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds the caller for the shared pr-risk.yml workflow from kernel/security-workflows. When a PR is opened or marked ready, and on every push, it comments whether a PR would have been auto-approved and why. It does not approve anything, so the required human review is unchanged.

PRs that are drafts, come from forks, change more than 50 lines, or touch a deny-listed path are skipped with no comment. The deny-paths here add this repo's sensitive areas on top of the shared defaults (.github/**, dependency manifests and lockfiles, key and secret material).

Secrets are passed by name rather than inherited. This repo already has all three, because Semgrep and vuln-remediation use them.

Merge order

Merge after kernel/security-workflows#25. Until that lands, this workflow references a file that doesn't exist yet on main. This PR changes .github/**, so the classifier will skip it once it is live.

Testing


Note

Low Risk
Adds a read-only CI workflow that comments on PRs; it does not change merge gates or application code.

Overview
Adds a shadow-mode PR risk GitHub Actions workflow that runs on PR open, ready-for-review, and sync. It reuses kernel/security-workflows/.github/workflows/pr-risk.yml@main to comment whether a small PR would have been auto-approved and why—without granting approval, so human review stays required.

Repo-specific deny-paths extend the shared defaults to always exclude deploy/**, lib/network/**, and lib/egressproxy/**. Three secrets (ADMIN_APP_ID, ADMIN_APP_PRIVATE_KEY, ANTHROPIC_API_KEY) are passed explicitly instead of secrets: inherit when calling the external workflow.

Reviewed by Cursor Bugbot for commit 4c5c3ca. Bugbot is set up for automated code reviews on this repo. Configure here.

@tnsardesai

Copy link
Copy Markdown
Contributor Author

Picked sjmiller609 to review these related PRs (kernel/security-workflows#25, kernel/infra#1825, kernel/kernel#5021, kernel/kernel-images-private#517, #531): recent commits in workflows; 2 pending


jobs:
classify:
uses: kernel/security-workflows/.github/workflows/pr-risk.yml@main

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

can you double check we only auto approve for members of the kernel org?

@tnsardesai
tnsardesai merged commit e7dfe2c into main Oct 27, 2026
10 checks passed
@tnsardesai
tnsardesai deleted the hypeship/pr-risk-shadow branch October 27, 2026 20:23
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.

2 participants