factory-ai/vulnerability-validation
Validate security findings from commit-security-scan by assessing exploitability, filtering false positives, and generating proof-of-concept exploits. Use after running commit-security-scan to confirm vulnerabilities.
npx skills add https://github.com/Factory-AI/factory-plugins --skill vulnerability-validation
Validate security findings by assessing whether they are actually exploitable in the context of this codebase. This skill filters false positives, confirms real vulnerabilities, and generates proof-of-concept exploits.
.factory/threat-model.md must exist (from threat-model-generation skill)security-findings.json must exist (from commit-security-scan skill)| Input | Description | Required | Default |
| --------------- | ------------------------------------------------ | -------- | -------------------------- |
| Findings file | Path to security-findings.json | Yes | security-findings.json |
| Threat model | Path to threat model | No | .factory/threat-model.md |
| Finding IDs | Specific findings to validate (comma-separated) | No | All findings |
| Severity filter | Only validate findings at or above this severity | No | All severities |
Follow these steps for each finding to validate:
security-findings.json from commit-security-scan.factory/threat-model.md for system contextFor each finding, determine if the vulnerable code is reachable:
EXTERNAL - Reachable from unauthenticated external inputAUTHENTICATED - Requires valid user sessionINTERNAL - Only reachable from internal servicesUNREACHABLE - Dead code or blocked by conditionsDetermine if an attacker can control the vulnerable input:
Check if existing security controls prevent exploitation:
Determine how difficult it is to exploit:
| Rating | Criteria |
| ----------------- | ------------------------------------------------------------------- |
| EASY | No special conditions, standard tools, publicly known technique |
| MEDIUM | Requires specific conditions, timing, or chained vulnerabilities |
| HARD | Requires insider knowledge, rare conditions, or advanced techniques |
| NOT_EXPLOITABLE | Theoretical vulnerability but not practically exploitable |
Consider:
For confirmed vulnerabilities, create a proof-of-concept:
Example PoC structure:
{
"payload": "' OR '1'='1",
"request": "GET /api/users?search=' OR '1'='1",
"expected_behavior": "Returns users matching search term",
"actual_behavior": "Returns all users due to SQL injection"
}
Assign a CVSS 3.1 score based on:
| Metric | Options |
| ------------------------ | -------------------------------------------------- |
| Attack Vector (AV) | Network (N), Adjacent (A), Local (L), Physical (P) |
| Attack Complexity (AC) | Low (L), High (H) |
| Privileges Required (PR) | None (N), Low (L), High (H) |
| User Interaction (UI) | None (N), Required (R) |
| Scope (S) | Unchanged (U), Changed (C) |
| Confidentiality (C) | None (N), Low (L), High (H) |
| Integrity (I) | None (N), Low (L), High (H) |
| Availability (A) | None (N), Low (L), High (H) |
Example: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N = 9.1 (Critical)
Based on analysis, classify each finding:
| Status | Meaning |
| --------------------- | ---------------------------------------------- |
| CONFIRMED | Vulnerability is real and exploitable |
| LIKELY | Probably exploitable but couldn't fully verify |
| FALSE_POSITIVE | Not actually a vulnerability (document why) |
| NEEDS_MANUAL_REVIEW | Requires human security expert review |
Create validated-findings.json:
{
"validation_id": "val-<timestamp>",
"validation_date": "<ISO timestamp>",
"scan_id": "<from security-findings.json>",
"threat_model_version": "<from threat-model.md>",
"validated_findings": [
{
"id": "VULN-001",
"status": "CONFIRMED",
"original_severity": "HIGH",
"validated_severity": "HIGH",
"exploitability": "EASY",
"reachability": "EXTERNAL",
"existing_mitigations": [],
"exploitation_path": [
"User submits search query via GET /api/users?search=<payload>",
"Express router passes query to searchUsers() handler",
"Handler passes unsanitized input to SQL template literal",
"PostgreSQL executes malicious SQL"
],
"proof_of_concept": {
"payload": "' OR '1'='1",
"request": "GET /api/users?search=' OR '1'='1",
"expected_behavior": "Returns users matching search term",
"actual_behavior": "Returns all users due to SQL injection"
},
"cvss_vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N",
"cvss_score": 9.1,
"validation_notes": "Confirmed via code tracing. No input validation or parameterization."
}
],
"false_positives": [
{
"id": "VULN-003",
"original_severity": "MEDIUM",
"reason": "Input is validated by Joi schema in middleware before reaching this code. Schema enforces UUID format which prevents injection.",
"evidence": "See src/middleware/validation.js:45 - Joi.string().uuid()"
}
],
"needs_manual_review": [
{
"id": "VULN-005",
"original_severity": "HIGH",
"reason": "Complex data flow through message queue. Unable to fully trace if sanitization occurs in consumer service."
}
],
"summary": {
"total_analyzed": 10,
"confirmed": 5,
"likely": 2,
"false_positives": 2,
"needs_manual_review": 1,
"by_severity": {
"CRITICAL": 1,
"HIGH": 3,
"MEDIUM": 1,
"LOW": 0
}
}
}
The skill is complete when:
validated-findings.json is valid JSONRun these checks before completing:
# Verify output exists and is valid JSON
cat validated-findings.json | jq . > /dev/null && echo "✓ Valid JSON"
# Check all findings have status
jq '.validated_findings | all(.status)' validated-findings.json
# Check confirmed findings have PoC
jq '.validated_findings | map(select(.status == "CONFIRMED")) | all(.proof_of_concept)' validated-findings.json
# Check false positives have reasoning
jq '.false_positives | all(.reason)' validated-findings.json
Validate all findings:
Validate the security findings from the last scan.
Validate specific findings:
Validate findings VULN-001 and VULN-002 from security-findings.json.
Validate only HIGH/CRITICAL:
Validate all HIGH and CRITICAL severity findings from the security scan.
Validate with specific files:
Validate findings in security-findings.json using threat model at .factory/threat-model.md.
validation-examples.md (in this skill directory)commit-security-scan skillTake factory-ai/vulnerability-validation from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.