Intelligent Security Scanning in Practice: From Vulnerability Discovery to Verified Fixes

    This article explains how intelligent security scanning can move from producing alerts to finding vulnerabilities that are verifiable, fixable, and security-relevant. It reviews how to interpret the reported results of a two-week scan, why AI-assisted auditing can reach cross-module logic that manual review may miss, how to turn code suspicions into validated evidence using a use-after-free example, and how to set up a workflow covering deduplication, validation, and fixes.

    1. Two Weeks, 14 High-Severity Vulnerabilities: How to Read the Results

    In complex software, the value of intelligent security scanning does not come from how many alerts a model produces. What matters is whether it can identify issues that are verifiable, fixable, and carry real security impact.

    The source case covers nearly 6,000 source files over about two weeks. The scan submitted 112 reports and confirmed 22 vulnerabilities: 14 high severity, 7 medium, and 1 low. The first issue was found about 20 minutes after the scan started.

    These numbers show the potential of AI-assisted vulnerability discovery. However, they are the statistics as described in the original case material, and this article has not independently reproduced them. Without the full scan configuration, resource investment, vulnerability details, and validation records, the same results cannot be assumed for every project.

    For R&D and security teams, these figures should be read at three levels.

    First, scan coverage is not audit depth. Reading a file does not mean every execution path that involves that file has been understood. Complex defects often cross module boundaries and involve object lifecycles, exception handling, callback behavior, and concurrent state.

    Second, the number of reports is not the number of independent vulnerabilities. Several reports may point to the same root cause, and one vulnerability may have multiple trigger entry points. Statistics must therefore distinguish raw alerts, deduplicated candidate issues, and confirmed vulnerabilities.

    Third, severity does not equal reliable exploitability. A defect may have high potential impact, but actual exploitation still depends on trigger conditions, memory layout, permission boundaries, and the runtime environment.

    The value of intelligent security scanning should be measured by its evidence chain and governance outcomes, not by how many high-severity findings it reports.

    2. Why Intelligent Scanning Can Find Issues Traditional Audits Miss

    Mature software that has been tested for years can still contain security defects. The cause is not necessarily insufficient testing. The state space of large software is simply very large.

    1. Locally correct code does not guarantee safe cross-module behavior

    A function may contain no obvious error internally, yet its object state may change when it calls other modules. For example, a piece of logic may store an object pointer and then call a function that allows callbacks. If the callback frees the object, and the original logic continues to use the old pointer after returning, the result is a lifecycle defect.

    Traditional pattern matching is good at identifying clearly dangerous code. It does not always reason about whether conditions that held before a call still hold after it.

    Intelligent analysis adds value by combining types, call context, comments, and neighboring implementations to propose cross-function hypotheses. A hypothesis, however, is only a starting point. Static analysis, runtime detection, and manual review must still provide the evidence.

    2. Performance optimizations often introduce implicit assumptions

    Just-in-time compilation, cache reuse, object pools, and deferred reclamation all rely on a set of preconditions. For example:

    • The object type stays stable during a given execution period.
    • The buffer length matches the boundary information in the cache.
    • A specific operation does not trigger reentrancy.
    • After a check completes, related state is not modified by other paths.

    When an optimized path reuses stale state, normal input may not expose the problem. A specific combination of operations may break these assumptions.

    Intelligent auditing should therefore ask more than “Is there a bounds check here?” It should also ask, “After the check, could the boundary condition become invalid?”

    3. Automation can widen the search for candidate issues

    Manual audits usually prioritize high-risk modules and struggle to cover every similar but not identical call path. Automated analysis can repeat pattern searches, context collection, and candidate validation at low marginal cost.

    Automation also amplifies false positives. Without clear evidence requirements, a model may treat a theoretical risk as a real vulnerability, or overlook a security check already completed in a deeper function.

    A more reasonable role for the model is to explore candidate paths. Deterministic tools and human judgment then converge on the conclusions.

    3. Use-After-Free as an Example: From Code Suspicion to Evidence

    Use-after-free occurs when a program accesses memory through a leftover reference after the object’s lifetime has ended. It can cause crashes and data corruption. Under specific conditions, it may also have more serious security consequences.

    The following pseudocode illustrates only the structure of the risk:

    1. object = get_object()
    2. old_ref = object.internal_data
    3. perform_operation_that_may_trigger_callback()
    4. use(old_ref)

    This code alone does not prove that a vulnerability exists. The key question is whether the intermediate operation can free the object, replace its internal data, or invalidate the old reference.

    1. Prove that the reference is actually invalid

    The audit needs to trace object creation, ownership, release, and access paths. It should answer these questions:

    • Who owns the object, and who is responsible for ending its lifetime?
    • Is there any extra lifetime protection during the call?
    • Could the callback modify the object’s state, directly or indirectly?
    • Is the old reference used only while the object is still valid?
    • After the object is released, can the later access path still be reached?

    If reliable lifetime protection exists, the presence of a callback alone does not establish a vulnerability.

    2. Prove that the path can be triggered

    A code path existing does not mean external input can reach it. Validation needs to explain how input enters the relevant module, which state conditions must be met, and whether the issue depends on special build options or non-default configurations.

    For software that processes untrusted content, distinguish between issues triggered by ordinary input, issues that require specific privileges, and issues reachable only through internal test interfaces.

    3. Distinguish crashes, memory corruption, and code execution

    Detecting an illegal memory access is usually enough to prove a memory safety problem. It does not automatically support the conclusion that an attacker can execute arbitrary code.

    Assessing impact requires analyzing the access type, the scope of data the attacker controls, the conditions under which memory is reused, and existing protection mechanisms. Reports should separate observed facts, reasonable inferred impact, and unverified exploitation conditions, so that speculation is not presented as settled fact.

    4. Building a Workable Intelligent Scanning Process

    Step 1: Fix the scanning baseline

    Before scanning, save the source code version, dependency state, build configuration, and test conditions. Otherwise, the model may analyze one version while validators run another, which leads to disputes that cannot be reproduced.

    Define the handling boundaries for code as well. For sensitive source code, evaluate data transmission, access permissions, log retention, and how results are stored. Do not assume all code is suitable for an external inference environment.

    Step 2: Divide scanning into risk-based units

    Avoid giving a model an entire repository with the instruction “find all vulnerabilities.” A more effective approach is to organize tasks around risk themes, such as:

    • Parsing untrusted input and computing lengths;
    • Object ownership and lifecycle changes;
    • State assumptions in compiler optimizations;
    • Synchronization of objects shared across threads;
    • State changes between a permission check and the actual operation.

    Each task should include the necessary type definitions and key callers and callees. The analysis should be able to gather more context, so conclusions are not drawn from isolated fragments.

    Step 3: Generate structured candidate reports

    Each candidate report should contain at least the issue location, root cause explanation, trigger preconditions, relevant call paths, potential impact, and current validation status.

    Reports should also clearly separate:

    • Issues verified by running the code;
    • Issues with complete code evidence but no runtime reproduction yet;
    • Issues with only preliminary suspicion that still need more context.

    This layering keeps every output from being labeled a “vulnerability” and helps set validation priorities.

    Step 4: Reproduce in an isolated environment

    Run candidate samples in an environment that can be destroyed, with low privileges, restricted network access, and limited resource usage. Even an input meant only to trigger a cr