AI-assisted PRs are rarely “obviously wrong.”
They are usually plausible, compilable, and testable. That is why they merge.
The goal of review is not to punish AI use. The goal is to keep standards stable while code volume increases.
Here is a checklist designed for mixed Node/TS + Python environments.
Fast review (2 minutes): catch the high-signal risks
1) Did the PR add or change dependencies?
Look for:
- new direct dependencies
- version bumps with large lockfile churn
- packages introduced for trivial tasks (“one function” dependencies)
Node/TS files: package.json, lockfiles Python files: requirements.txt, pyproject.toml, lockfiles
2) Did the PR change build, scripts, or CI?
Look for:
package.jsonscript changes- lifecycle hooks (
preinstall,postinstall,prepare) - CI permissions and workflow diffs
- Dockerfile remote fetches
3) Did the PR touch authn/authz paths?
Look for:
- new endpoints without auth middleware
- missing authorization checks after authentication
- role/permission logic added without tests
4) Did the PR introduce new network calls?
Look for:
- new outbound HTTP calls
- webhooks
- “telemetry” endpoints
- fetches to untrusted domains
5) Did the PR touch secrets or configuration?
Look for:
.envchanges- config loaders and fallbacks
- logging of config values
- accidental credentials in code or comments
If any of the above hits, move to deep review.
Deep review (10 minutes): validate security properties
A) Input validation and injection surfaces
Common places AI-generated code gets sloppy:
- SQL/ORM queries composed from untrusted input
- NoSQL query objects built from user input
- command execution wrappers
- templating and HTML rendering
Node/TS hotspots
child_process.exec/spawnusage- dynamic
eval-like patterns - unsafe regex on attacker-controlled input
Python hotspots
subprocessusage, especiallyshell=True- unsafe YAML loaders
- unsafe deserialization (
pickle)
B) SSRF and internal access
Check whether any new “fetch URL” logic exists and whether it’s constrained.
If the code accepts a user-supplied URL, require:
- allowlists
- DNS/IP controls where appropriate
- timeouts and redirect handling
- no access to metadata/internal ranges
C) Authorization correctness (the most expensive bug class)
AI will often add authentication but miss authorization.
Verify:
- every sensitive action checks permissions
- the permission check happens close to the action (not earlier in a different layer)
- multi-tenant boundaries are enforced in queries (tenant scoping)
D) Logging and error handling
AI tends to over-log for “helpfulness.”
Check that logs do not include:
- tokens
- session IDs
- credentials
- full request bodies by default
- PII without redaction
E) Secrets and sensitive strings
Search the diff for:
- keys, tokens, PEM blocks
- internal hostnames and URLs
- pasted stack traces
- “temporary debug” credentials
Even “it’s just a dev key” becomes production debt quickly.
F) Dependency and build surface
Validate:
- new dependencies are justified
- install/build hooks aren’t being introduced casually
- lockfile changes align with expectation
- registries are what you expect (
.npmrc, pip indexes)
G) Licensing and policy alignment
AI-generated code can introduce provenance ambiguity.
Check:
- license policy for new dependencies
- whether copied snippets have attribution requirements
- internal policy constraints for cryptography, telemetry, data handling
What to automate (so humans don’t drown)
Automation excels at:
- Secret detection in new files and diffs
- Dependency diffs and policy checks (new package alerts, license scanning)
- Script/build changes in manifests and CI configs
- Known insecure patterns (SSRF primitives, unsafe deserialization, weak crypto)
- Policy gates (block forbidden licenses, enforce pin/lock requirements)
What remains for humans:
- architectural judgment
- exception reasoning
- threat model validation
The goal is not to replace reviewers. It is to remove the toil so reviewers focus on what matters.
The Cyblox view: checklist + automation = sustainable review
GenAI Code Security automates the checklist items above and surfaces findings directly in PR review.
- Security weaknesses
- Secret and data exposure
- Licensing and policy drift
- Dependency and build surface changes
With review evidence captured automatically.
More at: /solutions/security/genai-code-security/.
Closing thought
A checklist is only useful if it is used.
If your AI-assisted PR volume is rising, the sustainable approach is:
automate the repeatable checks, reserve human judgment for the hard calls.
That is how you ship fast without shipping blind.
