keepcalculator

06 Numbers and Powers

Triage AI-Generated Vulnerability Reports Before Coding

Card No. 06·58089 · Updated · Standard formula, shown below

AI-generated vulnerability reports can surface useful leads, but they may also misread code, invent attack paths, or overstate impact. Use this workflow to verify each claim against the source, establish whether it is reachable and exploitable, and record a decision before changing code. You will need the report, the relevant repository and revision, and a safe way to inspect or test the application.

What You’ll Need

  • The complete report, including the affected file, line numbers, claimed weakness, impact, and reproduction steps.
  • Access to the repository at the revision the report analyzed. Check the commit or release; line numbers can shift.
  • A local development or test environment, relevant tests, and dependency or configuration files.
  • Permission to test the system. Use a local copy or authorized staging environment, not an unapproved production target.
  • A place to record evidence, assumptions, severity reasoning, and the triage outcome.

Step-by-Step

  1. Preserve the claim and identify its scope. Copy the report into your issue tracker or case notes without paraphrasing away important details. Record the repository, branch, commit, affected component, and date. Separate each distinct claim: a report that lists several files may describe one underlying flaw or several independent ones. Do not edit code yet; first make sure you are investigating the same version the report refers to.
  2. Translate the report into a testable statement. Write down what input or condition is allegedly attacker-controlled, which code handles it, what security boundary is crossed, and what outcome follows. For example: “A user-controlled path reaches file access without containment, allowing access outside the intended directory.” Mark missing links explicitly. Statements such as “this function is unsafe” or “could lead to remote code execution” are not demonstrated attack paths by themselves.
  3. Confirm the code and data flow. Open the cited lines at the recorded revision, then trace callers, inputs, transformations, and the final sensitive operation. Check whether the cited code is active, reachable in the relevant build, and used in the way the report claims. Look for validation, authorization checks, escaping, canonicalization, safe API usage, and error handling in surrounding code. A nearby safeguard may invalidate the report, but verify that it applies to this exact path and cannot be bypassed.
  4. Check prerequisites and trust boundaries. Determine who can supply the input, what permissions they have, and whether the feature is enabled in the affected configuration. Establish whether data crosses a boundary—for example, from an untrusted request into a database query, command, template, file path, or privileged operation. Distinguish an attacker-controlled value from a constant, administrator-only setting, or already validated internal value. Do not assume a threat scenario that the application does not support.
  5. Reproduce the behavior safely. Prefer a focused unit or integration test, a local harness, or a non-destructive request in an authorized test environment. Use the smallest input that demonstrates the claimed effect, and compare it with a benign control case. Avoid destructive payloads, real user data, external targets, or actions that could expose secrets or disrupt service. If the report provides a reproduction, inspect it before running it; scripts and commands can have side effects.
  6. Check whether the result proves impact. A crash, unusual response, or suspicious-looking string is not automatically a vulnerability. Confirm the security-relevant outcome: for example, whether access was actually unauthorized, a query’s meaning changed, a command executed, or sensitive data became available. Consider existing protections and deployment controls, but do not treat an unverified downstream safeguard as a fix. Save only the minimum evidence needed, with secrets and personal data redacted.
  7. Review nearby history and existing coverage. Search for related tests, prior fixes, duplicate reports, and code that handles the same input elsewhere. Check the dependency and configuration versions relevant to the affected deployment. A matching test can help explain intended behavior, but it does not prove the path is safe unless it covers the reported condition. Note whether the issue is already fixed in another branch or only appears in a specific configuration.
  8. Assign a triage outcome with reasons. Use your team’s categories, such as confirmed, likely, needs more evidence, not reproducible, duplicate, or false positive. Record the evidence and remaining uncertainty. Assess severity using demonstrated impact, required access, exploitability, and scope—not the report’s label alone. If evidence is incomplete, keep the issue open for investigation rather than declaring it safe or changing code speculatively.
  9. Only then plan a code change. For a confirmed issue, identify the smallest robust mitigation at the correct trust boundary, and add a regression test that fails before the fix and passes after it. Review compatibility and alternate paths, then follow normal code review and release procedures. If the report is unconfirmed, document what would resolve the uncertainty and assign a follow-up owner instead of making a broad defensive change without understanding its effect.

Common Mistakes

  • Trusting a severity score or confident wording instead of independently checking the attack path.
  • Reading only the cited line and missing the caller, guard, configuration, or downstream operation that changes the claim.
  • Calling a report false positive because one reproduction failed, without checking the exact revision, environment, permissions, or prerequisites.
  • Treating a theoretical bad value as attacker-controlled when validation or access restrictions prevent it from reaching the code.
  • Running unreviewed proof-of-concept commands against production or with real credentials.
  • Editing code before capturing baseline behavior, which can obscure whether the original claim was valid.

Tips

  • Keep a compact evidence log: claim, source location, input origin, path to impact, reproduction result, and decision.
  • Use a clean checkout of the reported revision and reproduce with the documented configuration before trying variations.
  • Ask a second reviewer to challenge the threat model and evidence for high-impact or ambiguous findings.
  • Separate confidence from severity: a potentially severe issue can still be unverified, and a confirmed issue can have limited impact.
  • When you cannot reproduce, record what you tried and what differs from the report. “Could not reproduce” is more useful than “not a bug.”

Troubleshooting

The cited lines do not match: Verify the commit, branch, generated-code status, and whether the report used a different checkout. Search for the function or symbol rather than relying on line numbers, then record the actual location.

The reproduction fails: Check prerequisites, feature flags, dependencies, permissions, and input encoding. Confirm that the test reaches the claimed code path; add temporary logging or a debugger in a local environment if needed. If a required environment is unavailable, mark the finding unresolved and ask for the missing details.

You see suspicious behavior but cannot establish impact: Trace the value to the security-sensitive operation and determine whether a boundary is crossed. Consult the component owner or security reviewer rather than escalating based only on a warning or crash.

The report includes potentially harmful commands: Do not run them as-is. Inspect every command, remove network or destructive actions, and recreate the test in an isolated, authorized environment. If safe reproduction is not possible, request a harmless minimal test case.

Different reviewers disagree: Compare the exact threat model, assumptions, and observed evidence. Record the disagreement and the specific fact that would resolve it; escalate according to your organization’s security process when impact may be significant.

Frequently Asked Questions

Should I fix every AI-generated report?
No. Validate the affected code path and impact first. Fix confirmed vulnerabilities; document false positives and keep uncertain cases open with a clear next step.

Can a report’s severity rating be trusted?
Use it as a starting point only. Reassess severity using demonstrated impact, reachability, attacker prerequisites, and the affected deployment.

What if I cannot reproduce the issue?
Check the revision and environment, then verify that your test reaches the claimed path. Record the conditions tried and request missing reproduction details rather than assuming the claim is false.

Should I test the report in production?
Not unless your organization has explicitly authorized a safe production test. Prefer local or staging environments, and avoid actions that could alter data, expose secrets, or disrupt service.

When should code changes begin?
After the claim is sufficiently verified to identify the cause and intended security boundary. Then add a regression test and review the fix for alternate paths and compatibility.

What evidence should the issue record contain?
Include the affected revision, code path, input source, relevant prerequisites, safe reproduction or analysis, observed impact, uncertainty, and the reason for the triage decision. Redact sensitive data.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →