skills/security-threat-analysis/SKILL.md
Use when analyzing a specific security threat from a referenced source (CVE, GHSA, security advisory, blog post, or write-up). Produces a human-readable remediation report with step-by-step instructions an AI agent can follow to eliminate the threat in the current project.
npx skillsauth add pekral/cursor-rules security-threat-analysisInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
@rules/php/core-standards.mdc@rules/php/dependency-selection.mdc — when the remediation playbook proposes adopting a new Composer package (e.g. a hardened replacement for a vulnerable library, or a security helper not previously installed), run the Activity gate + Compatibility gate from that rule and embed the selection note in the playbook step. Pin upgrades of an already-installed package fall under @skills/composer-update/SKILL.md discovery and do not need the full selection process.@rules/security/backend.md@rules/security/frontend.md@rules/security/mobile.md@rules/reports/general.mdc. When the remediation report is published as a GitHub PR comment (technical channel — the PR is the codebase tracker), it stays in canonical English per the rule's Exception — technical CR findings on the GitHub PR. When it is published as a comment on the originating tracker issue / JIRA ticket (non-technical channel), it follows the language of the source assignment. CVE / GHSA identifiers, CWE / OWASP labels, package names, and code identifiers stay verbatim regardless of the surrounding prose language.@skills/security-review/SKILL.md; that skill audits the whole project, this skill analyzes one referenced external threatBefore generating the report, capture:
composer.json, package.json, lockfiles)If running interactively, confirm the inputs with the user. If running autonomously (e.g. invoked by resolve-issue), infer them from the triggering issue and state the assumptions at the top of the report.
WebFetch (or the available MCP equivalent). If the source is a CVE/GHSA identifier without a URL, resolve it against https://nvd.nist.gov/vuln/detail/<CVE> or https://github.com/advisories/<GHSA> first.composer.lock / package-lock.json / yarn.lock and report exact installed versions; mark as Affected / Not affected / Indeterminate..env.example, framework config files, web-server config, or CI files for the dangerous setting.Render the report as Markdown using this structure:
# Security Threat Analysis — <Threat Title>
## Source
- **URL / Identifier**: <link or CVE/GHSA id>
- **Published**: <date>
- **Patched in**: <upstream fixed version(s)>
## Summary (non-technical)
One short paragraph in plain language: what the threat is, why it matters, and what happens if it is not fixed. No code, no jargon.
## Classification
- **Category (OWASP / CWE)**: <e.g. A03:2021 / CWE-89>
- **Severity**: Critical | High | Medium | Low
- **CVSS**: <score if published>
- **Attack vector**: <network/local/…>, <authenticated/unauthenticated>
- **Preconditions**: <feature, role, configuration>
## Project Exposure
- **Status**: Affected | Not affected | Indeterminate
- **Evidence**:
- `<file>:<line>` — <what was found>
- `<dependency>@<version>` — <vulnerable range comparison>
- If status is *Not affected*, state which check disproved exposure.
## Remediation Plan
Ordered steps an AI agent can execute:
1. <Exact action — e.g. `composer require vendor/package:^X.Y`>
2. <Exact action — e.g. update `config/security.php` key `…` to `…`>
3. <Exact action — e.g. add middleware `…` to route group `…`>
For each step, include:
- **Target**: <file or command>
- **Change**: <minimal diff or command>
- **Why**: <one sentence linking the step to the threat>
## Verification
- **Manual check**: <request, screen, or log line that confirms the fix>
- **Automated test**: <test name and assertion that fails before the fix and passes after>
- **Coverage note**: <which changed code paths must reach 100 %>
## Residual Risks and Follow-ups
- <Anything the upstream fix does not cover>
- <Compensating controls if the upstream fix is not yet available>
Every section must be filled. If a section has nothing to report, write a short explicit note (e.g. No residual risk identified.) instead of leaving placeholders.
development
Use when autonomously resolving the oldest open GitHub issue end-to-end. Picks the oldest open issue (optionally filtered by label, default `Resolve_by_AI`), delegates resolution to `resolve-issue`, then runs `code-review-github`, `process-code-review`, and `merge-github-pr` on the resulting pull request. Stops and reports any blocker (merge conflict, failing CI, unresolved Critical/Moderate findings) instead of force-merging.
development
Use when preparing data and context before /resolve-issue, TDD, or CR runs. Loads the assignment, extracts every concrete user scenario from the task description and acceptance criteria, maps each scenario to the codebase, seeds the development database with the records needed to reproduce the bug or feature end-to-end, and reports any gap that would force the implementing agent to hallucinate.
development
Use when preparing a concise QA report for an internal tester from a JIRA task and its linked pull requests — focused on what the tester should report back to the dev team — and posting it as a JIRA comment.
testing
Use when checking that the pull request implementation actually fulfills the business requirements stated in the linked issue or task. Returns a plain-language markdown block listing only Critical functional gaps **only when at least one gap exists**; when the implementation satisfies every stated requirement the skill returns a skip status and the calling CR wrapper embeds nothing. The block (when present) carries actionable gaps only — never lists of satisfied requirements or open questions. No local file is created and the block is not embedded in the GitHub PR comment.