Skip to main content
rulesSource-backed

High-Risk Code Review Escalation Rules

Source-backed rules for deciding when an AI-assisted code review must escalate high-risk changes to security, infrastructure, data, release, or domain owners before merge.

by MkDev11·added 2026-06-04·
Review first review before installing

Open the source and read safety notes before installing.

Citation facts

Source-backed facts for citing this resource, derived directly from the registry — also available as plain text for AI assistants.

Source URLs
https://google.github.io/eng-practices/review/reviewer/looking-for.html, https://github.com/JSONbored/awesome-claude/blob/main/content/rules/high-risk-code-review-escalation-rules.mdx
Safety notes
High-risk changes can alter auth, authorization, secrets, production data, network exposure, infrastructure, release automation, or dependency trust; escalate before merge instead of relying on a single reviewer., Treat AI-generated patches, summaries, migrations, policy edits, generated clients, and workflow changes as untrusted until the source diff and checks are reviewed., Require a rollback or disablement path for production-facing changes, especially when the blast radius includes customer data, credentials, deployments, billing, or public APIs.
Privacy notes
Escalation notes can expose private incident context, customer identifiers, secrets, account IDs, internal topology, or vulnerability details if copied into public PR comments., Use private security channels for embargoed vulnerabilities, secrets, regulated data, and exploit details; keep public PR notes synthetic and minimally revealing., Do not paste raw logs, traces, prompts, database rows, screenshots, or security scan output into review notes unless they have been redacted.
Author
MkDev11
Submitted by
MkDev11
Claim status
unclaimed
Last verified
2026-06-04

Decision playbook

Review trust signals before you adopt

Signals are present but mixed. Use the checklist below to confirm the source and operational safety for your environment.

Compare context
Selected

0

Current score

78

Baseline

Delta

No baseline selected

No major trust-signal divergence detected in the current selection.

Source and provenance checks

Complete

Confirm ownership and provenance before trusting install instructions.

  • Source link availableRequired

    Open the canonical repository and verify ownership.

    Done
  • Source provenance statusRequired

    Marked as source-backed.

    Done
  • Metadata reviewed

    Registry metadata indicates a reviewed listing.

    Done

Safety and privacy checks

Complete

Validate risk disclosures before installation or API wiring.

  • Safety notes presentRequired

    Review the listed safety guidance before running commands.

    Done
  • Privacy notes presentRequired

    Review data handling notes before connecting accounts or secrets.

    Done
  • Trust level risk gateRequired

    Trust level does not block evaluation.

    Done

Package and install checks

Needs review

Check package metadata and artifact integrity signals.

  • Install payload available

    Install or copy payload is available for review.

    Done
  • Package verification flag

    No package verification flag provided.

    Pending
  • Checksum metadata

    No checksum provided for downloaded artifact.

    Pending

Compare-driven decision checks

Needs review

Use compare context to validate trade-offs before adoption.

  • Compare tray has multiple entries

    Add at least one more entry to compare trust differences.

    Pending
  • Baseline comparison available

    No baseline peer selected yet.

    Pending
  • Diverging trust signals identified

    No major trust-signal divergence found.

    Pending

Setup at a glance

Copy & paste

Copy-ready — paste the snippet to get started.

15 minutes

Adoption plan

Balanced adoption plan

Current risk score 16/100. Use staged verification before broader rollout.

Risk 16

Pre-adoption checks

Validate source and review signals before any execution.

  • Confirm source provenanceRequired

    Source URL/provenance metadata is present.

    Done
  • Confirm metadata review state

    Listing has review metadata.

    Done
  • Verify install payload

    Install/config payload exists and can be inspected.

    Done

Security checks

Confirm safety, privacy, and package integrity signals.

  • Review safety notesRequired

    Safety notes are present.

    Done
  • Review privacy notesRequired

    Privacy notes are present.

    Done
  • Verify package integrity metadata

    No package verification/checksum metadata.

    Pending

Rollout

Adopt in controlled steps based on the selected plan.

  • Run in isolated sandbox firstRequired

    Use a constrained sandbox and observe behavior across multiple tasks.

    Pending
  • Roll out graduallyRequired

    Roll out to a small cohort before wider usage.

    Pending
  • Set monitoring and fallback

    Define rollback path and monitor errors after adoption.

    Pending

Evidence readiness

Evidence readiness matrix · balanced

Required evidence gates are covered (5/6 signals complete).

Risk 15

Source provenance

Present

Source repository/provenance is listed.

Required in this preset

Metadata review

Present

Review metadata is present.

Required in this preset

Safety notes

Present

Safety notes are present.

Required in this preset

Privacy notes

Present

Privacy notes are present.

Optional in this preset

Package integrity

Missing

Package integrity metadata is missing.

Optional in this preset

Install payload

Present

Install payload is available.

Required in this preset

Required evidence gates are covered for this preset.

Decision timeline

Decision timeline · balanced

5/6 steps complete with no blocking gaps for this preset.

Risk 14

triage

Confirm source provenanceRequired

Source/provenance metadata is available.

Done

triage

Check metadata review statusRequired

Review metadata is available.

Done

verify

Review safety notesRequired

Safety notes are available.

Done

verify

Review privacy notes

Privacy notes are available.

Done

verify

Validate package integrity metadata

Package integrity metadata is missing.

Pending

rollout

Verify install payload and commandsRequired

Install payload is available.

Done

No required blockers for this timeline preset.

Prerequisite readiness

Prerequisite readiness

4 prerequisites to line up before setup. Includes a review or approval gate.

0/4 ready
Install & runtime1Review & approval1General215 minutes

Safety & privacy surface

Safety & privacy surface

3 safety and 3 privacy notes across 3 risk areas. Review closely: credentials & tokens.

3 areas
  • SafetyCredentials & tokensHigh-risk changes can alter auth, authorization, secrets, production data, network exposure, infrastructure, release automation, or dependency trust; escalate before merge instead of relying on a single reviewer.
  • SafetyGeneralTreat AI-generated patches, summaries, migrations, policy edits, generated clients, and workflow changes as untrusted until the source diff and checks are reviewed.
  • SafetyCredentials & tokensRequire a rollback or disablement path for production-facing changes, especially when the blast radius includes customer data, credentials, deployments, billing, or public APIs.
  • PrivacyCredentials & tokensEscalation notes can expose private incident context, customer identifiers, secrets, account IDs, internal topology, or vulnerability details if copied into public PR comments.
  • PrivacyCredentials & tokensUse private security channels for embargoed vulnerabilities, secrets, regulated data, and exploit details; keep public PR notes synthetic and minimally revealing.
  • PrivacyData retentionDo not paste raw logs, traces, prompts, database rows, screenshots, or security scan output into review notes unless they have been redacted.

Safety notes

  • High-risk changes can alter auth, authorization, secrets, production data, network exposure, infrastructure, release automation, or dependency trust; escalate before merge instead of relying on a single reviewer.
  • Treat AI-generated patches, summaries, migrations, policy edits, generated clients, and workflow changes as untrusted until the source diff and checks are reviewed.
  • Require a rollback or disablement path for production-facing changes, especially when the blast radius includes customer data, credentials, deployments, billing, or public APIs.

Privacy notes

  • Escalation notes can expose private incident context, customer identifiers, secrets, account IDs, internal topology, or vulnerability details if copied into public PR comments.
  • Use private security channels for embargoed vulnerabilities, secrets, regulated data, and exploit details; keep public PR notes synthetic and minimally revealing.
  • Do not paste raw logs, traces, prompts, database rows, screenshots, or security scan output into review notes unless they have been redacted.

Prerequisites

  • A pull request, patch, or generated code change with enough diff context to classify the risk.
  • A repository policy that names security, infrastructure, data, API, dependency, and release owners or escalation channels.
  • Access to current CI results, required checks, deployment plan, rollback plan, and affected service ownership.
  • Permission to block approval when the risk class, source evidence, or owner signoff is incomplete.

Schema details

Install type
copy
Reading time
6 min
Difficulty score
42
Troubleshooting
Yes
Breaking changes
No
Collection metadata
Estimated setup
15 minutes
Difficulty
intermediate
Full copyable content
You are reviewing whether a high-risk code change can merge.

Rules:
1. Classify the risk before reviewing style or convenience fixes.
2. Escalate security, data, infrastructure, dependency, release, and API
   boundary changes to named owners.
3. Require fresh checks, threat notes, rollback evidence, and reviewer
   context before approval.
4. Do not let AI-generated summaries replace source diffs, CI logs, policy
   evidence, or owner signoff.
5. Block merge when a risky change lacks reproducible tests, branch
   protection, audit trail, or privacy-safe review notes.

About this resource

Purpose

