AI Agent Change Risk Audit Report

Sample report — generated by AI Agent Change Risk Audit Kit v1.2.0
Repository: example/project  |  Branch: feature/auth-refactor  |  Commit: a3f7c2d
High Risk
Risk Score: 63/100 Threshold: 50 (high)
3
Files Changed
+47
Lines Added
−12
Lines Removed
5
Risk Flags

Risk Flags

FlagCategoryFileSeverity
DEPENDENCY_CHANGE Dependency package.json High
AUTH_PAYMENT_SECURITY_PATH Security src/middleware/auth.ts High
POSSIBLE_SECRET_LITERAL Secret src/config.ts Critical
SOURCE_CHANGED_WITHOUT_TEST Test Gap src/middleware/auth.ts Medium
CONFIG_CHANGE Config .env.example Medium

Files Changed

package.json     (+3/−1)
src/middleware/auth.ts     (+28/−7)
src/config.ts     (+8/−2)
.env.example     (+8/−2)

Recommendations

1. Review auth middleware changes carefully. The auth.ts file was modified with no corresponding test changes. Manually verify session handling, token validation, and redirect logic.
2. Rotate exposed credentials immediately. A secret-like literal (token= pattern) was detected in the diff. If this is a real credential, rotate it and move it to a secrets manager.
3. Verify dependency changes. package.json has additions/updates. Run npm audit and check the lockfile for unexpected resolutions.
4. Add or update tests. Source files were changed without test changes. Add regression tests before merge.
5. Review config changes. .env.example was modified. Verify no real secrets are committed and that defaults are appropriate.

Merge Recommendation

⛔ Do Not Merge — High Risk

Risk score 63/100 exceeds the high-risk threshold (50). Review all 5 flags before proceeding. This diff touches auth paths and contains possible secret literals.

CI Policy Example

# .github/workflows/risk-gate.yml
- name: AI Change Risk Gate
  run: python agent_change_risk_auditor.py audit --diff diff.patch
  # Exit code 1 on high risk → blocks merge

Run this audit on your own AI-generated diffs

Local Python CLI — no cloud, no API keys, under 1 second per diff.

Get the AI Agent Change Risk Audit Kit
Free 6-Point Checklist