# Ml Security

> Model artifact loading (pickle vs safetensors), model & data poisoning, PII in training data, secrets in notebooks, model provenance / lineage — Applies to: when generating code that loads ML models from disk / Hub / S3; when generating data pipelines that ingest user content for training / fine-tuning; when generating ML notebooks or training / evaluation scripts

- **Type:** Skill
- **Install:** `agentstack add skill-shieldnet-360-secure-vibe-ml-security`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [ShieldNet-360](https://agentstack.voostack.com/s/shieldnet-360)
- **Installs:** 0
- **Category:** [Cloud & Infrastructure](https://agentstack.voostack.com/c/cloud-infrastructure)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [ShieldNet-360](https://github.com/ShieldNet-360)
- **Source:** https://github.com/ShieldNet-360/secure-vibe/tree/main/dist/agent-skills/.agents/skills/ml-security

## Install

```sh
agentstack add skill-shieldnet-360-secure-vibe-ml-security
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# ML Model Security

Model artifact loading (pickle vs safetensors), model & data poisoning, PII in training data, secrets in notebooks, model provenance / lineage

## ALWAYS

- When loading models, use **safetensors** for PyTorch and Hugging Face; use `weights_only=True` with `torch.load` on PyTorch 2.4+; never load arbitrary `.pkl` / `.pt` files from untrusted sources.
- Verify **provenance / lineage** of any third-party or externally fine-tuned model — known author, signed or hashed checkpoint, recorded source — before loading it.
- Pin and hash **model + dataset versions** and record them, so a poisoned artifact can be traced and rolled back.
- Scrub PII, credentials, and secrets from training / fine-tuning data — at the source (ingestion), at storage (encryption + access control), and in anything committed to the repo.
- Treat ML notebooks as code: no plaintext credentials in cells or cell output, and clear outputs before committing.

## NEVER

- `pickle.loads` / `joblib.load` / `dill.loads` / `torch.load` an artifact fetched at runtime from an untrusted source. These deserializers execute arbitrary code by design.
- Use a model fine-tuned or distributed by an external party without provenance / lineage verification.
- Store training-data examples that contain PII in long-term storage without explicit consent, retention windows, and deletion APIs.
- Hard-code OpenAI / Anthropic / Cohere API keys in notebooks or repo files. Use environment variables and the `secret-detection` skill.
- Commit synthetic or generated training data without labeling it and reviewing it for inadvertent PII or leaked secrets.

## KNOWN FALSE POSITIVES

- Pre-publication academic models from trusted authors are often distributed as `.pt` checkpoints; convert to safetensors as a first step rather than rejecting them outright.
- Synthetic data generation pipelines may legitimately produce raw model output that is then committed — make sure it is labeled and reviewed.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [ShieldNet-360](https://github.com/ShieldNet-360)
- **Source:** [ShieldNet-360/secure-vibe](https://github.com/ShieldNet-360/secure-vibe)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-shieldnet-360-secure-vibe-ml-security
- Seller: https://agentstack.voostack.com/s/shieldnet-360
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
