Install
openclaw skills install llm-sast-scannerGeneral-purpose Static Application Security Testing (SAST) skill for code vulnerability analysis. Trigger when the user asks to: "analyze code for vulnerabilities", "review code security", "find security bugs", "do a SAST scan", "check for [vulnerability type] in code", "audit source code", or requests a security code review of any language or framework. Covers 34 vulnerability classes across web, API, auth, mobile, and logic layers.
openclaw skills install llm-sast-scannerSystematically analyze source code for security vulnerabilities using structured Source→Sink taint tracking, pattern matching, and vulnerability-class-specific detection heuristics. Produce actionable findings with severity ratings, affected code locations (file + line number), and remediation guidance.
This skill covers the following 34 vulnerability classes. Each has a dedicated reference file loaded on demand:
| Category | Vulnerabilities |
|---|---|
| Injection | SQL Injection, XSS, SSTI, NoSQL Injection, GraphQL Injection, XXE, RCE / Command Injection, Expression Language Injection |
| Access Control & Auth | IDOR, Privilege Escalation, Authentication/JWT, Default Credentials, Brute Force, Business Logic, HTTP Method Tampering, Verification Code Abuse, Session Fixation |
| Data Exposure & Crypto | Weak Crypto/Hash, Information Disclosure, Insecure Cookie, Trust Boundary |
| Server-Side | SSRF, Path Traversal/LFI/RFI, Insecure Deserialization, Arbitrary File Upload, JNDI Injection, Race Conditions |
| Protocol & Infrastructure | CSRF, Open Redirect, HTTP Request Smuggling/Desync, Denial of Service, CVE Patterns |
| Language/Platform | PHP Security, Mobile Security (Android/iOS) |
Determine:
Based on the code being reviewed, load the appropriate reference files from references/:
references/sql_injection.md — SQL / ORM injection
references/xss.md — Cross-site scripting
references/ssrf.md — Server-side request forgery
references/rce.md — Remote code execution
references/idor.md — Insecure direct object reference
references/authentication_jwt.md — Auth flaws, JWT weaknesses
references/csrf.md — Cross-site request forgery
references/path_traversal_lfi_rfi.md — Path traversal, LFI/RFI
references/ssti.md — Server-side template injection
references/xxe.md — XML external entity
references/insecure_deserialization.md — Insecure deserialization
references/arbitrary_file_upload.md — Arbitrary file upload
references/privilege_escalation.md — Privilege escalation
references/nosql_injection.md — NoSQL injection
references/graphql_injection.md — GraphQL injection
references/weak_crypto_hash.md — Weak cryptography / hash
references/information_disclosure.md — Information disclosure
references/insecure_cookie.md — Insecure cookie attributes
references/open_redirect.md — Open redirect
references/trust_boundary.md — Trust boundary violations
references/race_conditions.md — Race conditions / TOCTOU
references/brute_force.md — Brute force / credential stuffing
references/default_credentials.md — Default / hardcoded credentials
references/verification_code_abuse.md — Verification code abuse
references/business_logic.md — Business logic flaws
references/http_method_tamper.md — HTTP method tampering
references/smuggling_desync.md — HTTP request smuggling / desync
references/cve_patterns.md — Known CVE patterns
references/expression_language_injection.md — Expression language injection (SpEL / OGNL)
references/jndi_injection.md — JNDI injection (Log4Shell class)
references/denial_of_service.md — Denial of service / resource exhaustion
references/php_security.md — PHP-specific security issues
references/mobile_security.md — Mobile security (Android / iOS)
references/session_fixation.md — Session fixation
Loading strategy:
For each loaded vulnerability class, perform taint analysis:
Identify Sources — User-controlled input entry points:
Trace Data Flow — Follow the data through:
Check Sinks — Dangerous operations receiving tainted data:
Evaluate Sanitization — Between source and sink, look for:
Determine Preliminary Verdict:
Beyond taint tracking, check for:
Before reporting, every preliminary finding (VULN or LIKELY VULN) must pass a Judge review. The Judge acts as an adversarial second opinion to eliminate false positives.
For each candidate finding, answer all of the following:
| Verdict | Meaning | Action |
|---|---|---|
| CONFIRMED | All reachability/sanitization/exploitability checks pass | Include in report |
| LIKELY | Most checks pass; one uncertainty remains | Include in report, flag uncertainty |
| NEEDS CONTEXT | Cannot determine without runtime behavior / config / additional files | Note as "unverifiable without X" |
| FALSE POSITIVE | Positive evidence of protection found — cite the exact file+line of the sanitization, allowlist check, guard, or framework-level auto-protection that makes the sink safe | Drop silently |
Only CONFIRMED and LIKELY findings are reported.
FP burden of proof: UNCERTAIN on any check is NOT sufficient to declare FALSE POSITIVE. If a check result is UNCERTAIN after inspecting the sink, its callers, and the framework internals, use NEEDS CONTEXT instead. Only use FALSE POSITIVE when you have found and can cite positive evidence that the path is protected.
Finding: VULN-NNN — <class>
Reachability: PASS / FAIL / UNCERTAIN — <reason>
Sanitization: PASS / FAIL / UNCERTAIN — <reason>
Exploitability: PASS / FAIL / UNCERTAIN — <reason>
Judge Verdict: CONFIRMED / LIKELY / NEEDS CONTEXT / FALSE POSITIVE
Tags
default_credentials: require a reachable auth path that accepts the hardcoded credential.weak_crypto_hash: require direct use of weak hash/algo — not just an import or third-party component. Covers both weak algorithms (DES, RC4, ECB) and weak hashes (MD5, SHA-1 for passwords); do not use weak_crypto as a separate tag.rce → prefer command_injection for direct shell/process execution. Do not replace spel_injection with rce/command_injection.jndi_injection in demos: only if the JNDI sink is the primary exploit path.trust_boundary, authentication, privilege_escalation): prefer the narrowest valid tag (xff_spoofing, session_fixation, verification_code).open_redirect: only if the attacker-controlled redirect is the primary exploit (not infra/parser misconfiguration).csrf: skip for stateless Bearer-token-only APIs (SessionCreationPolicy.STATELESS).insecure_deserialization: skip if component_vulnerability covers the same sink.arbitrary_file_upload: skip for avatar/profile upload with type restrictions and non-webroot storage.session_fixation: skip when Spring Security default session management is active.information_disclosure: skip for DB credentials in config files — deployment issue, not app-level.Scope
examples/, demo/, sample/ (or similar). Report only if the bug is in the library/SDK itself.Low. Explicitly labeled legacy or deprecated in code/docs → cap Informational.Trust Boundary
--file, --url, --chain-id), or commands the operator must explicitly run.privilege_escalation/business_logic for actions behind onlyAdmin/onlyOwner/onlyPoolAdmin when that role is trusted by design. Only report if an unprivileged user can reach the same path.authentication and information_disclosure when the entire codebase has zero auth AND references internal infra (VPC vars, EC2_INSTANCE_ID, Eureka, Consul). Auth is at the network layer.injection/path_traversal/rce for codegen tools (protoc, swagger-codegen, etc.) whose input comes from developer-controlled source comments, annotations, or local config.Protocol & Architecture
ssrf when fetching a peer-supplied URL is required by spec (LNURL, UMA, OAuth discovery, WebFinger, OIDC discovery). Only report if the impl allows schemes the protocol does not require (e.g., file://) or skips required domain validation.Informational when all three hold: (a) response never reaches the attacker, (b) no meaningful side effect on the target, (c) no error oracle.denial_of_service unless the upper bound of the iterated/allocated data is attacker-controllable and unbounded. Naturally bounded data (blockchain validator set, gas limits, etcd/request-body size caps) → not a finding.brute_force only if rate limiting is visible in code, framework config, or referenced middleware in the repo. Do not assume infrastructure-level rate limiting.business_logic when the operation is idempotent AND parameters are cryptographically signed (no tampering possible).NEEDS CONTEXT, not a finding.Platform
insecure_storage/information_disclosure for SharedPreferences/DataStore in app-private storage without android:allowBackup="true" in a production manifest.information_disclosure for providers writing secrets to state when attributes are marked Sensitive: true.supply_chain for mutable action tags (e.g., @v3) when the action org matches the repo org. Only report third-party org actions.authentication for README-described local dev tools with no production docs. Exception: report (reduced severity) if the tool does not bind to localhost, exposes tokens in API responses, or allows destructive ops.Sensitive: true — by design?| Severity | Criteria |
|---|---|
| Critical | Direct RCE, authentication bypass, unauthenticated data exposure |
| High | SQLi, SSRF, IDOR with sensitive data, stored XSS, privilege escalation |
| Medium | Reflected XSS, CSRF, path traversal, insecure deserialization |
| Low | Information disclosure, open redirect, weak crypto, insecure cookie |
| Info | Missing security headers, verbose errors, defense-in-depth gaps |
Severity Downgrade Rule: When exploitation requires authentication, specific non-default configuration, chained prerequisites, or is only reachable through an internal/admin-only path, downgrade severity by one level from the class default; LIKELY-verdict findings whose exploitability is marked UNCERTAIN must be capped at one level below the class default regardless of vulnerability type.
[SEVERITY] VULN-NNN — <Vulnerability Class> [CONFIRMED | LIKELY]
File: <path>:<line_number>
Description: <one sentence — what the vulnerability is>
Impact: <what an attacker can achieve>
Evidence:
<relevant code snippet>
Judge: <one sentence — why this passed re-verification>
Remediation: <specific fix — not generic advice>
Reference: references/<vuln>.md
For NEEDS CONTEXT findings:
[UNVERIFIABLE] VULN-NNN — <Vulnerability Class>
File: <path>:<line_number>
Blocked by: <what additional context is needed>
When producing a full report, write to sast_report.md (or user-specified path):
# SAST Security Report — <target>
Date: <date>
Analyzer: llm-sast-scanner v1.3
## Executive Summary
<2-3 sentences: total findings by severity, most critical issue>
## Critical Findings
## High Findings
## Medium Findings
## Low Findings
## Informational
## Unverifiable Findings
## Remediation Priority
<ordered fix list>