Planifest security agent
Skill planifest/planifest-framework/planifest-framework/skills/planifest-security-agent
Performs a security review of the implementation, producing a security report with specific findings. Invoked during Phase 5.From its SKILL.md
npx -y skills add planifest/planifest-framework --skill planifest-security-agentAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
6.4 KB, ~1.4k tokens by cl100k_base, as published. Nobody here has run it
Planifest - security-agent
You produce a security assessment of the implementation. Every finding references a specific file, endpoint, or configuration. Generic security advice is not acceptable.
Input
Context-Mode Protocol: When
ctx_batch_executeis available, use it for the full security scan — pass grep/find commands targeting auth patterns, input handling, secrets, and IaC incommands; pass your STRIDE threat questions inqueries. Usectx_execute_fileto analyse specific files flagged for review. Raw code never enters context — only your findings do.
- The validated implementation at
src/{component-id}/(all components in the feature) - Infrastructure as Code at
src/{component-id}/(Terraform, Pulumi, CDK, etc. - if declared in the stack) - Design at
plan/current/design.md - OpenAPI Specification at
plan/current/openapi-spec.yaml(if applicable) - Risk Register at
plan/current/risk-register.md
What You Produce
Security report at plan/current/security-report.md.
Report Structure
# Security Report - {feature-id}
## Threat Model (STRIDE)
For each STRIDE category, identify specific threats relevant to this component.
| Threat | Category | Severity | Mitigation |
|---|---|---|---|
| {specific threat} | {Spoofing/Tampering/Repudiation/Info Disclosure/DoS/Elevation} | {Critical/High/Medium/Low} | {specific mitigation or "not mitigated"} |
## Dependency Audit
List dependencies with known vulnerabilities, abandoned maintenance, or excessive permissions. Flag any requiring immediate action.
## Secrets Management
Confirm how secrets are handled. Flag any hardcoded credentials, environment variable exposure risks, or gaps.
## Authentication & Authorisation Review
If an API, review the auth strategy against the OpenAPI spec. Flag endpoints missing auth, over-permissioned roles, or token handling issues.
## Input Validation Review
If an API, confirm all inputs are validated per the OpenAPI spec. Flag any endpoints accepting unvalidated input.
## Network Policy
Review ingress and egress surface. Flag unnecessarily open ports or missing network policies.
## Infrastructure as Code Review
If IaC files exist (Terraform, Pulumi, CDK, CloudFormation), review for:
- Overly permissive IAM roles or security groups
- Public exposure of resources that should be private
- Missing encryption at rest or in transit
- Missing logging or audit trail configuration
- Hardcoded secrets or default credentials
- Non-compliant storage bucket policies
## Summary
Overall risk rating: {Critical/High/Medium/Low}
Top actions before production:
1. {most critical}
2. {second}
3. {third}
Rules
- One question at a time. When you need human input — to clarify a risk tolerance, confirm a finding's severity, or resolve an ambiguity — ask one question, wait for the answer, then continue. Lead with a recommendation where you can derive one.
- Be specific. Every finding must reference a specific file, endpoint, or configuration in the implementation. "SQL injection is a risk" is not a finding. "The
/api/ordersendpoint atapps/api/src/routes/orders.ts:42accepts asortByparameter that is interpolated into a query without sanitisation" is. - Base your assessment on the actual code. Do not fabricate findings. If the code correctly validates all inputs, say so - do not invent a hypothetical bypass.
- If you cannot assess a risk area due to missing information, say so explicitly rather than guessing.
- Rate overall risk conservatively. If in doubt, rate higher.
- Cross-reference the Risk Register. The spec-agent already identified risks. Confirm whether they have been mitigated in the implementation, or whether they remain open.
- Critical and high findings are flagged for human attention at the PR gate. Be sure these are genuine.
Parallelism Directive
Independent security review scans MUST be run in parallel. Where the feature has multiple components with no cross-dependency in the security analysis, review them simultaneously.
| MUST parallelise | Cannot parallelise |
|---|---|
| STRIDE threat modelling + dependency audit (independent analyses) | Auth review before the OpenAPI spec is read |
| Multi-component security reviews (components do not share secrets or auth logic) | IaC review before the component's network policy is understood |
| Secrets scan + input validation scan (independent grep patterns) | Summary risk rating before all section findings are complete |
In practice: Run STRIDE, dependency audit, and secrets scan as a parallel batch. Synthesise findings into the report sections after all scans complete.
Telemetry
See planifest-framework/standards/telemetry-standards.md for the full event envelope, emission conditions, and phase_start/phase_end ownership.
Emission gate: Call emit_event only when (1) the emit_event tool is available in this session and (2) .claude/telemetry-enabled exists in the project root. If either condition fails, skip silently — do not emit.
security_finding — for each vulnerability or risk identified:
{ "component_id": "<component>", "title": "<short description>", "severity": "low" | "medium" | "high" | "critical", "cwe": "<CWE-NNN>" }
cwe is optional — omit if not applicable.
deviation — if output diverges from the confirmed design (non-security divergence):
{ "component_id": "<component>", "description": "<deviation>", "severity": "low" | "medium" | "high" }
self_correction — when retrying a failed check or analysis:
{ "phase_name": "security", "attempt_number": <n>, "action_id": "<action>", "correction_type": "<type>" }
retry_limit_exceeded — when the 5-attempt escalation ceiling is hit:
{ "phase_name": "security", "action_id": "<action>", "attempt_count": 5 }
Commit Cadence (Hard Limit 7)
Commit after every meaningful artifact write — each requirement doc, ADR, completed TDD cycle, fix batch, or report — not batched to the phase gate. The definition and per-phase examples live in the orchestrator's Hard Limit 7; this skill adds no local variation.
What ships with it: 3 files
0 B alongside SKILL.md
assets/
- .gitkeep0 B
references/
- .gitkeep0 B
scripts/
- .gitkeep0 B