training-data-poisoning
Skill20 starsChanged 4 months agoMITView on GitHub
Detects training and fine-tuning pipelines that ingest external data without
In this repository52 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- authentication-failuresSkill
- broken-access-controlSkill
- concurrency-correctnessSkill
- contract-reviewSkill
- cryptographic-failuresSkill
- crypto-library-misuseSkill
- csrfSkill
- exceptional-conditionsSkill
- excessive-agencySkill
- file-uploadSkill
- graphql-securitySkill
- hardcoded-secretsSkill
- header-injectionSkill
- hotspotsSkill
- injectionSkill
- insecure-designSkill
- insecure-local-storageSkill
- insecure-output-handlingSkill
- insecure-plugin-designSkill
- integrity-failuresSkill
- ipc-securitySkill
- llm-supply-chainSkill
- logging-failuresSkill
- mass-assignmentSkill
- mcp-securitySkill
- memory-api-misuseSkill
- model-dosSkill
- model-theftSkill
- multi-agent-trustSkill
- nosql-injectionSkill
- numeric-trust-boundarySkill
- oauth-implementationSkill
- open-redirectSkill
- overrelianceSkill
- path-traversalSkill
- privilege-handlingSkill
- prompt-injectionSkill
- prototype-pollutionSkill
- pr-reviewSkill
- race-conditionSkill
- rag-securitySkill
- redosSkill
- security-cleanupSkill
- security-misconfigurationSkill
- security-reviewSkill
- sensitive-disclosureSkill
- ssrfSkill
- supply-chainSkill
- threat-modelSkill
- token-smugglingSkill
- unsafe-api-consumptionSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 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.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 21
No deduplication or anomaly detection on training set statistics
- Distinctive: line 33
Every example passes content validation: before entering the training set: type and length checks, disallowed-pattern filtering for known …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.
Files
Training Data Poisoning Security Check (OWASP LLM03:2025)
What this checks
Protects against malicious or low-quality examples being introduced into training or fine-tuning datasets. Poisoned data can embed backdoors, degrade accuracy, or skew model behavior in ways that are difficult to detect after training completes.
Vulnerable patterns
- Ingesting scraped or user-contributed examples with no content validation
- No deduplication or anomaly detection on training set statistics
- Loading dataset files without verifying provenance or checksums
- Using the same split for training and validation, hiding distribution shift
Fix immediately
Flag the vulnerable code, explain the risk, and suggest a fix establishing these properties. Translate to the data-loading and validation libraries of the audited file — use that stack's documented hashing, schema, and dataframe APIs; do not import a recipe from a different stack.
- Every external dataset file is checksum-verified before use. A pinned SHA-256 in version control; the loader computes the digest on load and refuses to proceed on mismatch. Pinning a URL or version alone does not help when the bytes behind them change.
- Every example passes content validation before entering the training set: type and length checks, disallowed-pattern filtering for known injection or jailbreak markers, and encoding/Unicode sanity. Invalid examples are dropped, not silently used.
- Duplicates are removed before training. Poisoning attacks often batch the same backdoor trigger across many examples; deduplication by content hash limits the leverage of a single injected payload.
- Label distribution is checked and alerts fire on imbalance above a threshold. A sudden one-class shift is a statistical signature of bulk-inserted poison; it is cheap to catch at ingestion and impossible to reverse after training.
- Train and validation splits come from disjoint sources or time windows. Reusing the same split for both hides distribution shift and lets poisoned examples score well on validation.
Verification
Confirm the response:
- For every external dataset load present, files are verified against pinned checksums before use
- Every training example passes content validation (length limits, disallowed-pattern filtering)
- Duplicates are removed before training starts
- For every dataset with categorical labels present, class distribution is checked and alerted on imbalance above a threshold
- Train and validation splits come from disjoint sources or time windows
References
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
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.