Use these rules when an AI coding assistant, maintainer bot, or human reviewer is asked to approve a change that could affect production safety, user data, security boundaries, public APIs, dependency trust, or release automation.

The goal is not to slow every PR. The goal is to identify the small set of changes that need a named owner, fresher evidence, and an explicit merge decision before they become production behavior.

Escalation Triggers

Escalate a review when the change touches any of these areas.

  1. Authentication or authorization. Login, sessions, tokens, cookies, OAuth, SSO, permissions, tenant isolation, admin checks, or access policy.
  2. Secrets and credentials. Secret storage, environment variables, key rotation, CI secrets, cloud credentials, webhook tokens, signing keys, or generated config that can reveal secrets.
  3. Production infrastructure. Terraform, Kubernetes, network policy, DNS, storage buckets, queues, databases, caches, deployment workflows, or autoscaling.
  4. Data handling. PII, payment data, customer records, logs, analytics, prompts, embeddings, retention, deletion, exports, backups, or migrations.
  5. Dependency and build trust. Package updates, lockfiles, generated clients, build scripts, provenance, artifact signing, publish workflows, or install-time scripts.
  6. Public contracts. API schemas, GraphQL types, event payloads, database migrations, CLI flags, file formats, webhooks, or backward compatibility.
  7. Release gates. Branch protection, required checks, CI bypasses, deployment approvals, feature flags, rollback tooling, or incident response paths.

If the risk class is unclear, escalate for classification before reviewing style, naming, or convenience improvements.

Required Evidence

A high-risk review should have enough evidence for another reviewer to understand the decision later.

  • The affected owner or domain reviewer is named.
  • Required checks are current for the reviewed head commit.
  • Tests cover the risky behavior, not only formatting or snapshots.
  • Security-sensitive diffs are reviewed from source, not only from summaries.
  • Generated files are tied to a reviewed source input and regeneration command.
  • Rollback, disablement, migration backout, or incident response path is stated.
  • Public API, schema, or data model changes name compatibility expectations.
  • Privacy-sensitive examples, logs, and screenshots are redacted or avoided.

Do not approve a high-risk PR when the evidence is stale, detached from the current head commit, or hidden in private context that future maintainers cannot audit.

Reviewer Rules

  • Start with risk classification, then review correctness, tests, and design.
  • Ask who owns the affected system before approving cross-boundary changes.
  • Require a second reviewer for auth, data, infrastructure, release, and dependency trust changes.
  • Treat CI configuration changes as production changes when they can weaken required checks, publish artifacts, expose secrets, or deploy code.
  • Compare generated code, lockfiles, schema outputs, and migrations against the source change that produced them.
  • Verify that branch protection or required checks still apply to the merge path.
  • Separate "needs author fix" from "needs owner escalation" so risky PRs do not pass because all inline comments were resolved.

Merge Blockers

Block merge until resolved when:

  • the PR changes auth, data, infrastructure, dependencies, or release gates without owner review;
  • required checks are skipped, stale, failing, or not tied to the current head;
  • a generated artifact changed but the source file, generator, or command is missing;
  • a migration, deployment, or feature flag has no rollback or disablement path;
  • a security or privacy claim is based on AI summary text rather than source evidence;
  • logs, screenshots, fixtures, prompts, or review notes reveal secrets or private user data;
  • the PR weakens branch protection, bypasses CI, or changes publish credentials without explicit release-owner approval.

Review Checklist

  • {"task": "Risk class named", "description": "The reviewer classified whether the PR touches security, data, infrastructure, dependencies, contracts, or release gates"}
  • {"task": "Owner review present", "description": "A named owner or domain reviewer approved the affected risk area"}
  • {"task": "Checks are fresh", "description": "Required checks ran on the reviewed head commit and cover the risky behavior"}
  • {"task": "Rollback is clear", "description": "The PR explains rollback, disablement, backout, or incident response for production-facing changes"}
  • {"task": "Generated output traced", "description": "Generated code, lockfiles, schemas, clients, or migrations are tied to reviewed source inputs"}
  • {"task": "Privacy notes safe", "description": "Review notes avoid secrets, raw customer data, exploit details, and private operational context"}

AI Review Rules

AI reviewers can help find risk signals, but they should not be the final authority for high-risk merge decisions.

  • Ask the assistant to classify touched risk areas before asking for style feedback.
  • Require file paths, line references, and check names for every blocking recommendation.
  • Have the assistant list unknowns separately from confirmed findings.
  • Do not accept "looks safe" when the assistant could not inspect CI output, branch protection, source docs, or owner policy.
  • Re-run review after rebases or force pushes that change the head commit.

