agentleFS
kenhuanguskenhuangus/defense-factory-skills/skills/dedupe-findings/SKILL.md

dedupe-findings

Skill2 starsChanged 47 days agoMITView on GitHub

Clusters duplicate and near-duplicate security findings after Discovery or validation in the Defense Factory Dynamic validation phase. Use before ownership assignment to reduce noise and link duplicates to a canonical finding.

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Before route-ownership to avoid duplicate tickets

    line 14
  2. Very specific:

    Write a merge report .defense-factory/findings/duplicates/_dedupe-report.md with groups and canonical ids.

    line 33
  3. Distinctive:

    Do not delete canonical validated evidence.

    line 45
  4. Distinctive:

    Do not mark distinct issues as duplicates to hide risk.

    line 46

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

dedupe-findings

Phase: Dynamic validation
Style: Blue (defensive)

When to use

  • Multiple candidates or validated findings refer to the same root cause
  • Before route-ownership to avoid duplicate tickets

Preconditions

  1. Findings under .defense-factory/findings/candidates/ and/or validated/.
  2. Inventory available for asset context.

Procedure

  1. Load all findings; normalize keys: asset_id, location.path, location.endpoint, cwe, title tokens.
  2. Group by similarity:
    • Same endpoint + same CWE
    • Same file sink + same issue class
    • Explicit scanner duplicate ids if present
  3. Choose a canonical finding (prefer validated over candidate; else highest severity; else earliest discovered_at).
  4. For each duplicate:
    • Set status to duplicate
    • Set duplicate_of to canonical id
    • Write to .defense-factory/findings/duplicates/<id>.json
  5. Write a merge report .defense-factory/findings/duplicates/_dedupe-report.md with groups and canonical ids.
  6. Validate duplicate JSON files with scripts/validate_artifacts.py --schema finding.

Required outputs

PathNotes
.defense-factory/findings/duplicates/*.jsonstatus=duplicate, duplicate_of set
.defense-factory/findings/duplicates/_dedupe-report.mdGroup summary

Stop / refuse

  • Do not delete canonical validated evidence.
  • Do not mark distinct issues as duplicates to hide risk; when unsure, keep separate.

Next phase

route-ownership on canonical validated findings.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.