security-deep-scan — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited security-deep-scan (Agent Skill) and scored it 96/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 1 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 1 flagged
A bulleted imperative like {match} tells the agent to never reveal, disclose, or mention something to the user. Used adversarially it can instruct the agent to hide its tool calls or lie about what it did — stripping the transparency a user relies on to trust the agent.
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
If you know another deep scan is already running over the same scope, ask the user whether to continue or stop before doing substantive work.
Deep Security Scan is a higher-recall wrapper around the repository-wide and scoped-path exhaustive-scan machinery in references/repository-wide-scan.md. It preserves the ordinary security-scan phase model and final report shape, but repeats the most variance-sensitive phase, finding discovery, before centralized judgment.
The wrapper owns orchestration only:
references/repository-wide-scan.mdreferences/phase-finding-discovery.mdreferences/phase-validation.md, references/phase-attack-path-analysis.md, canonical JSON completion, and generated report finalization onceDo not replace the established scan rules with custom shortcuts.
Read references/config-preflight.md and dispatch and await the preflight execution described there with the security_deep_scan capability profile before evaluating the workflow-specific requirements below and before any substantive scan work. Follow the returned block/warn/suggest/ready results. On blocked or incomplete, present the exact reasons and any advisory guidance and config delta, ask the user whether to apply the remediation, and stop for the answer before substantive work; do not auto-fail. Do not treat a config value that differs from a suggested patch as a warning unless the capability requirement itself is unmet.
The phase references (references/phase-threat-model.md, references/phase-finding-discovery.md, references/phase-validation.md, references/phase-attack-path-analysis.md) and the repository-wide and scoped-path exhaustive-scan machinery (references/repository-wide-scan.md) are bundled with this skill and always available, so no plugin-availability check is required before starting substantive scan phases.
This workflow does require parallel delegated workers for repeated discovery. Treat explicit invocation of Deep Security Scan as the user's request for this delegated-worker workflow. If delegation is unavailable in the current environment, do not claim Deep Security Scan ran; explain the limitation and offer an ordinary security scan as the fallback path.
When delegated discovery workers are spawned from the current scan, use the host's default subagent type, model, and reasoning effort. The canonical worker brief below is self-contained; spawn each discovery worker with a fresh context (no inherited coordinator history) when your host supports it.
Deep Security Scan is the highest-volume workflow in this set, by design: it re-runs discovery with six workers per round, repeating rounds until discovery is saturated or capped, so its discovery work is roughly an ordinary security scan's discovery × six × the number of rounds, plus the centralized validation and attack-path tail.
After the capability preflight returns ready and the target is resolved, and before goal setup or the first discovery round:
<python_command> <plugin_dir>/scripts/generate_rank_input.py make-repo-rank-input --repo <repo_root> --scope <scope> --out <discovery_dir>/rank_input.jsonl): about files × planned top-percent / 100 file-review passes.You may also give a rough input-token count for one pass as the total in-scope file size in characters divided by about 4. Then state the deep multiplier: × six workers × the number of rounds. Report token counts, not money; a dollar cost depends on token pricing, model, and input/output/cache ratios that change.
Then stop and wait for the user's explicit approval before creating shared worklists or goals or spawning the first discovery round. This is a binary go/no-go on deep scan as scoped — do not propose narrowing the scope or switching to a lighter scan. Proceed without waiting only if the user's request already explicitly approved this scope.
After the capability preflight returns ready, if your host has goal/todo/task-tracking tools, create the coordinator goal capturing the objective; otherwise state the same objective in your first visible update and track it yourself. The objective should state that the scan must not stop until the shared exhaustive worklists exist, discovery either reaches a terminal state or records the first-round no-plausible-candidates path, canonical discovery artifacts and any candidate ledgers are assembled, centralized validation and attack-path receipts are complete or explicitly deferred when those phases are required, and the final markdown report is written.
Use objective wording shaped like:
Run the Deep Security Scan for <resolved repository target>; do not stop until the shared exhaustive worklists exist, discovery is saturated, capped, or on the first-round no-plausible-candidates path, canonical discovery artifacts and any candidate ledgers are assembled, centralized validation and attack-path receipts are complete or explicitly deferred when those phases are required, and the final markdown report is written.
If a compatible active goal already exists in the coordinator thread, continue under it instead of creating a duplicate.
Every delegated discovery worker must also create the worker-local discovery goal before substantive worker discovery if the worker runtime has goal/todo/task-tracking tools; otherwise the worker states the same objective in its first visible update and tracks it itself. Use objective wording shaped like:
Run Deep Security Scan discovery worker <round id>/<worker id> for <resolved repository target>; do not stop until the worker-specific threat model and discovery artifact set are written, every assigned shared worklist row has a worker-local completion receipt or explicit deferred closure, and the worker summary is returned to the coordinator.
If a compatible active goal already exists in the worker thread, continue under it instead of creating a duplicate.
Worker goals are discovery-worker scoped only. A worker must not mark its worker-local goal complete until its threat model, discovery report, repository-wide ledgers, candidate ledgers, and coordinator-facing summary are saved or returned for the assigned worker artifact paths. The coordinator owns the top-level Deep Security Scan goal and must not mark it complete until:
rank_input.jsonl and exhaustive deep_review_input.jsonl exist at the standard discovery pathssaturated or cappedDo not enter Goal Setup until the capability preflight has returned ready and the Cost Gate has been approved by the user.
references/final-report.md.These invariants are part of the workflow contract. Do not relax, reinterpret, or replace them with coordinator improvisation.
6 usable discovery workers per completed round<discovery_dir>/rank_input.jsonl plus one exhaustive shared <discovery_dir>/deep_review_input.jsonl before the first discovery round, and every discovery worker must consume that same shared worklist pair without regenerating, reranking, or overwriting itfinding_discovery_report.md candidate shape through every merge pass; the merged report is the canonical candidate inventory, not a later summary derived from some other inventoryfindings/<candidate_id>/candidate_ledger.jsonl record that names the absorbed worker candidates and ledgers it subsumes before centralized validation beginsStart this setup only after the security_deep_scan capability preflight has returned ready.
references/repository-wide-scan.md first and follow its repository-wide or scoped-path scan semantics exactly.Deep Security Scan does not support PR diffs, commits, branch diffs, or working-tree diffs; direct those requests to an ordinary security scan. Never silently widen a scoped-path target to the repository root.
Goal Setup for that active scan context.repo_namesecurity_scans_dirscan_idscan_dirartifacts_dircontext_dirdiscovery_dircoverage_dirreconciliation_dirfindings_dir<context_dir>/threat_model.md path for the later canonical validation threat model that will be synthesized only after the discovery loop reaches a terminal state.<discovery_dir>/rank_input.jsonl once using the ordinary deterministic exhaustive-scan worklist helper: <python_command> <plugin_dir>/scripts/generate_rank_input.py make-repo-rank-input --repo <repo_root> --scope <scope> --out <discovery_dir>/rank_input.jsonl<scope> for a repository-wide target and the exact resolved relative or absolute scoped path for a scoped-path target<python_command> <plugin_dir>/scripts/generate_rank_input.py copy-deep-review-input --rank-input <discovery_dir>/rank_input.jsonl --out <discovery_dir>/deep_review_input.jsonl and declare that worklist pair authoritative and exhaustive for every workerrank_output.jsonl; Deep Security Scan does not use ranked truncation in this versionDo not let individual discovery workers reinterpret or widen the scan target, but do let them independently generate their own target-specific threat models at worker-specific paths before discovery begins.
Run discovery in synchronous rounds:
6 independent discovery workers per round10 rounds totalAlways run at least one round.
After each round:
Do not reuse completed discovery workers across rounds. Later rounds should consume only the preserved artifacts, not prior worker state. Before spawning any later round, confirm that every worker from the prior round has completed and become idle; do not interrupt an already completed worker.
While a discovery round is active, keep the coordinator neutral. It may perform orchestration bookkeeping and artifact-health checks, but it must not run its own target-specific discovery lane, form candidate hypotheses, queue likely finding families, or do repository-grounded validation preparation before the round closes.
This stop rule measures discovery saturation only. It does not claim that validated findings or final reportable findings have saturated; validation, canonical JSON completion, and report projection still happen once after the discovery loop completes.
If the first round finds no plausible candidates, write the appropriate canonical no-findings discovery artifact and continue directly to the final security-scan no-findings assembly path.
Execute this checklist in order for every completed round. Do not skip steps.
finding_discovery_report.mdEach discovery worker must be independent:
<discovery_dir>/rank_input.jsonl and exhaustive <discovery_dir>/deep_review_input.jsonl inputsreferences/phase-validation.md, no top-level references/phase-attack-path-analysis.md, and no canonical finalizationThe goal is not shallow parallelism; the goal is independent high-quality discovery diversity from repeated same-brief stochastic passes.
Use this canonical brief for every discovery worker. Do not prepend or append extra coordinator prose, skill-path boilerplate, themed emphasis, candidate-family hints, prior-round novelty hints, or coordinator-invented specialty lanes. Only substitute the resolved target details, round id, worker id, and worker-specific output paths required for the run.
You are a discovery worker, not the top-level scan coordinator. Follow this self-contained worker-specific assignment as your task. If you cannot complete it, report the problem to the coordinator rather than taking over or terminating the overall scan.
Run the threat-model phase and then the finding-discovery phase only.
Before substantive worker work, create or adopt one worker-local goal if your runtime has goal/todo/task-tracking tools. Use this objective:
`Run Deep Security Scan discovery worker <round id>/<worker id> for <resolved repository target>; do not stop until the worker-specific threat model and discovery artifact set are written, every assigned shared worklist row has a worker-local completion receipt or explicit deferred closure, and the worker summary is returned to the coordinator.`
If a compatible active goal already exists in this worker thread, continue under it instead of creating a duplicate. If goal tools are unavailable, state the same objective in your first visible update and continue. Do not mark the worker-local goal complete until the threat model, finding discovery report, repository-wide ledgers, candidate ledgers, and coordinator-facing summary for your assigned artifact paths are saved or returned.
Use the provided resolved scan target exactly as given.
First generate your own threat model for that resolved target using the ordinary rules in `references/phase-threat-model.md`, but write it only to your worker-specific threat-model output path. Do not read, reuse, overwrite, or infer a shared coordinator threat model.
Then follow `references/phase-finding-discovery.md` using your own worker-specific target threat model as the threat-model source of truth.
Do not reinterpret the target, run the top-level validation phase in `references/phase-validation.md`, run the top-level attack-path-analysis phase in `references/phase-attack-path-analysis.md`, author canonical final artifacts, or edit repository files.
Your task is to enumerate technically plausible, distinct security finding candidates as comprehensively as possible for this scope.
Apply the ordinary finding-discovery rules in `references/phase-finding-discovery.md` in full:
- stay grounded in the code and your worker-specific threat model
- preserve separate root causes rather than cosmetic variants
- keep independently reachable instances separate
- preserve concrete source, closest-control, sink, impact, and affected-location evidence
- consume the parent-provided authoritative `<discovery_dir>/rank_input.jsonl` and exhaustive `<discovery_dir>/deep_review_input.jsonl` exactly as supplied; do not regenerate, rerank, overwrite, or reinterpret them
- treat those standard-path worklists as shared inputs while writing every worker output only to the explicit worker-specific artifact paths supplied for this discovery pass
- for repository-wide and scoped-path scans, perform the normal exhaustive deep-review, seed-research, work-ledger, raw-candidate, candidate-ledger, dedupe, repository-coverage-ledger, and frontier-pass work required by finding discovery
- for repository-wide and scoped-path scans, preserve any candidate-local validation evidence and candidate-local attack-path facts that the current discovery workflow requires before dedupe; those receipts are discovery support artifacts, not permission to run the later centralized top-level phases
- for repository-wide and scoped-path worker candidate JSONL, use one canonical machine-readable affected-location shape only:
- `affected_locations` must be an array of objects
- every object must contain `label`, `path`, and `lines`
- `detail` may be included when it materially helps later merge or validation
- use `lines` as a string even for one line, such as `"154"`
- do not emit string-only locations such as `"src/file.py:154"`, alternate `file` or `line` keys, or separate-only `source_locations` / `root_locations` / `sink_locations` fields without also materializing the unified `affected_locations` array
Return your worker-specific threat model plus the normal discovery artifact set for your worker-specific artifact paths, with enough detail for later centralized semantic merging and validation.Keep the canonical security-scan paths for the final merged pipeline. Put repeated discovery worker artifacts under the canonical artifacts_dir without overwriting one another:
<artifacts_dir>/
02_discovery/
rank_input.jsonl
deep_review_input.jsonl
deep_discovery/
round-01/
worker-01/
threat_model.md
finding_discovery_report.md
seed_research.md
work_ledger.jsonl
raw_candidates.jsonl
dedupe_report.md
deduped_candidates.jsonl
repository_coverage_ledger.md
findings/
<candidate_id>/
candidate_ledger.jsonl
worker-02/
...
round-02/
...Workers write their worker-local exhaustive discovery artifact set to their assigned paths while sharing only the standard-path <discovery_dir>/rank_input.jsonl and exhaustive <discovery_dir>/deep_review_input.jsonl.
Give each worker explicit worker-specific output paths so the discovery reports and exhaustive-scan ledgers do not overwrite one another.
For repository-wide and scoped-path workers, the machine-readable candidate streams must use this canonical affected-location contract in both raw_candidates.jsonl and deduped_candidates.jsonl:
{
"affected_locations": [
{
"label": "root_control",
"path": "src/example.py",
"lines": "154",
"detail": "Optional concise reason this location matters"
}
]
}Treat this as a schema contract, not presentation guidance:
affected_locations is always an array of objectslabel, path, and lines are required on every itemdetail is optionallines is always a string, including single-line locationsfile, line, or parallel source/root/sink-only arrays in place of the canonical arrayMerge at the level of the underlying actionable candidate, not at the level of title similarity.
Treat two candidates as the same cluster only when a careful security reviewer would consider them the same underlying issue, or when one is a narrower or more specific restatement of the other and keeping both would double-count the same candidate.
Do not merge merely because candidates:
Remediation-subsumption is required for merge eligibility:
When candidates truly merge:
Use a preserving merge, not a lossy summary:
When candidates overlap but remain materially distinct, keep them separate.
After each merge pass, retain:
finding_discovery_report.md in the normal discovery-report shape<reconciliation_dir>/deduped_candidates.jsonl path<reconciliation_dir>/dedupe_report.md path<findings_dir>/<candidate_id>/candidate_ledger.jsonl per merged candidate, recording the discovery provenance, absorbed worker candidate ids, and absorbed worker-ledger paths that justify that canonical candidateSuggested placement:
<artifacts_dir>/deep_merge/
round-01_merge_record.md
round-01_candidate_inventory.md
round-02_merge_record.md
round-02_candidate_inventory.md
canonical_candidate_inventory.mdAlso write and continuously update the canonical merged discovery report at the standard final discovery path:
<discovery_dir>/finding_discovery_report.mdThis report is not a selective promotion list, triage summary, or second consolidation layer. It is the lossless canonical merged candidate set in the same artifact shape that ordinary finding discovery in references/phase-finding-discovery.md would hand to validation.
Validation and later phases must consume this canonical merged discovery report, not the raw per-worker discovery outputs and not a hand-pruned rewrite of the merged set.
Invariant:
canonical_candidate_inventory.md must also appear substantively in finding_discovery_report.mdcanonical_candidate_inventory.md must also appear in <reconciliation_dir>/deduped_candidates.jsonl and have a canonical <findings_dir>/<candidate_id>/candidate_ledger.jsonlfinding_discovery_report.md may improve wording, synthesize complementary evidence, and normalize candidate formatting, but it may not drop, suppress, or silently collapse a canonical candidateFor repository-wide and scoped-path scans, assemble the worker discovery support artifacts into canonical artifacts before validation. This is exhaustive-scan workflow plumbing for the normal downstream phases, not a second semantic merge, candidate triage layer, or reportability filter.
<discovery_dir>/rank_input.jsonl<discovery_dir>/deep_review_input.jsonl<context_dir>/seed_research.md<discovery_dir>/work_ledger.jsonl<discovery_dir>/raw_candidates.jsonl<reconciliation_dir>/dedupe_report.md<reconciliation_dir>/deduped_candidates.jsonl<findings_dir>/<candidate_id>/candidate_ledger.jsonl<coverage_dir>/repository_coverage_ledger.mdWrite the canonical consolidated versions back to the numbered standard paths above so the validation phase in references/phase-validation.md receives the normal exhaustive-scan inputs it expects.
These support-artifact assemblies are mechanical context assembly only:
finding_discovery_report.mdfinding_discovery_report.md, treat that as a consistency problem to repair before validation, not as authority to drop the candidateEnter the centralized tail only after the discovery loop has a recorded terminal state:
It is not valid to continue into validation, attack-path analysis, or canonical finalization merely because:
Before the centralized tail begins, ensure the discovery artifacts contain the terminal evidence needed to justify it:
finding_discovery_report.md, with a one-to-one substantive correspondence to the final canonical candidate inventory<reconciliation_dir>/deduped_candidates.jsonl plus canonical <findings_dir>/<candidate_id>/candidate_ledger.jsonl records aligned one-to-one with the final canonical candidate inventorysaturated or cappedIf those artifacts or that terminal state are missing, resume the discovery loop and repair the missing evidence. Do not finalize or fail the scan merely because discovery is incomplete.
Once the recorded terminal state is present:
finding_discovery_report.md against the underlying discovery evidence<reconciliation_dir>/deduped_candidates.jsonl and the canonical per-candidate ledgers match the same merged candidate set and preserve worker provenance<context_dir>/threat_model.md path<context_dir>/threat_model.md exists, then follow references/phase-validation.md once over the canonical merged discovery inputsreferences/phase-attack-path-analysis.md once over the surviving validated findings and closure rows that require itreferences/final-report.md, then run python <plugin_dir>/scripts/finalize_scan_contract.py --scan-dir <scan_dir> --source-root <repo_root> so finalization generates the markdown report projectionDo not bypass validation simply because a candidate recurred across multiple discovery workers. Recurrence is search evidence, not reportability proof.
report.md.Populate all report semantics in canonical JSON using references/final-report.md, run python <plugin_dir>/scripts/finalize_scan_contract.py --scan-dir <scan_dir> --source-root <repo_root>, and include the generated markdown report path in the response.
references/finding-detail-fields.md from the same validated evidence used in the generated report.Do not declare the scan failed because a round, turn, context window, or goal run ends with work remaining. Record meaningful progress, leave the durable scan running, and continue or hand off from the saved artifacts. Reserve terminal failure for an unrecoverable blocker after the recovery steps below are exhausted or for an explicit cancellation path.
saturated or capped.Any genuinely new canonical discovery candidate keeps the loop open until the next merge determines whether novelty persists.
Repair them before merge, validation, or finalization. If repair cannot finish in the current turn, preserve the artifacts, leave the durable scan running, and hand off. Do not declare the scan failed for these defects.
canonical_candidate_inventory.md and finding_discovery_report.md as a repairable consistency defect.Align them before validation; the discovery report may refine merged prose, but it may not omit canonical candidates.
canonical_candidate_inventory.md, <discovery_dir>/finding_discovery_report.md, <reconciliation_dir>/deduped_candidates.jsonl, and canonical per-candidate ledgers as a repairable consistency defect.Centralized validation must receive one coherent canonical candidate set.
affected_locations output as a worker-artifact defect that must be repaired before semantic merge.Lossless mechanical normalization is acceptable only for trivial equivalent variants such as line -> lines or file -> path; string-only locations or alternate location inventories that cannot be mapped without interpretation are incomplete worker outputs, not merge inputs.
no thread with id, preserve the clean pre-round state, retry the full round once with the same canonical worker brief, and do not count the failed attempt toward round progress.Completed workers are idle and do not need interruption; stop a worker only to abandon one that is still running before retrying.
Do not silently reduce the round size or claim novelty collapse occurred.
Do not claim novelty collapse occurred.
Goal Setup only after the capability preflight has returned ready and when goal/todo/task-tracking tools are available.Keep their completion boundaries separate.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.