AI finding tag. Findings that pass the agent’s validation also have the True Positive finding tag.
The detection agent doesn’t report findings whose only issue is a hardcoded secret, and it redacts secret values in finding text. See Secrets scanning to find hardcoded secrets.
Each finding includes the vulnerable code location and a data flow trace from source to sink. It also includes an attack vector, an assessment of security controls, and a CWE classification with severity based on your application’s context. High and critical findings show an exploit reproduction in place of the attack vector, and also include remediation guidance.
To improve detection results, you can add AI context rules that give the agent codebase-specific guidance to read during the scan. See Improve AI SAST results with context to use rules and feedback before and after a scan.
To run an AI SAST detection agent scan:
- Enable the AI SAST - Detection rule in finding policies.
-
Run the following command.
Language support
The AI SAST detection agent supports the following languages:- C
- C++
- C#
- Go
- IaC YAML
- Gosu
- Java
- JavaScript
- Kotlin
- Python
- Ruby
- Rust
- Scala
- Swift
- TypeScript
Scan AI agent skills
Beyond application source code, the AI SAST detection agent analyzes AI agent skill files, such asSKILL.md, AGENTS.md, and CLAUDE.md, for security weaknesses. The instructions and supporting scripts that a skill directs an agent to run can introduce risk on their own. The agent therefore treats these files as scan targets rather than configuration.
The detection agent flags skill issues such as:
- Unsafe shell command construction in supporting scripts.
- Plaintext secret or token handling in skill instructions.
- Risky external installs, such as pulling
@latestfrom an untrusted source.
AI finding tag, the same as findings from application code. It is distinct from skill scoring, which discovers installed skills and assigns a risk score rather than generating findings.
Files the detection agent skips
The detection agent skips code that you don’t maintain or that isn’t part of your application, so findings focus on your own source. It skips the following files by default:- Test files.
- Mock code. This covers folders named
mock,mocks, or__mocks__, folders whose names end inmock,mocks,Mock, orMocks, such asapimocksorApiMock, and the filesmock.go,mock_*.go,*_mock.go,*.mock.ts, and*.mock.js. - Gradle build output under
build/intermediates,build/generated,build/kspCaches, andbuild/tmp. Other files underbuild/folders are still scanned, because some projects keep source code in a folder namedbuild. - Vendored and third-party code, such as
node_modules,vendor,third_party,3rdparty,_deps,site-packages, andPodsfolders. - Copies of third-party JavaScript libraries in your repository.
- Generated code, such as protocol buffer, gRPC, and other generated source files, and the files listed in an OpenAPI Generator
.openapi-generator/FILESmanifest. To turn off generated code detection, setENDOR_AI_SAST_DISABLE_GENERATED_CODE_DETECTION=true. - Source files over 2 MB, other files over 256 KB, and minified or data files over 64 KB that have long lines.
- Lock files, minified JavaScript bundles, and documentation files such as
*.mdand*.txt. The agent still scans AI agent skill files, as described in Scan AI agent skills.
AI detection process
The AI detection agent uses a large language model (LLM) with full-repository context to systematically discover vulnerabilities.1
Index the repository
Scan the entire codebase and build a semantically searchable representation. The agent generates file hashes, function hashes, and embeddings to capture the intent of every function. It stores them with metadata such as callers and file locations. Maximum coverage at this stage minimizes false negatives later in the pipeline.If the scan runs with the
--disable-code-snippet-storage flag, the stored embeddings exclude source code excerpts. They keep function metadata such as the name, file path, summary, data flow, and security role. Functions indexed before you set the flag keep their excerpts until the function changes.2
Analyze application context
Read deployment files such as Dockerfiles, Kubernetes manifests, and CI configurations to understand the application’s exposure and the framework mitigations in place. Skip files that cannot produce SAST findings, such as non-executable files. The agent uses these prioritization signals to focus security analysis on the functions that matter.
3
Run security analysis
Review the behavior of prioritized code using LLM-based reasoning with full-repository context. The agent traces reachability to confirm whether code actually calls the vulnerable paths. It follows source-to-sink chains across functions and files, and detects sanitizers or other stopping logic that may prevent exploitation.
4
Generate findings
Emit confirmed vulnerabilities as new findings labeled with the
AI finding tag and treated as true positives. Each finding includes an attack vector that names the entry point, what the attacker controls, and the impact.5
Classify findings
Map each finding to a CWE and assign a severity based on the context of the application rather than the CWE category alone. An AI context rule can set or limit the severity. The agent doesn’t assign CWEs that MITRE prohibits for vulnerability mapping.
6
Add exploit and remediation details
For high and critical findings, replace the attack vector with a concrete exploit payload and reproduction steps. Also generate a code-change diff that fixes the vulnerable code. If this step fails, the agent keeps the finding without these details.
AI SAST on merge-to-main scans
A scan taggedmerge-to-main runs AI SAST only after the target branch has a completed AI SAST index. Until then, the scan skips AI SAST and logs Skipping ai-sast scan - merge-to-main scan: the target branch has no completed AI SAST index yet. A scheduled scan of the target branch builds the first index, and later merge-to-main scans run AI SAST.
View AI SAST detection agent findings
The AI detection agent generates new SAST findings by identifying security vulnerabilities beyond traditional rule-based detection. The agent labels each finding with anAI finding tag, the CWE associated with the vulnerability, and a severity based on the application context.
To view AI SAST detection agent findings:
- Select Findings > SAST from the left sidebar.
- Use the Attributes filter and select Yes under the AI SAST filter to view findings generated by the AI detection agent. To view only the findings that the agent validated, select True Positive under AI Analysis.
- Select a finding.
-
Select Info to view the agent’s analysis and supporting evidence for the finding. A section appears only when the agent produced content for it.
- First Introduced: When the finding was first introduced.
- Project: The project that contains the finding.
- Summary: An agent-generated title and an explanation of the vulnerability, including the affected function, the untrusted input it consumes, and the potential impact.
- Code: The vulnerable code location, with the file path, line numbers, and the relevant code snippet.
-
Data Flow: A trace of the issue across the code locations involved. Each stage has a role label and shows the location, a short description, and the relevant code snippet. A finding can have more than one stage of the same role.
- Source: Where untrusted input enters the application.
- Propagation: How the code passes or transforms the input as it moves toward the sink.
- Sink: Where the input reaches the vulnerable operation.
- Security Controls: The controls relevant to the finding, with the number of controls shown next to the section name. Each control shows a status of Present, Missing, Weak, or N/A and a short rationale that can link to the relevant code. The specific controls depend on the vulnerability, such as input validation, sanitization, secrets management, or access control.
- Attack Vector: How an attacker reaches the vulnerability, what the attacker controls, and the impact. High and critical findings show an exploit reproduction instead.
- Verification Scorecard: Each criterion the agent verified, the evidence drawn from the code, and the resulting verdict such as confirmed, refuted, or not applicable.
- Score Vector: The Severity line with the severity of the finding and the reason for it. The agent sets the severity from the impact that it confirmed during validation. An AI context rule that covers the finding decides the severity. Findings from earlier scans can show an older format with seven scoring factors and a numeric score. The refresh of findings updates the severity of a stored finding but not this section. The severity in the older text can then differ from the severity of the finding. The severity at the top of the finding is current.
- Validation Outcome: Why the agent could not confirm or refute the finding. It appears only on findings that validation left inconclusive.
- Metadata: Classification details such as the CWE ID, affected languages, and SAST tags applied to the finding.
--disable-code-snippet-storageflag, the agent does not generate exploit reproduction or remediation. -
Select Exploit to view the exploit reproduction.
- Exploit Path: The chain of code locations an attacker traverses from the entry point through propagation to the vulnerable sink.
- Impact: The security impact of the exploit, such as its effect on confidentiality, integrity, and availability.
- Steps to Reproduce: Ordered steps that trigger the vulnerability.
- Bash Script: A runnable script that reproduces the exploit. It appears only when an attacker can trigger the issue directly, such as with an HTTP request, a CLI command, or a crafted file.
- Concrete Values: The specific raw and encoded values used to reproduce the exploit. It appears only when the Bash Script appears.

