Cybersecurity Review
Perform a deep, threat-driven review of a software repository and produce an
evidence-based report. Review only: do not modify application source,
configuration, infrastructure, tests, or dependencies while this skill is
active.
The only repository file this workflow may create or modify is the approved
report file.
Outcomes
Produce:
- a concise decision layer for leaders
- detailed, reproducible findings for engineers
- a coverage ledger showing what was reviewed, limited, excluded, or not
applicable
- a prioritized remediation roadmap
- explicit assumptions, unresolved questions, and residual risks
A repository review is point-in-time evidence, not proof that vulnerabilities
do not exist.
Non-negotiable behavior
- Confirm the review target and authorization when they are not already clear.
A user-provided local repository normally establishes authorization for
repository-only analysis, but never for deployed systems or external
accounts.
- Never access live applications, cloud accounts, clusters, third-party
services, or production data as part of this skill.
- Never retrieve, validate, reuse, transmit, or print credentials or secret
values.
- Do not read known sensitive local files such as
.env files, credential
stores, private keys, kubeconfig files, or cloud authentication files.
- Do not upload repository content, findings, hashes, or artifacts to external
services.
- Ask before installing a tool, downloading dependencies, enabling package
install hooks, or using a network-backed advisory or research service.
- Inspect unfamiliar commands before running them. Do not execute commands
that may deploy, publish, alter external state, destroy data, or invoke
untrusted install hooks.
- Treat scanner output as leads, not findings.
- Do not claim compliance, certification, exhaustive coverage, or absence of
vulnerabilities.
- Do not fix findings during the review. Finish the report first; remediation
requires a separate user request.
If safe review cannot continue within these boundaries, stop and explain the
limitation instead of weakening them.
Intake
Before reviewing, establish or infer:
- repository root and requested revision, branch, or commit
- included and excluded paths
- intended deployment model and exposed interfaces
- sensitive assets and important business operations
- authentication, authorization, tenancy, and trust assumptions
- known concerns or prior findings
- available build, test, lint, and security commands
- whether network-backed research and advisory checks are permitted
- report destination
Ask only for information that cannot be learned safely from the repository.
State assumptions when the user cannot provide an answer.
Default the report path to SECURITY_REVIEW.md. Ask before overwriting an
existing file.
Review workflow
1. Record the review snapshot
Record:
- repository name and root
- commit hash when version control is available
- branch or revision
- whether the working tree contains uncommitted changes
- review date
- relevant languages, frameworks, package managers, and build systems
- tool and time limitations
- approved network access
- explicit exclusions
Do not inspect unrelated machine configuration or authentication state.
2. Map the repository
Identify the security-relevant shape of the system:
- executable entry points and externally reachable interfaces
- services, packages, modules, and trust boundaries
- authentication, session, authorization, and tenant-isolation controls
- data stores, queues, caches, filesystems, and sensitive data flows
- parsers, serializers, templates, interpreters, and command execution
- outbound network access and third-party integrations
- dependencies, lockfiles, build scripts, and generated artifacts
- CI/CD workflows, release automation, containers, IaC, and deployment
configuration
- logging, audit, monitoring, and error handling
- tests covering important controls
Distinguish observed repository facts from assumptions about runtime
configuration or production behavior.
3. Build a lightweight threat model
Capture:
- assets and sensitive operations
- legitimate actors and likely attacker capabilities
- entry points and externally controlled inputs
- components and data flows
- trust boundaries
- important security controls
- prioritized abuse cases
- deployment assumptions that affect reachability or impact
Use whichever lightweight method best fits the repository, such as STRIDE,
abuse cases, attack trees, or direct asset–entry point–trust boundary analysis.
The method matters less than making the reasoning explicit.
4. Create the coverage plan
Create a coverage ledger before reporting findings. Mark each relevant area as
Not reviewed, In progress, Reviewed, Limited, or Not applicable.
Evaluate at least these areas when applicable:
- attack surface and trust-boundary crossings
- authentication, account recovery, and session management
- authorization, object access, role enforcement, and tenant isolation
- business workflows, state transitions, replay, races, and abuse resistance
- input validation, injection, output encoding, and unsafe interpretation
- serialization, parsing, file handling, process execution, and outbound
requests
- secrets, key handling, randomness, cryptography, and certificate validation
- sensitive-data storage, transport, retention, logging, and privacy
- error handling, fail-open behavior, availability, and resource limits
- dependency, build, provenance, and software supply-chain risks
- CI/CD permissions, artifact handling, and release controls
- container, IaC, cloud, and deployment security
- auditability, monitoring, and security-control tests
Prioritize externally reachable paths, privilege boundaries, cross-tenant
operations, sensitive state changes, money movement, credential handling,
untrusted parsing, and deployment controls.
Do not force irrelevant checks onto a repository merely to complete a generic
checklist.
5. Perform the manual review
Use multiple focused passes:
Architecture and control pass
- Check whether security controls exist at the correct trust boundaries.
- Look for bypass paths, inconsistent enforcement, unsafe defaults, and
controls implemented only in clients.
Data-flow pass
- Trace attacker-controlled input from entry points through validation and
transformation to sensitive sinks.
- Trace callers and sibling paths before concluding that a guard is
effective or missing.
- Check filesystem, process, query, template, serialization, redirect,
network, and logging sinks as applicable.
Identity and business-logic pass
- Trace authentication, authorization, session, tenant, workflow, and
state-transition behavior end to end.
- Review negative cases, replay, ordering, concurrency, approval boundaries,
ownership changes, and recovery flows.
Platform and supply-chain pass
- Review dependencies, build scripts, CI/CD, containers, IaC, deployment
defaults, secret references, release provenance, and privileged
automation.
Failure and abuse pass
- Consider malformed input, unexpected sequencing, unavailable
dependencies, partial failure, excessive resource use, and malicious but
syntactically valid behavior.
Search for sibling instances whenever a root cause is found. Deduplicate
findings by root cause while listing all confirmed affected locations.
6. Use automation carefully
Use existing local tools only when they materially improve evidence:
- project tests and security-focused tests
- compiler and type checks
- existing linters or static analyzers
- existing secret, dependency, container, or IaC scanners
- lockfile and package-manager audit commands
- repository history when it can be inspected without exposing sensitive data
Before execution:
- inspect the command and project scripts it invokes
- identify possible network, install-hook, deployment, or mutation behavior
- obtain permission for network access or dependency installation
- configure redaction when output could contain sensitive values
Never convert raw tool output directly into report findings. Validate
reachability, context, compensating controls, and false positives manually.
If optional read-only helper agents are available, assign distinct review
domains and require evidence with exact paths. Keep one primary reviewer
responsible for threat modeling, reconciliation, severity, final findings, and
the report. Use a fresh challenge review for proposed Critical or High
findings when practical. Otherwise perform the same workflow sequentially.
7. Validate and classify candidates
Classify each candidate as one of:
- Confirmed security finding — concrete affected behavior, a plausible
attack or failure path, sufficient evidence, and explicit assumptions
- Needs validation — potentially important, but runtime, configuration, or
reachability evidence is missing
- Defense-in-depth or quality concern — worthwhile hardening that does not
currently establish a security vulnerability
- False positive — the suspected path is blocked or inapplicable, with the
reason recorded
Only confirmed findings belong in confirmed-finding counts. Keep unresolved
items in a separate Needs validation section.
For every proposed Critical or High finding, re-check:
- all relevant callers and guards
- attacker control and prerequisites
- runtime and deployment assumptions
- compensating controls
- the claimed impact
- sibling instances
- whether the evidence reveals sensitive data
Downgrade or reclassify rather than overstating uncertainty.
8. Assign severity, confidence, and mappings
Keep these concepts separate:
- Severity — technical impact and exploitability
- Confidence — strength and completeness of the evidence
- Remediation priority — repository-specific urgency, exposure, business
impact, and effort
Use Critical, High, Medium, Low, or Informational severity and explain
the rationale.
Apply the selected practical standards mapping:
- Map the root cause to the most precise applicable CWE. Do not map merely to
an impact, category, or broad view.
- Use CVSS v4.0 only when evidence supports the required metrics. Include both
the score and full vector. Otherwise use qualitative severity rather than
false precision.
- Cite versioned OWASP ASVS requirement identifiers only for applicable
web-application controls.
- Use NIST SSDF practices for systemic development, verification, artifact,
and root-cause themes rather than forcing them onto every finding.
When network-backed research is approved, verify current standard versions and
identifiers against official sources before citing them. Without network
permission, disclose version uncertainty and omit mappings that cannot be
verified safely.
Relevant primary sources:
9. Produce the report
Read references/report-template.md before drafting.
For each confirmed finding, include:
- stable ID and concise title
- severity, confidence, and remediation priority
- affected components and exact
path:line evidence
- root cause
- reachable control or data-flow explanation
- prerequisites and configuration assumptions
- technical and business impact
- safe reproduction steps or reasoning
- CWE and applicable standards mappings
- root-cause remediation
- validation and regression-test guidance
- sibling locations
- redacted supporting evidence
Use minimal code excerpts and redact sensitive material. Never include secret
values, access tokens, personal data, or weaponized live-target instructions.
Write the approved report path only after the review is complete. If writing
fails or is not possible, return the complete report in the conversation and
state why.
Then provide a concise chat summary containing:
- overall risk
- confirmed finding counts by severity
- the top three actions
- important limitations
- the report path
Report quality gate
Before finishing, verify:
- the report target, revision, scope, exclusions, and limitations are explicit
- the threat model and coverage ledger agree with the reviewed repository
- confirmed counts match the detailed findings
- every confirmed finding has concrete repository evidence
- severity, confidence, and priority are not conflated
- uncertain candidates are not presented as confirmed vulnerabilities
- findings are deduplicated by root cause with sibling locations retained
- remediation addresses root causes and includes retest guidance
- no secret values or sensitive local data appear in the report
- scanner output has been interpreted rather than pasted
- residual risks and unreviewed areas are visible
- the report does not claim certification, exhaustive assurance, or proof of
safety
- no repository file other than the approved report was modified
Edge cases
- No confirmed findings: Say
No confirmed findings within the reviewed scope; never say the repository is secure.
- Large monorepository: Preserve deep mode, prioritize by threat and trust
boundary, and mark incomplete areas explicitly rather than pretending full
coverage.
- Missing runtime context: Move affected candidates to
Needs validation
and explain what evidence would resolve them.
- Unavailable build or scanner: Continue manual review and record the
limitation.
- Dirty working tree: Record that the report covers the observed working
tree and identify the commit separately.
- Generated or vendored code: Review its provenance and exposure, but avoid
line-by-line review unless it is modified locally or directly security
critical.
- Possible embedded secret: Do not open or print it. Report only the type,
location, context, and heavily redacted or non-reversible identifier when
safely available.
- Existing report path: Ask before overwriting it.
1---2name: cybersec-review3description: Performs a deep, threat-driven cybersecurity review of a software repository and produces a layered Markdown report for leaders and engineers. Use when asked for a deep security review, secure code review, repository security audit, vulnerability assessment, or review of source, dependencies, CI/CD, infrastructure-as-code, containers, and configuration. Not for unauthorized live penetration testing, incident response, compliance certification, or automatic remediation.4---56# Cybersecurity Review78Perform a deep, threat-driven review of a software repository and produce an9evidence-based report. Review only: do not modify application source,10configuration, infrastructure, tests, or dependencies while this skill is11active.1213The only repository file this workflow may create or modify is the approved14report file.1516## Outcomes1718Produce:19201. a concise decision layer for leaders212. detailed, reproducible findings for engineers223. a coverage ledger showing what was reviewed, limited, excluded, or not23 applicable244. a prioritized remediation roadmap255. explicit assumptions, unresolved questions, and residual risks2627A repository review is point-in-time evidence, not proof that vulnerabilities28do not exist.2930## Non-negotiable behavior3132- Confirm the review target and authorization when they are not already clear.33 A user-provided local repository normally establishes authorization for34 repository-only analysis, but never for deployed systems or external35 accounts.36- Never access live applications, cloud accounts, clusters, third-party37 services, or production data as part of this skill.38- Never retrieve, validate, reuse, transmit, or print credentials or secret39 values.40- Do not read known sensitive local files such as `.env` files, credential41 stores, private keys, kubeconfig files, or cloud authentication files.42- Do not upload repository content, findings, hashes, or artifacts to external43 services.44- Ask before installing a tool, downloading dependencies, enabling package45 install hooks, or using a network-backed advisory or research service.46- Inspect unfamiliar commands before running them. Do not execute commands47 that may deploy, publish, alter external state, destroy data, or invoke48 untrusted install hooks.49- Treat scanner output as leads, not findings.50- Do not claim compliance, certification, exhaustive coverage, or absence of51 vulnerabilities.52- Do not fix findings during the review. Finish the report first; remediation53 requires a separate user request.5455If safe review cannot continue within these boundaries, stop and explain the56limitation instead of weakening them.5758## Intake5960Before reviewing, establish or infer:6162- repository root and requested revision, branch, or commit63- included and excluded paths64- intended deployment model and exposed interfaces65- sensitive assets and important business operations66- authentication, authorization, tenancy, and trust assumptions67- known concerns or prior findings68- available build, test, lint, and security commands69- whether network-backed research and advisory checks are permitted70- report destination7172Ask only for information that cannot be learned safely from the repository.73State assumptions when the user cannot provide an answer.7475Default the report path to `SECURITY_REVIEW.md`. Ask before overwriting an76existing file.7778## Review workflow7980### 1. Record the review snapshot8182Record:8384- repository name and root85- commit hash when version control is available86- branch or revision87- whether the working tree contains uncommitted changes88- review date89- relevant languages, frameworks, package managers, and build systems90- tool and time limitations91- approved network access92- explicit exclusions9394Do not inspect unrelated machine configuration or authentication state.9596### 2. Map the repository9798Identify the security-relevant shape of the system:99100- executable entry points and externally reachable interfaces101- services, packages, modules, and trust boundaries102- authentication, session, authorization, and tenant-isolation controls103- data stores, queues, caches, filesystems, and sensitive data flows104- parsers, serializers, templates, interpreters, and command execution105- outbound network access and third-party integrations106- dependencies, lockfiles, build scripts, and generated artifacts107- CI/CD workflows, release automation, containers, IaC, and deployment108 configuration109- logging, audit, monitoring, and error handling110- tests covering important controls111112Distinguish observed repository facts from assumptions about runtime113configuration or production behavior.114115### 3. Build a lightweight threat model116117Capture:118119- assets and sensitive operations120- legitimate actors and likely attacker capabilities121- entry points and externally controlled inputs122- components and data flows123- trust boundaries124- important security controls125- prioritized abuse cases126- deployment assumptions that affect reachability or impact127128Use whichever lightweight method best fits the repository, such as STRIDE,129abuse cases, attack trees, or direct asset–entry point–trust boundary analysis.130The method matters less than making the reasoning explicit.131132### 4. Create the coverage plan133134Create a coverage ledger before reporting findings. Mark each relevant area as135`Not reviewed`, `In progress`, `Reviewed`, `Limited`, or `Not applicable`.136137Evaluate at least these areas when applicable:138139- attack surface and trust-boundary crossings140- authentication, account recovery, and session management141- authorization, object access, role enforcement, and tenant isolation142- business workflows, state transitions, replay, races, and abuse resistance143- input validation, injection, output encoding, and unsafe interpretation144- serialization, parsing, file handling, process execution, and outbound145 requests146- secrets, key handling, randomness, cryptography, and certificate validation147- sensitive-data storage, transport, retention, logging, and privacy148- error handling, fail-open behavior, availability, and resource limits149- dependency, build, provenance, and software supply-chain risks150- CI/CD permissions, artifact handling, and release controls151- container, IaC, cloud, and deployment security152- auditability, monitoring, and security-control tests153154Prioritize externally reachable paths, privilege boundaries, cross-tenant155operations, sensitive state changes, money movement, credential handling,156untrusted parsing, and deployment controls.157158Do not force irrelevant checks onto a repository merely to complete a generic159checklist.160161### 5. Perform the manual review162163Use multiple focused passes:1641651. **Architecture and control pass**166 - Check whether security controls exist at the correct trust boundaries.167 - Look for bypass paths, inconsistent enforcement, unsafe defaults, and168 controls implemented only in clients.1691702. **Data-flow pass**171 - Trace attacker-controlled input from entry points through validation and172 transformation to sensitive sinks.173 - Trace callers and sibling paths before concluding that a guard is174 effective or missing.175 - Check filesystem, process, query, template, serialization, redirect,176 network, and logging sinks as applicable.1771783. **Identity and business-logic pass**179 - Trace authentication, authorization, session, tenant, workflow, and180 state-transition behavior end to end.181 - Review negative cases, replay, ordering, concurrency, approval boundaries,182 ownership changes, and recovery flows.1831844. **Platform and supply-chain pass**185 - Review dependencies, build scripts, CI/CD, containers, IaC, deployment186 defaults, secret references, release provenance, and privileged187 automation.1881895. **Failure and abuse pass**190 - Consider malformed input, unexpected sequencing, unavailable191 dependencies, partial failure, excessive resource use, and malicious but192 syntactically valid behavior.193194Search for sibling instances whenever a root cause is found. Deduplicate195findings by root cause while listing all confirmed affected locations.196197### 6. Use automation carefully198199Use existing local tools only when they materially improve evidence:200201- project tests and security-focused tests202- compiler and type checks203- existing linters or static analyzers204- existing secret, dependency, container, or IaC scanners205- lockfile and package-manager audit commands206- repository history when it can be inspected without exposing sensitive data207208Before execution:209210- inspect the command and project scripts it invokes211- identify possible network, install-hook, deployment, or mutation behavior212- obtain permission for network access or dependency installation213- configure redaction when output could contain sensitive values214215Never convert raw tool output directly into report findings. Validate216reachability, context, compensating controls, and false positives manually.217218If optional read-only helper agents are available, assign distinct review219domains and require evidence with exact paths. Keep one primary reviewer220responsible for threat modeling, reconciliation, severity, final findings, and221the report. Use a fresh challenge review for proposed Critical or High222findings when practical. Otherwise perform the same workflow sequentially.223224### 7. Validate and classify candidates225226Classify each candidate as one of:227228- **Confirmed security finding** — concrete affected behavior, a plausible229 attack or failure path, sufficient evidence, and explicit assumptions230- **Needs validation** — potentially important, but runtime, configuration, or231 reachability evidence is missing232- **Defense-in-depth or quality concern** — worthwhile hardening that does not233 currently establish a security vulnerability234- **False positive** — the suspected path is blocked or inapplicable, with the235 reason recorded236237Only confirmed findings belong in confirmed-finding counts. Keep unresolved238items in a separate `Needs validation` section.239240For every proposed Critical or High finding, re-check:241242- all relevant callers and guards243- attacker control and prerequisites244- runtime and deployment assumptions245- compensating controls246- the claimed impact247- sibling instances248- whether the evidence reveals sensitive data249250Downgrade or reclassify rather than overstating uncertainty.251252### 8. Assign severity, confidence, and mappings253254Keep these concepts separate:255256- **Severity** — technical impact and exploitability257- **Confidence** — strength and completeness of the evidence258- **Remediation priority** — repository-specific urgency, exposure, business259 impact, and effort260261Use `Critical`, `High`, `Medium`, `Low`, or `Informational` severity and explain262the rationale.263264Apply the selected practical standards mapping:265266- Map the root cause to the most precise applicable CWE. Do not map merely to267 an impact, category, or broad view.268- Use CVSS v4.0 only when evidence supports the required metrics. Include both269 the score and full vector. Otherwise use qualitative severity rather than270 false precision.271- Cite versioned OWASP ASVS requirement identifiers only for applicable272 web-application controls.273- Use NIST SSDF practices for systemic development, verification, artifact,274 and root-cause themes rather than forcing them onto every finding.275276When network-backed research is approved, verify current standard versions and277identifiers against official sources before citing them. Without network278permission, disclose version uncertainty and omit mappings that cannot be279verified safely.280281Relevant primary sources:282283- OWASP Secure Code Review Cheat Sheet:284 https://cheatsheetseries.owasp.org/cheatsheets/Secure_Code_Review_Cheat_Sheet.html285- OWASP Threat Modeling Cheat Sheet:286 https://cheatsheetseries.owasp.org/cheatsheets/Threat_Modeling_Cheat_Sheet.html287- OWASP ASVS:288 https://owasp.org/www-project-application-security-verification-standard/289- OWASP WSTG Reporting:290 https://owasp.org/www-project-web-security-testing-guide/latest/5-Reporting/01-Reporting_Structure291- MITRE CWE mapping guidance:292 https://cwe.mitre.org/documents/cwe_usage/guidance.html293- FIRST CVSS v4.0:294 https://www.first.org/cvss/v4.0/specification-document295- NIST Secure Software Development Framework:296 https://csrc.nist.gov/pubs/sp/800/218/final297298### 9. Produce the report299300Read `references/report-template.md` before drafting.301302For each confirmed finding, include:303304- stable ID and concise title305- severity, confidence, and remediation priority306- affected components and exact `path:line` evidence307- root cause308- reachable control or data-flow explanation309- prerequisites and configuration assumptions310- technical and business impact311- safe reproduction steps or reasoning312- CWE and applicable standards mappings313- root-cause remediation314- validation and regression-test guidance315- sibling locations316- redacted supporting evidence317318Use minimal code excerpts and redact sensitive material. Never include secret319values, access tokens, personal data, or weaponized live-target instructions.320321Write the approved report path only after the review is complete. If writing322fails or is not possible, return the complete report in the conversation and323state why.324325Then provide a concise chat summary containing:326327- overall risk328- confirmed finding counts by severity329- the top three actions330- important limitations331- the report path332333## Report quality gate334335Before finishing, verify:336337- the report target, revision, scope, exclusions, and limitations are explicit338- the threat model and coverage ledger agree with the reviewed repository339- confirmed counts match the detailed findings340- every confirmed finding has concrete repository evidence341- severity, confidence, and priority are not conflated342- uncertain candidates are not presented as confirmed vulnerabilities343- findings are deduplicated by root cause with sibling locations retained344- remediation addresses root causes and includes retest guidance345- no secret values or sensitive local data appear in the report346- scanner output has been interpreted rather than pasted347- residual risks and unreviewed areas are visible348- the report does not claim certification, exhaustive assurance, or proof of349 safety350- no repository file other than the approved report was modified351352## Edge cases353354- **No confirmed findings:** Say `No confirmed findings within the reviewed355 scope`; never say the repository is secure.356- **Large monorepository:** Preserve deep mode, prioritize by threat and trust357 boundary, and mark incomplete areas explicitly rather than pretending full358 coverage.359- **Missing runtime context:** Move affected candidates to `Needs validation`360 and explain what evidence would resolve them.361- **Unavailable build or scanner:** Continue manual review and record the362 limitation.363- **Dirty working tree:** Record that the report covers the observed working364 tree and identify the commit separately.365- **Generated or vendored code:** Review its provenance and exposure, but avoid366 line-by-line review unless it is modified locally or directly security367 critical.368- **Possible embedded secret:** Do not open or print it. Report only the type,369 location, context, and heavily redacted or non-reversible identifier when370 safely available.371- **Existing report path:** Ask before overwriting it.