/ardent:security-scan [PR number, branch, 'staged', or commit range]from ardent
STRIDE-based security analysis of code changes. Scans diffs for vulnerabilities, validates findings for exploitability, filters false positives, and reports confirmed issues. Triggers on "security scan", "security review", "check for vulnerabilities", or /security-scan.
Ships in ardent. 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.
STRIDE-based security analysis adapted for Electron + React + TypeScript + Cloudflare Workers. Scans code changes for vulnerabilities, validates each finding for exploitability, and filters aggressively to avoid false positives.
<scan_target> $ARGUMENTS </scan_target>
Parse $ARGUMENTS to determine what to scan:
| Target | Diff command |
|---|---|
| (empty) | git diff main...HEAD |
| PR number | gh pr diff {N} |
| Branch name | git diff main...{branch} |
staged | git diff --cached |
unstaged | git diff |
| Commit range | git diff {range} |
last N commits | git diff HEAD~N...HEAD |
Get the diff and list of changed files. Read the full content of each changed file for context.
Analyze every changed file against all six STRIDE categories, using the patterns in the companion stride-reference.md file. Focus on patterns relevant to what actually changed.
For each potential finding:
For each candidate finding, run this validation checklist:
Reachability: Is the vulnerable code reachable from external input?
EXTERNAL — reachable from unauthenticated inputAUTHENTICATED — requires valid sessionINTERNAL — only reachable from internal/trusted codeUNREACHABLE — dead code or blocked by conditionsControl: Can an attacker control the input that reaches the vulnerability?
Mitigations: Are there existing controls that prevent exploitation?
Exploitability: Rate as EASY / MEDIUM / HARD / NOT_EXPLOITABLE
Confidence threshold: Only report findings with confidence >= 0.8. Below that, too speculative.
Apply the hard exclusion rules. Automatically exclude:
dangerouslySetInnerHTML)If a finding matches any exclusion, drop it silently.
For each confirmed finding, document:
### VULN-{N}: {Title} ({SEVERITY})
**STRIDE:** {category}
**CWE:** {CWE-ID}
**File:** `{path}:{line}`
**Confidence:** {0.0-1.0}
**Exploitability:** {EASY|MEDIUM|HARD}
**Issue:** {What's wrong — concrete, not theoretical}
**Exploitation path:**
1. {step-by-step how an attacker reaches this}
**Proof of concept:**
{minimal payload or request demonstrating the vulnerability}
**Fix:**
```diff
- {vulnerable code}
+ {fixed code}
### Step 6: Output
Write the report:
```markdown
## Security Scan
**Target:** {branch/PR/commit range}
**Files analyzed:** {count}
**Scan date:** {ISO date}
### Summary
| Severity | Count |
|----------|-------|
| Critical | {N} |
| High | {N} |
| Medium | {N} |
| Low | {N} |
| STRIDE Category | Findings |
|-----------------|----------|
| Spoofing | {N} |
| Tampering | {N} |
| Repudiation | {N} |
| Info Disclosure | {N} |
| Denial of Service | {N} |
| Elevation of Privilege | {N} |
### Findings
{findings from Step 5, ordered by severity}
### False Positives Filtered
{count} candidates excluded by hard exclusion rules.
### Excluded from Scope
- Test files
- Documentation
- {any other exclusions applied}
Write the report to the agent workspace:
.untracked/{topic}/security-scan.md
Derive {topic} from the branch name. Overwrite if exists.
If no findings: report "No confirmed vulnerabilities found" with the scan metadata. A clean scan is a valid result.
| Severity | Criteria | Examples |
|---|---|---|
| Critical | Immediately exploitable, high impact, no auth required | RCE, auth bypass, hardcoded production secrets |
| High | Exploitable with some conditions, significant impact | SQL injection, stored XSS, IDOR, privilege escalation |
| Medium | Requires specific conditions, moderate impact | Reflected XSS, CSRF, info disclosure |
| Low | Difficult to exploit, low impact | Verbose errors, missing security headers |
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub ardent-ai/ardent-claude-plugins --plugin ardent24 skills in this plugin
/address_pr_feedbackAnalyze PR changes and comments, create a plan, and implement feedback/archiveUpload HTML docs to the team's GitHub Pages archive for permanent browsing and sharing. Use when the user says "archive this", "upload to archive", or /archive./brainstormExplore requirements and approaches through collaborative dialogue before planning/cleanupSimplify and refine recently modified code for clarity and maintainability while preserving behavior. Use for requests like "simplify this", "clean this up", "reduce complexity", or readability-focused refactors./compoundDocument a recently solved problem to compound your knowledge/deepen-planEnhance a plan with parallel research agents for depth, best practices, and implementation detailsOther plugins' skills for the same job