HolyCyber-Dataset / research /PLAN_CHECKLIST.md
ansulev's picture Reizxn's picture
Duplicate from Reizxn/HolyCyber
28759cf
|
Raw History Blame Contribute Delete
9.31 kB

Plan compliance checklist

The eight-stage plan that came with this task, item by item, with what this corpus does and what it deliberately does not do.


Step 1 — Scope the task, threat model, success metric

Plan asks This dataset
One sentence: what must the model detect, on what data, at what cost of error An instruction-tuning corpus for a defensive cybersecurity assistant: one row = one authoritative entity (ATT&CK technique, CWE, CAPEC pattern, KEV entry, Sigma rule, ATLAS/D3FEND node, arXiv paper section, RFC or cheat-sheet section), asked one question, answered with a ≥2,000-token grounded briefing.
Threat model Defensive analysis and engineering only: detection, mitigation, incident response, validation, prioritisation. No offensive tooling.
Target metrics Row count per domain (≥2,000), token floor per row (≥2,000), duplicate rate (0), contamination rate (0), split leakage (0).

Recorded in research/DECISIONS_LOG.md § D1.

Step 2 — Choose and audit sources

Plan asks This dataset
List candidate sources 7 framework catalogues + 1,300+ arXiv preprints + 24 IETF RFCs + 137 OWASP cheat sheets + 16 NIST publications.
Read each survey entry before use The two surveys the plan names — Network Intrusion Datasets: A Survey, Limitations, and Recommendations and The Data Problem in Software Vulnerability Analysis — are in the corpus, and their known flaws are recorded as the limits of the ML-methodology layer.
Record licence, date, label method, known problems research/SOURCE_TABLE.md, generated from the source tree and research/fetch_manifest.csv; every row also carries the licence and the canonical URL.

Step 3 — Generate or collect data

Plan asks This dataset
Build an isolated lab, run attacks, log events Not done, deliberately. The owner controls no lab, and generated traffic would need labels from a log the plan has to be trusted on. The plan's own rule — "use synthetic data only for rare classes or gaps, and mark every synthetic row" — is satisfied by using no synthetic data at all.
Collect from public datasets Done: every source in the table above is public and licensed.

Step 4 — Label from ground truth

Plan asks This dataset
Labels come from ground truth, not guesses Every row's answer is a quotation, or a deterministic re-assembly, of a source record. No model writes any text.
Hand-check a sample, record the error rate scripts/validate_ground_truth.py re-derives each row's source and measures the share of the answer that is quoted from it, plus the share of its words that occur in the domain's source material. Results in research/GROUND_TRUTH.md.
Uncertainty bucket Nothing is inferred: a field the catalogue does not state is rendered "not specified".

Step 5 — Clean the data

Plan asks This dataset
Remove exact and near-duplicates before splitting Done: exact-hash and MinHash-LSH (5-word shingles, 112 perms, Jaccard ≥ 0.90, within a task type) run before the split.
Remove or mask personal data, secrets, real addresses The sources contain no credentials or live addresses. Author names in papers are part of the scholarly record and are kept; no other personal data is present.
Remove shortcut features that give away the label Not applicable: there are no labels to shortcut — no feature is used to infer an answer.
Log a before/after count per cleaning rule Per layer: build/layers/stats.json carries composed_rows, quality_rejected, dedup, contaminated_removed and entities_skipped_contaminated.

Step 6 — Split without leaking