Troubleshooting

  • The PR is mostly generated: review the source input and generator first; block merge if reviewers cannot reproduce or explain the generated diff.
  • The author says checks passed locally: require current CI or reproducible command output tied to the reviewed commit.
  • The risk owner is unavailable: defer merge or split the risky portion into a separate PR rather than approving by silence.
  • The change is urgent: record the emergency owner, time-bound approval, rollback path, and follow-up review issue.
  • Security details cannot be public: keep sensitive evidence in the private security channel and leave a minimal public note that owner review occurred.

Duplicate And History Check

Checked existing rules, guides, collections, hooks, agents, skills, commands, open PRs, and closed PR history for high-risk review escalation, code review escalation, branch protection review, security owner signoff, production change review, and AI-assisted PR risk review.

Adjacent content includes a general code review expert rule, production codebase auditor rule, review-AI-generated-code guide, secure workflow guide, dependency risk command, and API contract review collection. This entry is distinct because it is a portable escalation policy for deciding when a risky PR needs owner signoff, fresh checks, rollback evidence, and privacy-safe review notes before merge.

The previously closed PR for this slot was closed for branch shape because it included generated/output churn and no canonical source MDX file for the submitted item. This submission adds exactly one source rules file.

What a Reviewer Looks For

Beyond the escalation triggers above, ground routine review depth in the Google Engineering Practices code review guidance. It enumerates what a reviewer examines in every change, in rough priority order.

Review aspect What the reviewer checks (per Google eng-practices)
Design "The most important thing to cover in a review is the overall design of the CL."
Functionality "Does this CL do what the developer intended? Is what the developer intended good for the users of this code?"
Complexity "Is the CL more complex than it should be? Check this at every level of the CL."
Tests "Ask for unit, integration, or end-to-end tests as appropriate for the change."
Naming "A good name is long enough to fully communicate what the item is or does."
Comments "Did the developer write clear comments in understandable English?"
Documentation "If a CL changes how users build, test, interact with, or release code, check to see that it also updates associated documentation."
Every line "In the general case, look at every line of code that you have been assigned to review."

References

Source citations

Add this badge to your README

Show that High-Risk Code Review Escalation Rules is listed on HeyClaude. Paste this Markdown into your README — it renders the badge and links back to this page.

