finding-discovery
What it does
This skill looks through code for possible security weaknesses and lists them as candidates. It is for security teams who want a first set of leads that can be checked later.
When to use it
- ✓When a security scan is in its discovery stage and needs candidate issues.
- ✓When you want to find possible vulnerabilities in a code change.
- ✓When you want a list of suspected weaknesses in a repository, with the evidence for each one.
Skill link
https://github.com/openai/codex-security/blob/main/plugins/codex-security/skills/finding-discovery/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Look through the changes in this branch for possible security weaknesses, and list each candidate with its evidence.”
5 new skills a week. 1 minute to read.
How it works
The AI reviews the authorized source and each changed file against the threat model and the project's security guidance. It records each candidate with its evidence but does not decide the final severity.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Security Finding Discovery
Identify technically plausible security vulnerabilities in the authorized source, using the threat model and applicable security policy. Discovery preserves evidence for later validation; it does not decide final severity.
Read ../../references/artifact-storage.md before saving output and ../../references/security-guidance.md before source review. Resolve applicable policy for each reviewed path, including delegated assignments. Honor explicit input and output paths; ask for an explicitly required input only when its absence prevents the requested analysis.
Select the Workflow
Standard and Deep workers use their coordinator's self-contained prompts rather than this phase skill.
- Running compact diff: read the supplied inventory through
list_codex_security_review_items, review every assigned changed file, and record all candidates once withrecord_codex_security_discovery_candidates. Do not create ranked worklists, per-finding ledgers, receipts, or discovery reports. - Standalone diff without a compact inventory: use
../security-scan/references/scan-artifacts-and-ledger.mdfor the changed-file worklist and retained phase artifacts. - Standalone repository discovery: apply the evidence criteria below to the authorized source and return the candidates and coverage limitations. Do not start a scan or run the diff worklist pipeline.
For a diff, inspect the actual changed behavior, including deleted files at the baseline revision. Follow supporting code far enough to understand the affected boundary; expand to sibling callers when a changed shared control affects them. Do not broaden into an unrelated repository audit.
Evidence Criteria
- Trace attacker-controlled input or a privileged operation through the closest relevant control to the sink and security impact. Explain why the control is absent, bypassable, or applied to the wrong value or boundary.
- Check runtime reachability and deployment assumptions. Record effective guards and containment as counterevidence; a safe sibling implementation does not establish that the candidate path is safe.
- Preserve the root-control location as well as entrypoints, wrappers, concrete implementations, and sinks needed to understand the claim. When the claim covers several implementations, inspect those implementations rather than asserting that all are affected.
- Keep independently reachable vulnerable instances addressable. Merge duplicate observations of the same source/control/sink/impact instead of splitting cosmetic variants; retain all affected locations and original candidate IDs when merging.
- Follow explicit user or advisory seeds to their exact source and control. Record the evidence that supports, disproves, or leaves the seed unresolved; a nearby issue in the same family does not close it. Use only authorized source material and do not fetch advisory links without permission.
- Distinguish concrete security impact from maintainability or robustness concerns. A crash, dangerous API, optional feature, or missing check is a lead, not a finding by itself. Carry plausible candidates with explicit proof gaps to validation rather than inventing evidence or discarding them for lack of a runnable reproduction.
Divide independent review assignments among available workers when useful, with the target, scope, relevant policy/model, and required result fields. The parent reviews unassigned work and reconciles duplicates. Do not repeat validation or attack-path phases inside discovery.
Candidate Output
For each candidate, retain:
- Stable candidate ID and title; preserve supplied seed or ledger IDs and advisory references.
- Affected file/line locations, labeling
entrypoint/wrapper,root_control,sink, andconcrete_implementationwhere useful. - Attacker-controlled source, closest control, sink or broken control, plausible impact, and the source evidence connecting them.
- Counterevidence, deployment preconditions, unresolved questions, and what validation needs to establish.
- CWE IDs when known, otherwise an empty list.
- For repository or scoped-path instances, an instance key
<family>:<file>:<line>when required by the caller. - For diff findings,
relevant_linesonly where relevant buggy behavior overlaps the diff.
Use the caller's structured candidate contract. For a legacy diff, save the discovery report and discovery receipts at the paths in ../../references/scan-artifacts.md; subsequent
FAQ
Does discovery decide which issues are real?
No. Discovery only collects candidates with evidence, and later validation decides severity.
What guidance does it follow?
It applies the project's security policy to each reviewed path, including nested guidance files.
Does it cover the whole repository?
It covers the source it is given, and it reports any coverage limits so gaps stay visible.
Details
Original description by the author
Use when Codex is already in the finding-discovery phase of a security scan or the user explicitly asks to discover candidate security findings in a repository or code change. Do not use as the primary trigger for full PR, commit, branch, patch, or repository scans.
repo: openai/codex-security
Popularity
- GitHub stars
- 11k
- Ranking position
- #11751
- License
- Apache-2.0
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
assess-patch-risk
11kHelps your agent judge how risky a code patch is before merging, covering what it affects, which tests cover it and whether it can be reverted.
attack-path-analysis
11kHelps your agent trace a security finding from its entry point to its target, then judge the real impact and whether it should be reported.
cloud-findings
11kLets your agent read existing Codex Security Cloud findings, reports and scan status from your connected account, without changing anything.
deep-security-scan
11kHelps your agent run a thorough, multi-pass security scan of a repository or folder by repeating independent checks and combining validated findings.
Similar skills
reverse-engineer-anything
422kHelps your agent look inside shipped apps and packages to explain features, compare versions, or guide a rebuild, using the REA tool.
1password
394kHelps your agent set up the 1Password CLI, sign in, and read or inject secrets without printing their values into chat.
healthcheck
394kHelps your agent audit the computer or server that runs OpenClaw for security risks, such as SSH, firewall, updates, and backups, then suggest safe fixes.