Languages: English (Default) · فارسی (Persian) · 中文 (简体)
Open-source MLSecOps reference model and practical guide for AI security, LLM/RAG, agentic AI, and secure MLOps.
MLSecOps Reference Model & Practical Guide is an open-source reference model and engineering handbook for AI security, machine learning security, and secure MLOps across the full ML lifecycle — from data and training through deployment, runtime monitoring, SOC, and governance.
It defines an actionable lifecycle control model (CP 1–10), machine-readable Evidence Pack JSON Schema, OPA/Conftest Policy-as-Code admission samples, and Secure-by-Design blueprints covering LLM security, RAG security, agentic AI, MCP, AI supply chain security, and DevSecOps patterns for production AI systems. Independent open-source reference model and guide — not a product manual or an official OWASP, NIST, or ISO standard.
New here? Start with Getting started (terms + role paths). Do not jump straight into the middle of Chapters 7 or 12.
| Read online (recommended) | mhaghighian.github.io/MLSecOps |
| Source repository | github.com/MHaghighian/MLSecOps |
| Authors | Moslem Haghighian · Arian Gharedaghi |
| Maintainer site | mhsec.me |
| Latest release | v2.0.0 |
| Cite (DOI) | 10.5281/zenodo.21206780 |
| OpenSSF | Best Practices Passing · Baseline-2 |
Security engineers, ML/MLOps teams, architects, and risk owners who need a practical MLSecOps reference aligned primarily with ISO/IEC 27090:2026, alongside MITRE ATLAS, NIST AI RMF / IR 8596, ISO/IEC 42001, OpenSSF Secure MLOps, CSA MAESTRO, and OWASP — with operational controls, evidence, and rollout guidance.
This project defines an independent MLSecOps reference architecture and control model, cross-mapped to ISO/IEC 27090:2026, ISO/IEC 42001, MITRE ATLAS, NIST AI RMF / IR 8596, OpenSSF Secure MLOps, CSA MAESTRO, and OWASP. Its core operational contributions are:
- Ten lifecycle control points (
CP 1–10) — one continuous control thread from change initiation through runtime and SOC - Blocking release decisions at control points 4, 7, 8 (CP 7 blocking at Level 2+) — separately, a mandatory integrity/provenance checkpoint at CP 9 bound to the CP 8 digest at admission to close the TOCTOU gap
- Auditable
Evidence Packper release — with a machine-readable JSON Schema (schemas/), OPA/Conftest admission & Kubernetes workload samples (policies/), and companion static scanner/QA tooling (scripts/·tests/) - Implementation Reference — architecture cards, decision matrix, templates, playbooks, and end-to-end Secure-by-Design system blueprints (
E.7)
Learn more: Chapter 1 — What this guide adds. See also Getting started.
This repository builds on top of — and is never meant to replace — international standards, community catalogs, or security tools. Wherever threats and mitigations overlap, this guide aligns primarily to ISO/IEC 27090:2026 and cross-maps OWASP, MITRE ATLAS, CSA, OpenSSF, NIST, and Google SAIF as authoritative foundations. Upstream standards intentionally stay vendor- and tool-agnostic; below is how responsibilities are shared and where each project adds depth.
Complementary technical landscape (MLSecOps Reference Model & Practical Guide v2.0.0 alongside external frameworks)
Clause-level mappings and detailed cross-walks are maintained in
references/STANDARDS-ALIGNMENT.mdandreferences/AARM-ALIGNMENT.md.
Where this reference model is strongest:
- Actionable gate mechanics (
CP 4 / 7 / 8 ↔ CP 9): treats security validation and digest-bound deployment admission as enforceable CI/CD contracts rather than prose checklists. - Executable companion artifacts & conformance: ships working Draft 2020-12
schemas/with canonicalhttps://in-toto.io/Statement/v1+ DSSE wrapping (--emit-intoto/--emit-dsse), Witness (in-toto/witness) & Archivista provenance graph patterns (in-toto / Witness / Archivista Guide ·policies/witness/), formalMLS-*Conformance Profile (Levels 1–3), tested OPA/Conftestpolicies/(Evidence Pack + Kubernetes inference workloads), and a zero-dependency header/MCP sample scanner (scripts/ai_security_scan.py) verified by a controlled benchmark (references/EVALUATION-BENCHMARK.md). - Modern full-lifecycle breadth: covers
Managed-API,Pretraining-Distributed(DDP/FSDP/RLHF/DPOclusters inE.1.8), self-hosted models,KV Cacheisolation (PromptPeek/KV-Cloak/VReparo), Vector DB backup revocation, Docker Model Runner (E.1.7), andMCP09rug-pull pinning alongside classic ML.
Known limitations & gaps (transparent by design):
- Single-maintainer open-source project: independent community work, not backed by standards-body consensus or usable as a formal ISO/OWASP certification claim.
- Controlled benchmark vs. longitudinal field telemetry:
scripts/eval_benchmark.pyand unit/negative checks (scripts/verify_repo.py) verify scanner recall, zero false positives on included edge cases, and policy accuracy deterministically on constructed CVE-class fixtures (12/12recall,0/6FPR,7/7policy fixtures), not multi-organization longitudinal production incident-reduction telemetry. Built-in sample checks complement — never replace — dedicated production tools (ModelScan,Garak,Promptfoo,Kyverno,Gitleaks). - Copyrighted standard text & conceptual-only edge mappings: Standards Alignment and Chapter 15 cross-map ISO/IEC 27090:2026, ISO/IEC 42001, OWASP AISVS (
C1–C12), CSA MAESTRO (L1–L7), NIST IR 8596, and MITRE ATLAS by clause topic and requirement; verbatim ISO/IEC clause text is never reproduced due to copyright, and Google SAIF / NIST AI 600-1 remain high-level thematic bridges. - Hyperscaler hardware silicon manufacturing out of scope: while
E.1.8covers self-managed multi-node GPU cluster security (NCCL/RoCE isolation, worker attestation, checkpoint signing, SFT-to-DPO validation gates), underlying custom-silicon hardware-fabric manufacturing remains the cloud provider's shared-responsibility boundary.
| Area | Chapters / focus |
|---|---|
| MLSecOps & threat modeling | Scope, risk, autonomous AI threats |
| Data security & privacy | Training data, PII, augmentation confidentiality |
| AI / ML supply chain | Model artifacts, provenance, signing |
| Secure ML lifecycle | Ten control points, release decisions you may implement in CI/CD, Evidence Pack |
| LLM security & RAG | Gateway, guardrails, prompt injection, retrieval ACL |
| Agentic AI & MCP | Tool policy, Intent Gate, scoped execution |
| Runtime & SOC | Monitoring, detection, incident response |
| Governance & compliance | Evidence, maturity roadmap, Kubernetes patterns |
Traditional DevSecOps does not fully address model artifacts, training data, LLMs, RAG, agents, or runtime AI risks.
MLSecOps extends existing security practices with lifecycle-specific controls, evidence generation, and AI-focused governance — without replacing your CI/CD or MLOps platform.
- Ten-point lifecycle control model and release decision points (CP 8 bound to CP 9 at admission)
Evidence Packmethodology per release — plus machine-readableschemas/and OPA samples inpolicies/- Implementation Reference — architecture cards, templates, playbooks
- Threat / control / tool mapping (Ch.12)
- LLM, RAG, Agent, and MCP security (Ch.7 · Ch.8)
- AI supply chain and model artifact security (Ch.5)
- Kubernetes reference patterns (Ch.16)
- SOC integration, governance, case studies, and maturity roadmap
| Read online | Documentation site — full guide, search, TOC |
| Markdown | Table of Contents · Chapter 1 |
| Role-based paths | GETTING-STARTED.md |
| Contribute | CONTRIBUTING.md · Issues · Discussions |
| Role | Start here |
|---|---|
| Executive / risk | Ch.1 → Ch.2 → Ch.14 |
| Security engineer | Ch.2 → Ch.6 → Ch.12 |
| ML / MLOps | Ch.6 → Ch.5 |
| LLM / RAG / Agent | Ch.7 → Ch.8 |
| Production rollout | Appendix E → Ch.6 |
Project status, roadmap, and governance: GOVERNANCE.md · DESIGN.md · CHANGELOG.md · DCO.md.
Executive lifecycle (detail in Chapter 6):
Coverage: classic ML · LLM · RAG · managed AI APIs · agents · MCP · Shadow AI · supply chain · runtime · SOC · governance · Kubernetes patterns.
Latest release: v2.0.0 · Zenodo DOI
| Format | Link |
|---|---|
| Documentation site | mhaghighian.github.io/MLSecOps |
| Markdown | chapters-en/ in this repository |
| Source (ZIP) | v2.0.0 archive |
All releases: GitHub Releases. Pre-built DOCX (and PDF when conversion succeeds) plus HANDBOOK-SHA256SUMS.txt are attached automatically on new v*.*.* release tags via .github/workflows/handbook-artifacts.yml; for historical releases (v1.1.1–v1.3.0) or custom builds, generate Word locally (below).
Generate the printable Word edition from the markdown sources:
pip install -r scripts/requirements-docx.txt
python scripts/build-docx.py --render-mermaidOutput: dist/MLSecOps-Reference-Model-v{version}.docx (version read from CITATION.cff). Export PDF from Word (or Pandoc) if needed.
| Option | Purpose |
|---|---|
--render-mermaid |
Render missing diagram PNGs from assets/diagrams/source/*.mmd (uses system Chrome or Edge) |
--reference path/to/file.docx |
Override the Word style template |
--output path/to/file.docx |
Custom output path |
--skip-validate |
Skip post-build content checks |
The build uses Pandoc with the project Word template (scripts/templates/reference.docx, or auto-download from the v1.0.0 Release DOCX on first run). Template details: scripts/templates/README.md. Maintainer checklist: RELEASING.md.
python -m pip install -r requirements-pages.txt jsonschema pyyaml beautifulsoup4
conftest verify --policy policies
python scripts/verify_repo.py --require-conftest --with-mkdocs
python scripts/ai_security_scan.py --mcp path/to/mcp.json --pins schemas/examples/evidence-pack.example.json --model path/to/models/See scripts/README.md for rule IDs (MCP-* / MODEL-*) and policies/README.md for admission policy usage.
| Question | Answer |
|---|---|
| What is MLSecOps? | Security practices for the ML/AI lifecycle — extending DevSecOps with model, data, LLM, RAG, agent, and runtime controls. |
| Is this an official OWASP or NIST document? | No. It references those frameworks but is an independent open-source guide (CC BY-SA 4.0). |
| Where should I start reading? | Documentation site or Chapter 1. |
| How do I cite this work? | Use the Zenodo DOI or CITATION.cff. |
MLSecOps/
├── chapters-en/ # Guide chapters (English, Ch. 1–16 + Appendix E + TOC)
├── assets/diagrams/ # Diagram PNGs and Mermaid source (.mmd / .svg)
├── policies/ # OPA / Conftest Policy-as-Code (Evidence Pack + k8s/)
├── schemas/ # Machine-readable Evidence Pack JSON Schema + examples
├── references/ # Complementary alignment docs (e.g. AARM)
├── releases/ # Release notes bodies & historical release index
├── scripts/ # Build, verification & zero-dep AI security scan tooling
├── tests/ # Targeted unit tests for scanner & verification checks
├── dist/ # Local DOCX/PDF output (gitignored)
├── GETTING-STARTED.md # Role-based reading paths
├── CITATION.cff # Citation metadata (DOI)
├── CHANGELOG.md
└── .github/workflows/ # Pages deploy, docs CI, DCO, pip-audit, releases, artifacts
We welcome review from practitioners.
- Bug or typo: Open an issue
- Suggestion / discussion: GitHub Discussions
- Pull request: see CONTRIBUTING.md
If you review the guide and agree to be listed, we can add your name under Community reviewers (with your permission only).
Share this project: linking from LinkedIn, blog posts, OWASP community threads, Dev.to, or internal security wikis helps others discover the project and improves search visibility for MLSecOps, MLSecOps Reference Model, and MLSecOps Practical Reference Guide.
See CITATION.cff for machine-readable metadata.
Authors: Moslem Haghighian · Arian Gharedaghi
Haghighian, M., & Gharedaghi, A. (2026). MLSecOps Reference Model & Practical Guide (v2.0.0).
Zenodo. https://doi.org/10.5281/zenodo.21206780
- ISO/IEC 27090:2026 (Cybersecurity — Artificial intelligence (AI) — Addressing security threats and compromises to AI systems, primary AI security standard)
- ISO/IEC 42001 · ISO/IEC 23894 · ISO/IEC 27001 / 27002
- MITRE ATLAS
- NIST AI RMF · NIST Cyber AI Profile (IR 8596 iprd)
- OpenSSF MLSecOps Whitepaper (2025)
- CSA MAESTRO & CSA AARM — AARM Alignment (agentic runtime; complementary mapping)
- OWASP AI Exchange (https://owaspai.org/ — open community companion & contributor to ISO/IEC 27090) · OWASP LLM Top 10 (2025) · OWASP Agentic / MCP · OWASP ML Top 10 (draft)
- EU AI Act
| CONTRIBUTING.md | How to contribute |
| LICENSE | CC BY-SA 4.0 |
| SECURITY.md | Report issues in this repo |
| CODE_OF_CONDUCT.md | Community standards |
Questions: Issues · Discussions.