Listed on HeyClaude
[![Listed on HeyClaude](https://heyclau.de/badge/rules/high-risk-code-review-escalation-rules.svg)](https://heyclau.de/entry/rules/high-risk-code-review-escalation-rules)

How it compares

High-Risk Code Review Escalation Rules side by side with 3 alternatives on trust, install, platform support, and disclosed safety notes — all from reviewed registry metadata.

1 trust signal differ across this comparison (Submitter).

Field

Source-backed rules for deciding when an AI-assisted code review must escalate high-risk changes to security, infrastructure, data, release, or domain owners before merge.

Open dossier

Comprehensive code review rules for thorough analysis and constructive feedback

Open dossier

Source-backed rules for reviewing AI-generated request handlers and forms before merge for cross-site request forgery risk, covering state-changing method discipline, anti-CSRF token correctness, SameSite cookie posture, origin and referer checks, and safe handling of cookie-based sessions.

Open dossier

Source-backed rules for reviewing AI-generated code that builds or runs operating-system commands, shell invocations, or subprocesses before merge for command injection and argument injection risk, covering library alternatives to shelling out, array-form process APIs, allowlist input validation, and least-privilege execution.

Open dossier
Next steps
Trust
Review statusReviewedMaintainer reviewedReviewedMaintainer reviewedReviewedMaintainer reviewedReviewedMaintainer reviewed
Package trustPackage not verifiedPackage not verifiedPackage not verifiedPackage not verified
Source provenanceSource-backedSource-backedSource-backedSource-backed
SubmitterDiffersMkDev11jaso0n0818lourincedaging0-commits
Install riskReview firstReview firstReview firstReview first
Notes Safety ✓ Privacy ✓ Safety · Privacy ✓ Safety ✓ Privacy ✓ Safety ✓ Privacy ✓
Brand
Categoryrulesrulesrulesrules
SourceSource-backedSource-backedSource-backedSource-backed
AuthorMkDev11JSONboredjaso0n0818lourincedaging0-commits
Added2026-06-042025-09-162026-06-222026-07-15
Platforms
Harness
Source repo
Safety notesHigh-risk changes can alter auth, authorization, secrets, production data, network exposure, infrastructure, release automation, or dependency trust; escalate before merge instead of relying on a single reviewer. Treat AI-generated patches, summaries, migrations, policy edits, generated clients, and workflow changes as untrusted until the source diff and checks are reviewed. Require a rollback or disablement path for production-facing changes, especially when the blast radius includes customer data, credentials, deployments, billing, or public APIs.— missingA missing CSRF defense lets a malicious page perform state-changing actions as a logged-in user — transferring funds, changing email or password, or deleting data — using the victim's ambient cookies. AI assistants often generate handlers that work in tests yet omit token validation or perform state changes on GET, because the happy path succeeds without any forged cross-site request. Relying on SameSite cookies alone is not sufficient: defaults vary, Lax still allows top-level GET navigations, and some clients or legacy browsers do not enforce it.A successful OS command injection lets an attacker run arbitrary commands with the privileges of the running process, which can mean full remote code execution, data exfiltration, or lateral movement on the host. AI assistants often shell out with a string-interpolated command (f-string, template literal, string concatenation) because it is the shortest path to invoking an external tool, without switching to the array-form API or validating input. Even a fixed, non-attacker-controlled command name is not safe if an attacker can control one of its arguments — argument injection can still cause information disclosure or code execution depending on the command.
Privacy notesEscalation notes can expose private incident context, customer identifiers, secrets, account IDs, internal topology, or vulnerability details if copied into public PR comments. Use private security channels for embargoed vulnerabilities, secrets, regulated data, and exploit details; keep public PR notes synthetic and minimally revealing. Do not paste raw logs, traces, prompts, database rows, screenshots, or security scan output into review notes unless they have been redacted.Code review reads source diffs that may contain secrets or proprietary code; keep credentials and sensitive snippets out of review comments and shared logs.CSRF tokens are security credentials; do not paste real tokens, session cookies, or production request captures into public PR comments or issues. Use synthetic accounts and redacted requests when demonstrating a CSRF proof of concept, and avoid attaching real user identifiers. Be careful that anti-CSRF tokens are not written into URLs, analytics, or logs, where they can leak through referer headers or shared dashboards.Command injection proof-of-concept payloads and captured process output can expose real filesystem contents, environment variables, or credentials; use a sandboxed environment and redact captures before pasting them into a PR or issue. Do not commit real file paths, hostnames, or internal tool names discovered while testing a suspected injection into a public PR or issue description. Subprocess output and error streams are a common place for secrets (API keys, tokens in env vars) to leak into logs; avoid logging raw stdout/stderr from a shelled-out command that could echo them back.
Prerequisites
  • A pull request, patch, or generated code change with enough diff context to classify the risk.
  • A repository policy that names security, infrastructure, data, API, dependency, and release owners or escalation channels.
  • Access to current CI results, required checks, deployment plan, rollback plan, and affected service ownership.
  • Permission to block approval when the risk class, source evidence, or owner signoff is incomplete.
— none listed
  • A pull request, diff, or snippet containing an AI-generated or AI-edited request handler, form, or fetch call with enough context to know how the user is authenticated.
  • Knowledge of how the framework manages sessions and CSRF tokens, since built-in protection, cookie defaults, and token helpers differ between frameworks.
  • Awareness of which routes change state and which are read-only, so the review can focus on unsafe methods.
  • Permission to block merge when a cookie-authenticated state change ships without a CSRF defense.
  • A pull request, diff, or snippet containing AI-generated or AI-edited code that builds a shell command string or invokes a subprocess/child process.
  • Knowledge of which values in the command or its arguments originate from user input, uploaded files, configuration, or other external systems.
  • Familiarity with the target language's array-form process APIs (subprocess, child_process, ProcessBuilder, or equivalent) so a shell-string call can be reviewed against a safer alternative.
  • Permission to block merge when untrusted input reaches a shell-parsed command without validation, or when a safer library alternative exists and was not used.
Install
Config
Citations
ClaimUnclaimedUnclaimedUnclaimedUnclaimed
Open 4 picks in the interactive comparison tool

Related guides

Signals

Loading live community signals…

More like this, weekly

A short, calm digest of reviewed Claude resources. Unsubscribe any time.