Security
Find and reduce realistic abuse paths while keeping evidence, authority, and
side effects explicit.
Compose with security-identity-access when identity or tenant-authorization
boundaries are central. That companion owns identity-specific checks; this
skill owns the shared investigation, safety, evidence, and reporting contract.
Choose The Mode And Authority
| Mode |
Use when |
Authority |
security review |
Determine whether concrete code, configuration, or a change creates security-relevant weaknesses or unsafe exposures |
Read-only: do not edit source or configuration or change external state |
threat model |
Map assets, boundaries, attacker goals, abuse paths, and mitigations |
Read-only: do not edit the system or present scenarios as confirmed vulnerabilities |
secure implementation |
Design, implement, or remediate security-sensitive behavior |
Mutate only the files or systems explicitly authorized by the request |
Writing an explicitly requested report does not authorize remediation. If a
request combines analysis and implementation, keep the initial investigation
read-only and make the transition to changes visible.
Shared Workflow
- Set scope and assumptions. Identify the mode, target paths and
environments, protected assets, plausible attacker capabilities, deployment
shape, and relevant authorization assumptions. Inspect discoverable context
before asking questions; ask only when an answer would materially change
scope, authority, or ranking.
- Map the system. Trace entrypoints, data flows, trust boundaries,
authoritative controls, storage, external integrations, and observable
effects. Follow a path across all participating components rather than
stopping at a frontend, handler, or risky-looking call.
- Choose high-value hypotheses. Derive a small set of abuse paths from the
actual architecture and attacker goals. Prioritize paths involving authority,
isolation, code or query execution, external resource access, dangerous
parsing, sensitive data, or resource exhaustion when those surfaces exist.
- Trace each hypothesis. Establish input provenance, transformations,
guards, reachability, attacker prerequisites, sink behavior, and concrete
impact. Check middleware order, authorization placement, schemas,
parameterization, encoding, and configuration already in effect. A risky API,
scanner alert, or pattern match is a lead, not a finding.
- Verify material protections. When a conclusion depends on a framework,
runtime, or library default, identify the resolved dependency and effective
configuration, then verify the behavior using matching authoritative
documentation, source, or a minimal safe reproduction. If that evidence is
unavailable, classify the path as needing validation rather than assuming
either safety or vulnerability.
- Classify, act, and report. Use the evidence outcomes below, stay within
the selected mode, and produce its required output.
Separate runtime, development, test, build, and pipeline risk. Include
dependencies, build scripts, generated artifacts, provenance, or CI only when
the user scopes them in or concrete repository evidence places that surface on
the relevant abuse path or trust boundary. Rank it by control of shipped
artifacts, deployment credentials, or release integrity. Verify an advisory
against the resolved dependency and applicable capability before treating it
as a finding.
Safe Validation Boundary
A security request authorizes inspection of the supplied or otherwise in-scope
materials. It does not by itself authorize probing deployed services, accounts,
networks, or third parties.
Run repository-supported local checks and non-destructive synthetic regression
cases in an authorized isolated harness. Crafted requests, endpoint scanning,
fuzzing, exploit proofs, or other active validation against a shared or
deployed target require authorization for the exact target and method and must
remain non-destructive.
Prefer isolated local or test targets, synthetic data, least-privileged test
accounts, bounded requests, and reversible observations. Do not access or
disclose real data, capture credentials, establish persistence, send real
messages, incur material cost, impair availability, or cross the authorized
boundary. Access or credentials alone are not authorization. If adequate proof
would exceed this boundary, stop at the strongest safe evidence and record the
exact missing fact or next authorized test.
Evidence Outcomes
Use these outcomes for review conclusions:
| Outcome |
Meaning |
confirmed finding |
Evidence supports an attacker-reachable or attacker-influenceable condition, a realistic abuse path, and security-relevant impact after existing protections are considered |
needs validation |
A credible, material path remains but reachability, configuration, deployment, or protection evidence is missing |
not supported |
Examined evidence refutes the suspected path in the effective configuration |
coverage gap |
A material surface could not be examined, but no specific vulnerability is established |
Code, configuration, or runtime evidence can confirm a path without a working
exploit when it establishes the condition, reachability, prerequisites, and
impact. Do not make an exploit proof a universal reporting gate.
Do not suppress a credible concern merely because it is not yet a confirmed
finding. Preserve it under needs validation with the missing evidence and
safest discriminating probe.
Report severity and confidence independently. Severity reflects impact,
exploit prerequisites, and affected scope if the path is real; confidence
reflects the strength and completeness of the evidence. For an unresolved path,
label potential severity rather than lowering severity to compensate for weak
confidence. Do not assign CVSS or another numeric score unless requested and
the required deployment evidence is available.
If no findings are confirmed, say No confirmed findings in the examined
scope and state coverage, limitations, and residual checks. Do not translate
limited review evidence into “secure” or “no vulnerabilities.”
Threat-model abuse paths are scenarios rather than findings. Rank them by
impact and likelihood under explicit assumptions, and say what evidence would
confirm or reduce each risk.
Implementation Decisions
Tie each security change to an evidenced abuse path or explicit security
requirement. Fix the problem at the authoritative boundary and prefer
server-enforced access decisions, structured or parameterized APIs,
context-correct encoding, explicit resource bounds, least privilege, and
fail-closed behavior where a security decision cannot be made safely.
Preserve intended behavior deliberately. State any compatibility, usability,
operational, or performance tradeoff instead of hiding it behind “hardening.”
Do not add generic defenses or dependencies without a concrete ownership and
maintenance reason.
Treat suspected secrets carefully:
- do not reproduce secret values in findings, logs, commands, patches, or test
fixtures
- distinguish credentials and private key material from public identifiers and
non-secret configuration
- keep plaintext secrets out of source, history, artifacts, process arguments,
logs, and user-facing errors
- use the deployment's approved secret store or injection mechanism with
appropriate access control and rotation; environment variables are one
delivery mechanism, not a universal secret store or safety guarantee
- when exposure is plausible, recommend revocation or rotation as appropriate;
deleting a value from the current file does not invalidate it or remove
earlier copies
- treat revocation or rotation as primary containment; rewriting shared history
requires separate authorization and coordination
Output By Mode
For a security review, report:
- confirmed findings first, ordered by severity
- needs-validation items, ordered by potential impact
- meaningful not-supported dispositions when they resolve a likely false
positive
- examined scope, coverage gaps, validation performed, and residual risk
Each confirmed finding or needs-validation item includes:
- outcome, severity or potential severity, and confidence
- impacted asset or trust boundary
- required attacker capability and prerequisites
- evidence trace with concrete source references
- impact
- fix direction or discriminating validation step, including behavior
tradeoffs
For a threat model, report:
- scope, system assumptions, assets, actors, and trust boundaries
- a small ranked set of abuse paths with prerequisites, impact, relevant
existing controls, and current disposition when one has been decided
- mitigations tied to owning components or boundaries
- residual risks, open questions, and assumptions that would change ranking
For secure implementation, report:
- the abuse path or requirement addressed and changed scope
- the control added or revised and relevant behavior tradeoffs
- exact validation evidence
- unresolved risks, unrun checks, and rollback or follow-up needs when relevant
Validate Fixes Proportionally
Validate the changed boundary, the closest safe abuse case, and the legitimate
behavior that must continue to work. Add or update a focused regression when it
materially protects the boundary and lies within the requested scope, then run
the narrowest relevant repository checks.
Broaden validation when the change affects shared authorization, parsers,
security primitives, framework configuration, dependencies, or multiple trust
boundaries. Keep active checks within the safe-validation contract. Record exact
commands or fixtures, observed outcomes, and anything not run. Do not claim a
finding is fixed solely because the patch appears correct.
1---2name: security3description: Evidence-grounded threat modeling, vulnerability review, and secure implementation. Use for explicit security audits or primary risks involving authorization, untrusted input, external requests, parsers/uploads, secrets, sensitive data, isolation, or release integrity. Not for routine implementation or non-security red-teaming. Add `security-identity-access` for identity and tenant authorization.4---56# Security78Find and reduce realistic abuse paths while keeping evidence, authority, and9side effects explicit.1011Compose with `security-identity-access` when identity or tenant-authorization12boundaries are central. That companion owns identity-specific checks; this13skill owns the shared investigation, safety, evidence, and reporting contract.1415## Choose The Mode And Authority1617| Mode | Use when | Authority |18|---|---|---|19| `security review` | Determine whether concrete code, configuration, or a change creates security-relevant weaknesses or unsafe exposures | Read-only: do not edit source or configuration or change external state |20| `threat model` | Map assets, boundaries, attacker goals, abuse paths, and mitigations | Read-only: do not edit the system or present scenarios as confirmed vulnerabilities |21| `secure implementation` | Design, implement, or remediate security-sensitive behavior | Mutate only the files or systems explicitly authorized by the request |2223Writing an explicitly requested report does not authorize remediation. If a24request combines analysis and implementation, keep the initial investigation25read-only and make the transition to changes visible.2627## Shared Workflow28291. **Set scope and assumptions.** Identify the mode, target paths and30 environments, protected assets, plausible attacker capabilities, deployment31 shape, and relevant authorization assumptions. Inspect discoverable context32 before asking questions; ask only when an answer would materially change33 scope, authority, or ranking.342. **Map the system.** Trace entrypoints, data flows, trust boundaries,35 authoritative controls, storage, external integrations, and observable36 effects. Follow a path across all participating components rather than37 stopping at a frontend, handler, or risky-looking call.383. **Choose high-value hypotheses.** Derive a small set of abuse paths from the39 actual architecture and attacker goals. Prioritize paths involving authority,40 isolation, code or query execution, external resource access, dangerous41 parsing, sensitive data, or resource exhaustion when those surfaces exist.424. **Trace each hypothesis.** Establish input provenance, transformations,43 guards, reachability, attacker prerequisites, sink behavior, and concrete44 impact. Check middleware order, authorization placement, schemas,45 parameterization, encoding, and configuration already in effect. A risky API,46 scanner alert, or pattern match is a lead, not a finding.475. **Verify material protections.** When a conclusion depends on a framework,48 runtime, or library default, identify the resolved dependency and effective49 configuration, then verify the behavior using matching authoritative50 documentation, source, or a minimal safe reproduction. If that evidence is51 unavailable, classify the path as needing validation rather than assuming52 either safety or vulnerability.536. **Classify, act, and report.** Use the evidence outcomes below, stay within54 the selected mode, and produce its required output.5556Separate runtime, development, test, build, and pipeline risk. Include57dependencies, build scripts, generated artifacts, provenance, or CI only when58the user scopes them in or concrete repository evidence places that surface on59the relevant abuse path or trust boundary. Rank it by control of shipped60artifacts, deployment credentials, or release integrity. Verify an advisory61against the resolved dependency and applicable capability before treating it62as a finding.6364## Safe Validation Boundary6566A security request authorizes inspection of the supplied or otherwise in-scope67materials. It does not by itself authorize probing deployed services, accounts,68networks, or third parties.6970Run repository-supported local checks and non-destructive synthetic regression71cases in an authorized isolated harness. Crafted requests, endpoint scanning,72fuzzing, exploit proofs, or other active validation against a shared or73deployed target require authorization for the exact target and method and must74remain non-destructive.7576Prefer isolated local or test targets, synthetic data, least-privileged test77accounts, bounded requests, and reversible observations. Do not access or78disclose real data, capture credentials, establish persistence, send real79messages, incur material cost, impair availability, or cross the authorized80boundary. Access or credentials alone are not authorization. If adequate proof81would exceed this boundary, stop at the strongest safe evidence and record the82exact missing fact or next authorized test.8384## Evidence Outcomes8586Use these outcomes for review conclusions:8788| Outcome | Meaning |89|---|---|90| `confirmed finding` | Evidence supports an attacker-reachable or attacker-influenceable condition, a realistic abuse path, and security-relevant impact after existing protections are considered |91| `needs validation` | A credible, material path remains but reachability, configuration, deployment, or protection evidence is missing |92| `not supported` | Examined evidence refutes the suspected path in the effective configuration |93| `coverage gap` | A material surface could not be examined, but no specific vulnerability is established |9495Code, configuration, or runtime evidence can confirm a path without a working96exploit when it establishes the condition, reachability, prerequisites, and97impact. Do not make an exploit proof a universal reporting gate.9899Do not suppress a credible concern merely because it is not yet a confirmed100finding. Preserve it under `needs validation` with the missing evidence and101safest discriminating probe.102103Report severity and confidence independently. Severity reflects impact,104exploit prerequisites, and affected scope if the path is real; confidence105reflects the strength and completeness of the evidence. For an unresolved path,106label potential severity rather than lowering severity to compensate for weak107confidence. Do not assign CVSS or another numeric score unless requested and108the required deployment evidence is available.109110If no findings are confirmed, say **No confirmed findings in the examined111scope** and state coverage, limitations, and residual checks. Do not translate112limited review evidence into “secure” or “no vulnerabilities.”113114Threat-model abuse paths are scenarios rather than findings. Rank them by115impact and likelihood under explicit assumptions, and say what evidence would116confirm or reduce each risk.117118## Implementation Decisions119120Tie each security change to an evidenced abuse path or explicit security121requirement. Fix the problem at the authoritative boundary and prefer122server-enforced access decisions, structured or parameterized APIs,123context-correct encoding, explicit resource bounds, least privilege, and124fail-closed behavior where a security decision cannot be made safely.125126Preserve intended behavior deliberately. State any compatibility, usability,127operational, or performance tradeoff instead of hiding it behind “hardening.”128Do not add generic defenses or dependencies without a concrete ownership and129maintenance reason.130131Treat suspected secrets carefully:132133- do not reproduce secret values in findings, logs, commands, patches, or test134 fixtures135- distinguish credentials and private key material from public identifiers and136 non-secret configuration137- keep plaintext secrets out of source, history, artifacts, process arguments,138 logs, and user-facing errors139- use the deployment's approved secret store or injection mechanism with140 appropriate access control and rotation; environment variables are one141 delivery mechanism, not a universal secret store or safety guarantee142- when exposure is plausible, recommend revocation or rotation as appropriate;143 deleting a value from the current file does not invalidate it or remove144 earlier copies145- treat revocation or rotation as primary containment; rewriting shared history146 requires separate authorization and coordination147148## Output By Mode149150For a `security review`, report:1511521. confirmed findings first, ordered by severity1532. needs-validation items, ordered by potential impact1543. meaningful not-supported dispositions when they resolve a likely false155 positive1564. examined scope, coverage gaps, validation performed, and residual risk157158Each confirmed finding or needs-validation item includes:159160- outcome, severity or potential severity, and confidence161- impacted asset or trust boundary162- required attacker capability and prerequisites163- evidence trace with concrete source references164- impact165- fix direction or discriminating validation step, including behavior166 tradeoffs167168For a `threat model`, report:169170- scope, system assumptions, assets, actors, and trust boundaries171- a small ranked set of abuse paths with prerequisites, impact, relevant172 existing controls, and current disposition when one has been decided173- mitigations tied to owning components or boundaries174- residual risks, open questions, and assumptions that would change ranking175176For `secure implementation`, report:177178- the abuse path or requirement addressed and changed scope179- the control added or revised and relevant behavior tradeoffs180- exact validation evidence181- unresolved risks, unrun checks, and rollback or follow-up needs when relevant182183## Validate Fixes Proportionally184185Validate the changed boundary, the closest safe abuse case, and the legitimate186behavior that must continue to work. Add or update a focused regression when it187materially protects the boundary and lies within the requested scope, then run188the narrowest relevant repository checks.189190Broaden validation when the change affects shared authorization, parsers,191security primitives, framework configuration, dependencies, or multiple trust192boundaries. Keep active checks within the safe-validation contract. Record exact193commands or fixtures, observed outcomes, and anything not run. Do not claim a194finding is fixed solely because the patch appears correct.