You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Onboard CodeGovernanceLab/AiTaskService to CodeGovernanceLab/PrGovernance using the canonical risk-gate.yml template pinned at 5c4348e9d9ffbacf5526164a5be7f5c9f74fbfaf.
The workflow gets the fundamentals right for a pull_request_target-based gate: the third-party action is pinned to a full 40-char SHA, PR code is never checked out, no secrets are passed (only non-sensitive vars), and record_label scopes its token tightly. However, the evaluate job grants actions:write without a visible need, the workflow_run trigger references a 'PR review signal' workflow that this PR does not add (so the fork/Dependabot review-comment relay may silently never fire), and the always() condition lets evaluation proceed even when the label-head recorder failed, which is a fail-open direction for the gate's own evidence model. Remaining items are verification notes around comment-trigger spoofing and an env var naming inconsistency.
[MEDIUM].github/workflows/risk-gate.yml: The evaluate job (and top-level permissions) grant actions:write. A gate that 'reads metadata only' and posts commit statuses needs at most actions:read to inspect workflow_run payloads/artifacts; actions:write additionally lets the third-party action approve or cancel workflow runs. Reduce to actions:read or document the concrete write capability required.
[MEDIUM].github/workflows/risk-gate.yml: The workflow_run trigger references workflows: ["PR review signal"], but this PR adds no such workflow. Per the file's own comment, fork/Dependabot review and inline comments reach this trusted run only via that relay; if the workflow does not already exist in the repo, the trigger silently never fires and those review signals are never evaluated. Confirm the companion workflow exists or add it as part of this onboarding.
[MEDIUM].github/workflows/risk-gate.yml: evaluate's condition always() && needs.record_label.result != 'cancelled' lets evaluation proceed even when record_label failed. The file states the labeled payload is 'the only authenticated record of which head a clearing label was added to', so running evaluate after a recorder failure can produce a verdict without the label-to-head binding (fail-open if the action falls back to 'label present on PR'). Fail closed: also exclude result == 'failure' (or fail the run) when label evidence could not be recorded.
[LOW].github/workflows/risk-gate.yml: The issue_comment pre-filter accepts any user.type == 'Bot' or any comment body containing 'codex-review'/'ai-review-receipt', so any user or installed app can launch the trusted evaluation. This is safe only if the pinned action validates receipts by author identity (GOVERNANCE_REVIEWER_APP_ID/USER_ID/LOGIN) rather than by body-content matching, which is trivially forgeable. Verify the action enforces author-bound validation.
[LOW].github/workflows/risk-gate.yml: Env var naming inconsistency: GOVERNANCE_REVIEWERS_JSON lacks the RISK_GATE_ prefix used by every other var in this workflow. If repo settings only define RISK_GATE_* variables, the reviewers list is silently empty. Confirm the exact variable name or align the prefix.
[LOW].github/workflows/risk-gate.yml: For workflow_run events from fork PRs, github.event.workflow_run.pull_requests is typically empty, so the concurrency group falls back to github.run_id and cancel-in-progress no longer dedupes relayed evaluations for the same PR. Consider deriving the PR number from the workflow_run head SHA/branch lookup so relayed runs share the per-PR concurrency group.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Onboard
CodeGovernanceLab/AiTaskServicetoCodeGovernanceLab/PrGovernanceusing the canonicalrisk-gate.ymltemplate pinned at5c4348e9d9ffbacf5526164a5be7f5c9f74fbfaf.AI assistance
Prepared with Antigravity.