Case Study: Security Review Skill Synthesis
Scenario
Goal: build a skill that finds real vulnerabilities while minimizing false positives.
Input collection approach
This case required balanced collection across offensive and defensive material:
- Canonical standards and cheat sheets.
- Framework/language-specific secure coding docs.
- Real-world exploit writeups and postmortems.
- Fixed vulnerability diffs and secure rewrites.
- Benign patterns often misclassified as vulnerabilities.
- Existing in-repo security skills and review heuristics.
Collection continued until each vulnerability class had both exploit and mitigation evidence.
Coverage matrix used
Required dimensions tracked during synthesis:
- Vulnerability class definitions and prerequisites.
- Exploitable dataflow examples.
- False-positive controls.
- Severity/confidence calibration.
- Concrete remediation patterns.
- Framework-specific caveats and exceptions.
Synthesized artifacts produced
The resulting skill references included:
- True-positive case with exploitation path.
- False-positive case with proof of safety.
- Fix/remediation case with corrected code pattern.
- Severity and confidence decision rubric.
- Evidence checklist to prevent pattern-only claims.
Source-to-decision trace (sample)
- Source class: exploit writeups. Decision: require attacker-controlled input path in every high-confidence finding. Why: removed pattern-only false alarms.
- Source class: benign counterexamples. Decision: add explicit safe-pattern checks before reporting. Why: reduced repeated false positives on sanitized data paths.
- Source class: fixed vulnerability diffs. Decision: include remediation examples as patch-shaped guidance. Why: improved downstream fix quality and speed.
Concrete artifacts (sample)
- True-positive case: Input pattern: untrusted data reaches shell/API call without escaping. Output: finding includes source, sink, exploit path, and minimal patch recommendation.
- False-positive case: Input pattern: potentially dangerous API with validated allowlist and strict escaping. Output: no vulnerability finding; include reason for non-reporting.
- Remediation case: Before: dynamic query construction from user input. After: parameterized query plus validation guard.
What made this high quality
- It was trained on both attacks and safe counterexamples.
- Findings required evidence of exploitability, not keyword matching.
- Remediation guidance was concrete and immediately applicable.