-
Select Remediation to view a short explanation of the recommended fix and a unified diff that applies it. To triage findings and apply approved fixes with an agent, use the AI SAST Remediation agent in the Agents Hub.

OWASP Top 10 for LLM Applications tags
Endor Labs adds SAST tags, such asOWASP-Top-10 and SANS-Top-25, to each finding based on its CWEs. A finding also has the OWASP-LLM-Top-10 tag and the matching OWASP Top 10 for LLM Applications 2026 entry tags when one of its CWEs appears in the following table. Rule-based SAST rules that list these CWEs also get these tags.
Only these AI-specific CWEs have the OWASP LLM tags. Other CWEs that OWASP lists for an entry, such as CWE-200, do not, because they also occur outside AI applications.
To act on these findings, enter OWASP-LLM-Top-10 or an entry tag such as LLM01:2026 in the SAST Tag field of an action policy or an exception policy.
Give feedback on AI SAST findings
After you review a finding, tell the detection agent whether its analysis was correct. The agent reads the feedback on a project’s findings during later scans, together with your AI context rules. It uses the feedback to confirm similar vulnerabilities and dismiss similar false positives. When feedback and an AI context rule disagree, the rule takes precedence. A thumbs down whose comment disputes only the severity or the wording does not make the agent treat the finding as a false positive. To give feedback on an AI SAST finding:- Select Findings > SAST from the left sidebar.
- Select an AI SAST finding to open the finding details panel.
-
Select a feedback button at the top of the panel.
- Give positive feedback (thumbs up): Confirms that the analysis is correct. Endor Labs saves the feedback immediately.
- Give negative feedback (thumbs down): Reports that the analysis is wrong. Endor Labs opens the Report an Incorrect Result dialog.

- If you selected thumbs down, enter a comment of up to 1,024 characters that explains what the analysis got wrong, and select Save.
Refresh of findings
By default, a stored finding keeps its verdict until a scan re-evaluates the function that produced it. The refresh re-evaluates stored findings on the default branch during default branch scans. This keeps them aligned with your current code and guidance. The refresh is on by default and runs on every scan of the default branch, even when the code has not changed since the last scan. This includes scheduled scans, scans that you start yourself, and scans that run when a pull request merges. It does not run on PR scans,--diff-scope scans, or dry runs. To turn it off for a project, add ENDOR_SCAN_AI_SAST_REFRESH=false to the additional environment variables of the project’s scan profile.
On each default branch scan, the agent re-evaluates a finding when any of the following conditions is true:
- The code the finding depends on has changed. This covers the vulnerable function, its data flow regions, and the functions it calls.
- Your AI context rules or reviewer feedback has changed since the agent last evaluated the finding.
- The agent last evaluated the finding more than 30 days ago. Set
ENDOR_SCAN_AI_SAST_REFRESH_INTERVALto change this interval, for example168hfor seven days.