Security scan

From CoWork-OS/CoWork-OS · View interactive version

Security scan is an AI agent skill from the GitHub repository CoWork-OS/CoWork-OS. Use when the user asks for a repository-wide or scoped-path security scan.

How to use this skill

Skill file

Security Scan

Used when a user wants to audit an entire repository or a user-specified path, package, folder, or submodule-like scope for security vulnerabilities. Keep the scan phases separate and produce final HTML and markdown reports.

Phase Sequence

Keep these phases distinct and run them in linear order:

  1. $threat-model
  2. $finding-discovery
  3. $validation
  4. $attack-path-analysis
  5. Generate final output

Treat this skill as the top-level orchestrator for the four skills plus the final report assembly step. Do not collapse the phases together.

For each phase:

  1. Read that phase's skill.
  2. Load only the inputs required for that phase.
  3. Complete that phase's workflow and checklist.
  4. Only then read the next phase's skill.

Do not read ahead into later-phase skills until the current phase has completed.

Do not amortize effort across phases: complete each phase to the full depth expected by that phase before moving on.

If user requests a repo-side scan or a scoped scan, stop and ask for authorization for subagents now before setting up the goal.

Goal Setup

Before substantive scan work, create a Codex goal for the scan if the runtime exposes goal tools and no active goal already covers this scan. The objective should state that the scan must not stop until the resolved files in scope have been covered and the required coverage artifacts prove that closure.

Use objective wording shaped like:

Run the Codex Security repository/scoped-path scan for <resolved target>; do not stop until every in-scope file/worklist row has a completion receipt or explicit deferred closure, every candidate has required ledger receipts, and the final report is written.

If a compatible active goal already exists, continue under it instead of creating a duplicate. If goal tools are unavailable, state the same coverage objective in the first visible scan update and continue.

Do not mark the goal complete until:

Artifact Resolution

The path references in this skill are the default locations for this phase.

If the user explicitly provides a different path for a required input or output, use the user-provided path instead of the corresponding default path referenced in this skill.

If a required input is still missing, stop and ask the user for it before continuing.

Use the shared scan artifact path conventions in ../../references/scan-artifacts.md.

Execution Plan

Follow this plan in order. Do not skip ahead to a later phase until the current phase has produced its intended output.

  1. Resolve the scan target, repo_name, security_scans_dir, scan_id, scan_dir, and artifacts_dir using ../../references/scan-artifacts.md.
  2. Create or adopt the scan goal described in Goal Setup.
  3. Run $threat-model first.
  1. Run $finding-discovery as the second step, against the resolved repository or scoped path and using the per-scan threat model as context.
  1. Run $validation as the third step, for each candidate that came out of discovery and each open, reportable, or deferred seeded/root-control ledger row that still needs closure.
  1. Run $attack-path-analysis as the fourth step, for findings and validation closure rows that still need reportability, attack-path, and severity analysis after validation.
  1. Assemble the final output last using ../../references/final-report.md and the outputs of the earlier phases: finding discovery plus each candidate finding's validation and attack-path reports.

Scan Scope

Scan Target

Resolve the requested audit scope before starting:

Treat the resolved repository or scoped path as the in-scope codebase for the later phases of this workflow.

Scoped Exhaustive Mode

For repository-wide and scoped-path scans, follow references/repository-wide-scan.md and every required reference it lists.

If the user doesn't explicitly authorize subagents, stop and ask for the permission because the use of subagents is vital to the performance of exhaustive repository or scoped-path scans. If you are pursuing a goal and authorization for subagents is needed, block the goal and ask for authorization first, or the scan will not work.

Use the per-scan artifact directory layout from ../../references/scan-artifacts.md.

Final Output

Assemble the final markdown report, final HTML report, and Codex app review directives using ../../references/final-report.md.

Hard Rules

Read ../../references/shared-hard-rules.md before applying scan-mode-specific hard rules.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.