Plan asks This dataset
Split by time The framework catalogues are versioned, not time-series, so there is no time axis to cut on (the row metadata carries each record's vintage). Paper rows are split by paper, so a paper's sections never straddle the split.
Split by source Done: the split unit is the source entity (group_key). 0 groups span two splits, in the layers and in the global dataset.
Keep the real class ratio in the test set The corpus is not a class-balanced classifier set; the ratio is a property of the source material, and the split is random over entities, so the test set keeps the corpus's distribution.
Fit every transform on train only There are no fitted transforms: tokenisation, dedup and decontamination are not learned from data.
Lock the test set The split is computed once from group_key with seed 1337 and never re-cut; the labels are fixed.

Step 7 — Validate

Plan asks This dataset
Train a baseline, then stronger models Out of scope — the deliverable is a dataset, not a model. The layer datasets are the input to that experiment.
Test across datasets: train on yours, test on a public one Answered in the other direction: every row is validated against its source, and the source of one layer is an independent dataset from the sources of another (a CWE row and an ATT&CK row about the same weakness are built from different files).
Report precision/recall/FPR Not applicable (no classifier).
Ablate suspect features The analogue is the duplicate ablation: removing the reference pack and the task shapes leaves the entity's own record, and the ground-truth check still passes.

Step 8 — Document and iterate

Plan asks This dataset
Write a datasheet dataset/DATASET_CARD.md (global) and dataset/layers/<domain>/DATASET_CARD.md (per domain, with purpose, method, counts, limits, licence, misuse warning).
Publish scripts and settings scripts/ — fetch, parse, compose, gates, split, verify, validate, report.
Version the dataset dataset/VERSION + the seed in every stats file.
A new person could rebuild it alone dataset/README.md gives the commands; the build is deterministic and resumable.

Step 9 — Audit (added in v2.1.0)

The first release met every structural check and still had defects that only a reader would notice. A separate audit stage now re-reads the written files and reports what the builder cannot see about its own output.

Check Tool Result
ids, splits, floor, duplicate answers scripts/verify_layers.py 0 problems in all 17 layers
text hygiene, structure, question/answer agreement scripts/audit_dataset.py core see research/AUDIT_REPORT.md
paragraph reuse scripts/audit_dataset.py dup measured, not claimed
references, source/licence consistency scripts/audit_dataset.py meta see report
benchmark overlap (independent re-check) scripts/audit_dataset.py contam see report
quotation / corpus vocabulary scripts/validate_ground_truth.py see research/GROUND_TRUTH.md

Two claims were removed rather than defended: "no duplication" (true at row level, false at paragraph level) and a quotation percentage that had never been measured. research/AUDIT_REPORT.md is the full record.

Step 10 — Compare with the field (added in v2.3.0)

A dataset is easier to judge against its neighbours than in isolation. One gated repository was reviewed structurally, four public instruction datasets were downloaded and measured, and one proposed link turned out not to be a cybersecurity dataset at all.

Comparison Tool What it produced
file tree, presentation, licence of a gated peer manual, HF API research/EXTERNAL_REVIEW.md Part A
rows, escaping, duplication, length of four public sets scripts/external_compare.py build/external/compare.json, Part B
lineage between two of them same all 52,526 Trendyol questions occur in Fenrir
text-level contamination same 0 shared verbatim paragraphs (305,232 unique here)
presentation practices manual changelog, metadata section, samples (adopted)

The rule applied throughout: adopt what makes a dataset checkable (measured metadata, real splits, changelog, samples, limitations) and reject what only makes it look large (distilled reasoning without a source, slot-filled questions, escaped JSONL, unverifiable scale claims).


The pitfalls checklist

Pitfall How this corpus avoids it
Label noise No labels: answers are quotations. Verified by the ground-truth check.
Duplicates Exact + near-duplicate removal before the split; 0 repeated answers in the global dataset.
Train-test leakage Split on the source entity; 0 groups span splits.
Random split on time data No time axis in the framework sources; papers split by paper.
Lab-only artifacts No lab. No attacker IP, port range or timing pattern exists in the corpus.
Unrealistic class balance The distribution is the corpus's own, not a 50/50 artefact.
Weak baselines No model is trained here.
Misleading metrics The reported metrics are row counts, token floors and duplicate/contamination rates — not accuracy.
Hidden synthetic data There is no synthetic data; every row names its source.
Stale data Each source carries a retrieval date in the manifest and a vintage in the row metadata.