/appsec:appsec-dast-simfrom appsec
LLM-based DAST simulation following OWASP WSTG v4.2. No containers, no running app required — works at design time by reading the codebase. Enumerates all API endpoints and routes, walks every WSTG v4.2 test category, inspects relevant code (auth middleware, input handling, session logic, business rules), generates specific test probes (curl commands, payload examples), and reports findings grouped by severity. Use when the user says: "DAST scan", "OWASP security review", "WSTG check", "web security audit", "security code review", "OWASP top 10 check", "audit my API", "is my API secure", "review my endpoints". Also activate for a SINGLE WSTG area and cover only that one (Phase 0 routes): Auth — "check auth security", "is my login secure", "authentication review"; Access control — "authorization check", "can users access other users' data", "IDOR", "privilege escalation"; Sessions — "check session handling", "cookie security", "session fixation"; Injection — "find XSS or SQLi", "injection vulnerabilities", "SSRF", "XXE", "command injection", "is my input validated"; Crypto — "crypto review", "am I hashing passwords properly", "TLS check"; Business logic — "business logic vulnerabilities", "can this flow be abused"; API — "API security audit", "GraphQL security", "REST security review"; Config — "security misconfiguration", "check my headers", "CORS review". Do NOT activate for general code review, unit testing, linting, or container scanning.
Trending skills
7-day visitors to each skill page
Ships in appsec. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
LLM-based Dynamic Application Security Testing simulation. Works entirely from the source tree — no running app, no scanner containers required. Walks the full OWASP Web Security Testing Guide v4.2 checklist and produces actionable findings with curl probes and remediation guidance.
WSTG quick reference: reference/wstg-v42-checklist.md (vendored locally).
Set WSTG_SCOPE from the user's words before reading any code. Phase 1 always
runs — you cannot review what you have not enumerated.
| The user asked about | WSTG_SCOPE | Phases |
|---|---|---|
| login, auth, passwords, MFA, tokens | AUTHN | 3 |
| permissions, IDOR, "other users' data", privilege escalation | AUTHZ | 4 |
| sessions, cookies, logout, fixation | SESS | 5 |
| XSS, SQLi, SSRF, XXE, command injection, input validation | INPV | 6 |
| crypto, hashing, TLS, encryption at rest | CRYP | 8 |
| business logic, workflow abuse, race conditions | BUSL | 9 |
| REST, GraphQL, API security | APIT | 10 |
| headers, CORS, TLS config, exposed admin panels | CONF | 2 |
| errors, stack traces, information leakage | ERRH | 7 |
| everything, full review, OWASP audit, bare invocation | ALL | 2–10 |
| anything you are not sure about | ask — below |
When unsure, ask — never guess. Use AskUserQuestion with multiSelect: true.
Label by what a developer would recognise, not by WSTG code:
Everything (recommended) — the full OWASP WSTG v4.2 checklistLogin and access control — who can sign in, and what they can reach (AUTHN + AUTHZ)Untrusted input — XSS, SQL injection, SSRF, command injection (INPV)Sessions and cookies — how sessions are issued, stored, and revoked (SESS)API surface — REST and GraphQL specifics (APIT)Configuration and secrets handling — headers, CORS, crypto, error leakage (CONF + CRYP + ERRH)Run Phase 1, then only the phases the scope selects. In the Phase 11 coverage table,
mark every phase you skipped as SKIP (out of requested scope) — never as PASS.
A scoped review is not an OWASP pass; say so when you report.
Read the codebase to build a complete inventory of attack surface. Look in:
app.js, server.js, src/routes/, src/controllers/, any file
with router.get, router.post, app.get, app.post, router.use@RestController, @GetMapping, @PostMapping, @RequestMapping
annotated classesurls.py, views.py, @app.route, @blueprint.route@app.get, @app.post, @router.get decorated functionsconfig/routes.rb, controllers in app/controllers/*.graphql, *.gql), resolver filesopenapi.yaml, swagger.json — parse all paths and methodsFor each endpoint, record:
/users/:id)Output a numbered endpoint inventory before proceeding.
Look for debug/admin endpoints that should not be reachable in production:
Search for routes or middleware mounting:
/actuator, /actuator/** (Spring Boot Actuator)/debug, /__debug__, /debug-toolbar/swagger-ui, /swagger-ui.html, /api-docs, /v2/api-docs, /v3/api-docs/graphiql, /graphql-playground, /altair/metrics, /health, /info (when exposed without auth)/_admin, /admin, /internalCheck: are these routes protected by auth middleware in production config? Is there
a NODE_ENV === 'production' guard or equivalent?
Finding format if unprotected:
[WSTG-CONF-01] Debug/admin endpoint exposed without production guard
Severity: HIGH
File: <file>:<line>
Endpoint: GET /actuator/env
Issue: Actuator endpoint mounted unconditionally — exposes environment variables and config in production.
Probe: curl -X GET http://localhost:8080/actuator/env
Remediation: Guard with auth middleware or disable in production profile.
Check framework config files (application.properties, application.yml,
settings.py, config/environments/production.rb, .env.example) for:
DEBUG=True / debug: true / FLASK_DEBUG=1 set as default or in production configserver.error.include-stacktrace=always)logging.level.root=DEBUG in prod config)For each endpoint, check whether HTTP methods are explicitly restricted. Look for:
@RequestMapping(method = RequestMethod.GET) narrowingrouter.all() or app.use() without method guards on sensitive pathsSearch middleware stack and response headers for HSTS configuration:
helmet(), helmet.hsts(), Strict-Transport-Security header settingmax-age >= 31536000 (1 year)includeSubDomains presentpreload (optional but recommended)If not found or misconfigured, flag as MEDIUM.
Search for CORS setup (cors(), @CrossOrigin, Access-Control-Allow-Origin headers):
*) combined with credentials: true — this is CRITICAL,
browsers will reject it but misconfigurations in custom CORS logic can bypass thisallowedOrigins list — are there overly broad patterns? (*.company.com ok;
reflecting arbitrary Origin header is CRITICAL)allowedMethods — is DELETE or PUT allowed on read-only endpoints?Find file upload endpoints (multipart/form-data, multer, @RequestParam MultipartFile,
request.files). Check for:
Content-Type header checked, or is magic byte
inspection used?)../ in filename)Search for AWS SDK (s3.putObject, s3.getObject), GCS (storage.bucket),
Azure Blob usage. Check for:
ACL: 'public-read' or equivalent on bucket creation/object upload.env.example, config files, or commentsCheck server config and route definitions:
Authorization header or login formssecure: false on auth cookies in production configSearch codebase for hardcoded credentials:
admin, password, secret, test123, changeit, defaultdocker-compose.yml, application.properties,
comments in auth codeAPIKEY=test, TOKEN=example)Find login endpoints (POST to /login, /auth, /signin, /token). Check for:
express-rate-limit, @nestjs/throttler, Django ratelimit)failedLoginAttempts,
lockedUntil fields or equivalent)For every route in the endpoint inventory, verify auth middleware is applied:
Flag any route that handles sensitive data (user profiles, admin functions, payments) without auth middleware as CRITICAL.
Find password creation/change endpoints and validation logic. Check:
zxcvbn, joi, custom regex)Find password reset flow. Check:
crypto.randomBytes(32) or equivalent used? Flag
Math.random(), UUIDs, or timestamp-based tokens as CRITICALSearch for password hashing in user creation/update code:
md5, sha1, sha256 used directly for passwords — CRITICALsha512 without salt — HIGHbcrypt (rounds >= 10), argon2, scrypt, pbkdf2 with ≥ 100k iterationsCompare auth enforcement across:
/api/v1/mobile/) — same middleware stack?Search for file operations using user-supplied input:
fs.readFile, fs.readFileSync, path.join with user inputopen(), read() in Python with user inputFile(), FileInputStream in Java with user inputpath.resolve + prefix check used?Generate probe if found:
Probe: curl -X GET "http://localhost:3000/files?path=../../etc/passwd"
For every endpoint with an object ID in path or query (e.g. /users/:id, /orders/:id):
resource.ownerId === currentUser.id?findById without ownership check?Flag missing ownership checks as CRITICAL with a specific probe showing the ID substitution.
Check for role-based access control implementation:
role or isAdmin a field in the JWT payload or session? Is it verified server-side
against the database, or trusted from the token directly without re-verification?role field in the request body and use it without
server-side role verification?Specifically look for sequential or guessable IDs (integers, short UUIDs) used to reference resources without per-request ownership verification. Look at:
WHERE id = $userInput without AND user_id = $currentUserModel.findById(req.params.id) without scope restrictionCheck JWT implementation:
jwt.sign(), Jwts.builder(), PyJWT.encode()alg validated on decode? Accepting none algorithm is CRITICALkid header sanitized before use in key lookup?Check session tokens:
session.secret loaded from environment (good) or hardcoded (CRITICAL)?Math.random() or uuid() without crypto — HIGHSearch for cookie creation (res.cookie(), response.addCookie(), set_cookie()):
HttpOnly: flag as HIGH (enables XSS cookie theft)Secure: flag as HIGH (transmits over HTTP)SameSite not set or set to None without Secure: flag as MEDIUMCheck login flow: after successful authentication, is a new session ID generated?
req.session.regenerate() called after login?SessionManagement.sessionFixation().newSession() configured?Search for session data or tokens in:
?token=, ?session=, ?auth=)console.log(req.session), logger.debug(token))For every state-changing endpoint (POST, PUT, PATCH, DELETE):
csurf middleware, @EnableWebSecurity with CSRF,
Django's {% csrf_token %}SameSite=Strict or SameSite=Lax set on session cookie (partial mitigation)?Content-Type: application/json only are partially mitigated — check if
Origin or Referer header is validatedMissing CSRF protection on state-changing forms is HIGH.
Check token/session expiry configuration:
expiresIn set? Missing is MEDIUM; value > 24h is LOW (note it)cookie.maxAge or rolling expiry configured?Check if the same session variable name is reused across different authentication flows:
session.userId set during normal login AND during password reset flow — could
allow reset flow to authenticate as a different userFind endpoints that render user input directly in HTML responses:
res.render(), .ejs, .hbs, .pug — look for unescaped output
({{{var}}} in Handlebars, != var in Pug, {{ var | safe }} in Jinja2/Django)innerHTML = userInput in client-side JSProbe: curl -X GET "http://localhost:3000/search?q=<script>alert(1)</script>"
Find endpoints that store user input and later render it:
DOMPurify, bleach, sanitize-html callsSearch for database query construction using string concatenation:
"SELECT * FROM users WHERE name = '" + name + "'" — CRITICALquery("SELECT ... WHERE id = " + req.params.id) — CRITICAL.query(), .raw(), session.execute(text(...)) with f-stringsProbe: curl -X GET "http://localhost:3000/users?name=' OR '1'='1"
Find XML parsing code (DOMParser, javax.xml.parsers.DocumentBuilderFactory,
lxml.etree, xml.etree.ElementTree, libxml2):
factory.setFeature("http://xml.org/sax/features/external-general-entities", false)etree.XMLParser(resolve_entities=False)XmlReaderSettings.DtdProcessing = DtdProcessing.ProhibitLook for server-side include processing or template rendering of user input directly.
Check: does any endpoint pass user-controlled strings through ejs.render(),
Handlebars.compile(), eval(), new Function() at runtime?
Find XPath query construction with user input:
xpath.select("//user[@name='" + username + "']", doc) — CRITICALFind email sending code (nodemailer, smtplib, JavaMail):
To, CC, BCC, or Subject field constructed from user input without sanitization?Search for dynamic code execution:
eval(userInput), new Function(userInput), vm.runInNewContext(userInput)eval(userInput), exec(userInput)eval(userInput), instance_evalSearch for shell command execution with user input:
child_process.exec(userInput), child_process.execSync(userInput),
shell: true with user input in spawnsubprocess.run(userInput, shell=True), os.system(userInput),
os.popen(userInput)Runtime.exec(userInput), ProcessBuilder with unsanitized user segmentsProbe: curl -X POST http://localhost:3000/convert -d '{"filename": "test.pdf; cat /etc/passwd"}'
Search for logging or print statements using user input as the format string:
printf(userInput) (not applicable in most web stacks but check FFI bindings)logging.info(userInput) (safe) vs. logging.info(userInput % args) with
controlled formatlogger.log(userInput) where logger processes format stringsFind redirect responses or header construction using user input:
res.redirect(userInput) without sanitizing \r\n — allows injecting response headersresponse.setHeader('Location', userInput) without validationProbe: curl -v "http://localhost:3000/redirect?url=http://evil.com%0d%0aSet-Cookie:%20session=hijacked"
Find redirect endpoints (common in OAuth flows, login redirects):
res.redirect(req.query.next) without allowlist validationreturn redirect_to(params[:return_to]) without validationCheck: is the redirect URL validated against an allowlist of allowed domains?
Probe: curl -v "http://localhost:3000/login?next=https://evil.com"
For JWT implementations:
alg: none acceptance: check if jwt.verify() is called with algorithms option
restricted to expected algorithmskid header injection: if kid is used to look up the key, is it sanitized?
SQL injection via kid is a known attack vectorLook at error handler middleware (Express: app.use((err, req, res, next) => ...)):
err.stack or err.message in production?Check: is there a production vs. development error handler distinction?
Check framework configuration:
DEBUG = True in settings.py used in productionserver.error.include-stacktrace: alwaysapp.set('env', 'development') in production configCheck server TLS configuration (nginx/Apache config files, Node.js https.createServer):
SSLv3, TLSv1, TLSv1.1 enabled — flag as HIGHssl_protocols in nginx config or secureProtocol in Node.jsSearch for AES-CBC usage:
AES/CBC/PKCS5Padding in Java, AES.new(key, AES.MODE_CBC) in PythonSearch for PII storage and transmission:
Search for non-cryptographic random in security contexts:
Math.random() used to generate tokens, reset links, API keys — CRITICALrandom.random() or random.randint() in Python for security tokens — CRITICALjava.util.Random for session tokens — CRITICALcrypto.randomBytes(), secrets.token_bytes(), SecureRandomFind numeric fields in business operations (quantity, price, discount):
Identify state-transition endpoints (order status changes, account state changes):
Look for hidden form fields or client-supplied values that affect business logic:
trusted=true or isAdmin=false fields accepted from clientIdentify operations that should be atomic but may not be:
if balance >= amount; deduct(amount)
without database-level lockingSELECT ... FOR UPDATE or transactions wrapping check+modify patternsCheck high-value functions for invocation limits:
For multi-step flows (checkout, onboarding, password reset):
Check high-value actions for rate limiting:
Extend WSTG-CONF-10 analysis:
If a GraphQL endpoint is present:
introspection: false in Apollo Server config)depthLimit middleware or equivalent)[{query1}, {query2}]) be used to bypass rate limits?Probe (introspection): curl -X POST http://localhost:4000/graphql \
-H "Content-Type: application/json" \
-d '{"query": "{ __schema { types { name } } }"}'
For all REST endpoints:
req.body directly to Model.create() or
Model.update()? Check for allowlist of permitted fields (pick, omit, @Expose)GET /users/:id, does the server reject
POST /users/:id or does it fall through to a catch-all?Group all findings by severity. Use this format for each finding:
[WSTG-AUTHN-04] Missing auth middleware on protected route
Severity: CRITICAL
File: src/routes/admin.ts:42
Endpoint: GET /admin/users
Issue: Route handler is missing authentication middleware. Any unauthenticated user can access admin user list.
Probe: curl -X GET http://localhost:3000/admin/users
Remediation: Add auth middleware before handler: router.get('/admin/users', authenticate, authorize('admin'), handler)
Order: CRITICAL → HIGH → MEDIUM → LOW
After all findings, print a WSTG coverage table:
WSTG-ID | Test Name | Result
----------------|------------------------------------|--------
WSTG-CONF-01 | Network configuration | PASS / FAIL / SKIP (reason)
WSTG-CONF-02 | Application platform config | PASS / FAIL / SKIP
...
Mark as SKIP when the codebase has no relevant surface (e.g. WSTG-APIT-01 skipped when
no GraphQL endpoint found), and SKIP (out of requested scope) for every phase a
Phase 0 scope excluded. Both are SKIP, never PASS — a test that did not run has not
passed. When WSTG_SCOPE was anything other than ALL, open the report by naming
what was reviewed and what was not, and state that this is not a full OWASP review.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub xotong/claude-marketplace --plugin appsec4 skills in this plugin
/appsec-scanRun the same security scanners as CI — locally, using identical container images — before pushing to GitLab, driven by admin-managed scanner preferences and the configured instance's CI/CD Catalog, per-component version pinning (~latest or exact tag), an optional glci engine, and optional GitLab-native dependency matching. Categories: SAST (Fortify SCA, multi-language: maven, gradle, python, javascript, go), Dependency Scanning (GitLab SBOM), Secret Detection (GitLab/Gitleaks), Container Scanning (GTCS). Single-command scan via run-scan.sh; normalized findings with verification statuses in findings.triaged.json; approval-gated fix loop (fix-branch.sh, ≤5 iterations) and guided triage plan (TRIAGE.md). Use when the user says: "appsec scan", "run security scanners", "run Fortify", "pre-push security check", "CI security pipeline locally", "mirror CI scanners", "security before merge", "scan profile", "catalog components", "triage plan", "fix security findings", "do all security scans", "full security scan", "scan everything", "is this safe to push". Also activate for a SINGLE category and scan only that one (Step 0 routes): SAST — "SAST scan", "static analysis", "run Fortify", "scan my code"; Dependency — "dependency scan", "SCA scan", "check my dependencies", "any vulnerable libraries", "CVE check", "SBOM"; Secrets — "secret scan", "secret detection", "any hardcoded secrets", "leaked credentials", "did I commit a key", "gitleaks"; Container — "container scan", "image scan", "scan my Docker image", "GTCS". Do NOT activate for general code review, unit testing, or lint-only requests.
/security-optionsRoutes a security question to the right tool. Not for a concrete CI-mirror scan or an OWASP WSTG/DAST walkthrough — those trigger appsec-scan and appsec-dast-sim directly. Use for general asks: "what security tools do we have", "what are my security options", a deep vulnerability hunt with patches, automatic warnings while editing plus end-of-turn LLM review, fuzzing / Semgrep / CodeQL / crypto review, or vetting a third-party skill or plugin before installing it. Do NOT activate for "SAST scan", "dependency scan", "secret scan", "container scan", "scan before I push" (appsec-scan) or "DAST scan", "OWASP WSTG check", "audit my API", "is my login secure" (appsec-dast-sim).
/static-appsec-scanUse AskUserQuestion for scan type, auto-detect inputs, run scans, then offer remediationOther plugins' skills for the same job