Le DevSecOps IA n'est pas une discipline indépendante, c'est l'extension du DevSecOps classique à de nouveaux artefacts (modèles ML, datasets, tokenizers, inference servers, prompts versionnés). 70% des pratiques restent identiques (CI/CD, IaC, GitOps, scanning, signing) ; 30% sont ML-spécifiques (scanners ML, AI BOM, adversarial testing, model signing). Pour un DevSecOps senior, la montée en compétence prend 3-6 mois avec un plan structuré. Cet article documente la roadmap formation 12 semaines, la stack outillage, les patterns CI/CD, les patterns Kubernetes, et les erreurs fréquentes.
Pour le pendant AppSec : LLM security pour AppSec. Pour le pendant dev backend : formation sécurité IA dev backend.
Le bon mental model : extension, pas réinvention
DevSecOps IA = DevSecOps classique étendu à de nouveaux artefacts :
| Artefact classique | Artefact IA équivalent |
|---|---|
Code source (.py, .ts) | + System prompts versionnés (.md, .yml) |
Dépendances (requirements.txt, package.json) | + Modèles ML (Hugging Face) + datasets |
| Containers Docker | + Inference servers (vLLM, TGI, Ollama) |
| SBOM (CycloneDX, SPDX) | + AI BOM (CycloneDX 1.6+ AI extension) |
| Scanners (Trivy, pip-audit, Snyk) | + scanners ML (picklescan, Trivy ML) |
| SAST/DAST | + adversarial testing (Garak, PyRIT) |
| Signing (Sigstore) | + Sigstore for ML / OpenSSF Model Signing |
| IaC (Terraform, Helm) | + IaC pour inference servers + vector DB |
| GitOps (ArgoCD, Flux) | + GitOps pour AI configs (prompts, ABAC, BOM) |
| Observabilité (OTel) | + OTel GenAI semantic conventions |
Renforcer le DevSecOps classique d'abord, ajouter les spécificités IA ensuite. Si vous n'êtes pas à l'aise sur SLSA ou Sigstore, commencer par là, c'est 50% du chemin pour la supply chain ML.
Tip, DevSecOps IA n'est pas un nouveau métier, c'est une évolution du métier DevSecOps. Les seniors qui s'y forment en 3-6 mois sont en pénurie sur le marché 2026.
Quatre piliers DevSecOps IA
Pilier 1, Supply chain ML
Étendre le SBOM, le scanning, et le signing aux artefacts IA :
- AI BOM (CycloneDX 1.6+) : modèles, datasets, tokenizers, libraries ML versionnées avec hashes.
- Scanners ML : picklescan, transformers safety, Trivy ML, JFrog Xray.
- Mirror interne : Artifactory ML, Nexus, S3 privé pour modèles audités.
- Signing : Sigstore for ML / OpenSSF Model Signing (en pilote 2025-2026).
# .github/workflows/ml-supply-chain.yml
name: ML Supply Chain
on:
pull_request:
schedule:
- cron: '0 2 * * *' # daily
jobs:
scan-libraries:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Pip audit
run: pip-audit -r requirements.txt
- name: Snyk scan
uses: snyk/actions/python@master
scan-models:
runs-on: ubuntu-latest
steps:
- name: Picklescan
run: |
pip install picklescan
picklescan --recursive ./models/
- name: Hash check
run: |
python scripts/verify_model_hashes.py
scan-images:
runs-on: ubuntu-latest
steps:
- name: Trivy on inference images
run: |
trivy image vllm/vllm-openai:0.6.0 --exit-code 1 --severity HIGH,CRITICAL
trivy image ghcr.io/huggingface/text-generation-inference:2.4.0 --exit-code 1
generate-aibom:
runs-on: ubuntu-latest
steps:
- name: Generate AI BOM
run: |
pip install cyclonedx-aibom
cyclonedx-py requirements -i requirements.txt -o aibom.json
# Append models from manifest
python scripts/append_models_to_bom.py aibom.json
- name: Upload AI BOM
uses: actions/upload-artifact@v4
with:
name: aibom
path: aibom.jsonPour le détail : supply chain attack ML.
Pilier 2, Adversarial testing en CI
Tester les défenses LLM automatiquement à chaque PR + nightly complet.
# .github/workflows/adversarial-testing.yml
name: Adversarial Testing
on:
pull_request:
paths:
- 'prompts/**'
- 'app/**'
schedule:
- cron: '0 3 * * *' # nightly
jobs:
fast-adversarial:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Run Garak fast probes
run: |
pip install garak
garak --model_type ${{ env.MODEL_TYPE }} \
--model_name ${{ env.MODEL_NAME }} \
--probes promptinject,dan,encoding,leakage \
--report_prefix garak_pr
- name: Check regression
run: python scripts/check_adversarial_regression.py
full-adversarial-nightly:
if: github.event_name == 'schedule'
runs-on: ubuntu-latest
timeout-minutes: 120
steps:
- uses: actions/checkout@v4
- name: Run PyRIT full campaign
run: |
python scripts/pyrit_nightly_campaign.py \
--orchestrator crescendo \
--orchestrator multi_turn \
--datasets harmbench,jailbreakbench
- name: Upload report
uses: actions/upload-artifact@v4
with:
name: pyrit-nightly-report
path: reports/
- name: Alert SOC if new bypasses
if: failure()
run: python scripts/alert_soc.py reports/Outils clés :
- Garak (NVIDIA) : probes adversariales rapides, idéal CI PR.
- PyRIT (Microsoft) : orchestration multi-tour, idéal nightly.
- HarmBench / JailbreakBench / AILuminate : datasets standard.
Voir Microsoft AI Red Team playbook.
Pilier 3, IaC pour infrastructure IA
Infrastructure as Code étendue aux composants IA.
# terraform/modules/inference-server/main.tf
resource "kubernetes_deployment" "vllm" {
metadata {
name = "vllm-inference"
namespace = var.namespace
labels = {
app = "vllm"
"ai.security.tier" = "production"
}
}
spec {
replicas = var.replicas
selector {
match_labels = {
app = "vllm"
}
}
template {
metadata {
labels = {
app = "vllm"
}
}
spec {
# Pod Security Standards strict
security_context {
run_as_non_root = true
run_as_user = 1001
fs_group = 1001
}
container {
name = "vllm"
# Image pinned with SHA digest, mirror interne
image = "registry.internal/vllm@sha256:${var.vllm_digest}"
security_context {
allow_privilege_escalation = false
read_only_root_filesystem = true
capabilities {
drop = ["ALL"]
}
}
resources {
requests = {
"nvidia.com/gpu" = "1"
"memory" = "16Gi"
"cpu" = "4"
}
limits = {
"nvidia.com/gpu" = "1"
"memory" = "32Gi"
"cpu" = "8"
}
}
# Pas de secrets dans env directement, External Secrets
env_from {
secret_ref {
name = "vllm-secrets" # géré par ExternalSecret
}
}
}
# Tolerations + node selector pour GPU node pool
node_selector = {
"node.kubernetes.io/instance-type" = "g4dn.2xlarge"
}
}
}
}
}
resource "kubernetes_network_policy" "vllm_egress" {
metadata {
name = "vllm-egress-allowlist"
namespace = var.namespace
}
spec {
pod_selector {
match_labels = {
app = "vllm"
}
}
policy_types = ["Egress"]
egress {
# Allowlist Hugging Face Hub pour modèles
to {
ip_block {
cidr = "huggingface_cidr"
}
}
ports {
protocol = "TCP"
port = "443"
}
}
egress {
# DNS
ports {
protocol = "UDP"
port = "53"
}
}
# Pas d'autre egress par défaut
}
}Pilier 4, GitOps pour configurations IA
System prompts, ABAC policies, AI BOM, runbooks SOC : tout en Git, déployé via ArgoCD/Flux.
# k8s/apps/llm-app/system-prompts.yaml (versionné en Git)
apiVersion: v1
kind: ConfigMap
metadata:
name: llm-system-prompts
namespace: llm-app
data:
chat-system-prompt.md: |
Tu es l'assistant clientèle de Acme Corp.
[...]
Token canari (ne jamais divulguer) : {{ .CanaryToken }}
agent-system-prompt.md: |
Tu es un agent d'analyse interne.
[...]# k8s/apps/llm-app/abac-policies.yaml
apiVersion: openfga.dev/v1
kind: AuthorizationModel
metadata:
name: llm-app-abac
spec:
schema_version: "1.1"
type_definitions:
- type: "user"
- type: "tenant"
relations:
member:
this: {}
- type: "document"
relations:
owner:
this: {}
tenant:
this: {}
viewer:
union:
child:
- this: {}
- tupleToUserset:
tupleset:
relation: "owner"
computedUserset:
relation: "viewer"Toute modification = PR + review + tests CI + déploiement progressif.
Roadmap formation 12 semaines
Semaines 1-3, Fondations DevSecOps IA
Objectifs :
- Comprendre les artefacts IA et leur cycle de vie.
- Mapper les pratiques DevSecOps existantes aux artefacts IA.
- Threat modeling appliqué à un pipeline LLM.
Lectures :
Pratique :
- Ajouter
picklescan+Trivysur un projet existant. - Générer un AI BOM avec CycloneDX-aibom.
- Threat model pipeline LLM (input → ingestion → inference → output).
Livrable : pipeline CI/CD avec scanners ML basiques + AI BOM versionné.
Semaines 4-6, Adversarial testing en CI
Objectifs :
- Maîtriser Garak + PyRIT.
- Intégrer adversarial testing dans CI.
- Définir métriques de régression sécurité.
Lectures :
Pratique :
- Garak en CI sur PR (probes rapides, < 5 min).
- PyRIT en nightly (orchestration multi-tour).
- Dashboard de régression sécurité.
Livrable : pipeline avec adversarial testing + alerting SOC.
Semaines 7-9, Kubernetes + IaC pour IA
Objectifs :
- Déployer inference servers (vLLM, TGI) sécurisés sur K8s.
- IaC complet (Terraform/Pulumi).
- Network policies + sandboxing (Kata, gVisor).
Lectures :
Pratique :
- Cluster K8s avec node pool GPU dédié.
- Inference server (vLLM ou TGI) avec Pod Security Standards strict.
- Network policies (Cilium ou Calico).
- KServe ou Ray Serve pour serving avec scaling auto.
Livrable : infra IA production-ready as code.
Semaines 10-12, GitOps + observabilité + spécialisation
Objectifs :
- GitOps avec ArgoCD/Flux pour configs IA.
- Observabilité OTel GenAI complète.
- Spécialisation : agents OU multi-tenant OU sectoriel.
Lectures :
Pratique :
- ArgoCD pour déploiement progressif (canary 5% → 50% → 100%).
- External Secrets Operator + Vault.
- Stack observabilité complète : Langfuse + OTel collector + Splunk/Sentinel.
- Runbooks SOC versionnés.
Livrable : système production-ready end-to-end avec GitOps + observabilité + spécialisation choisie.
Stack outillage recommandée
Indispensables (semaines 1-6)
| Catégorie | Outil | Usage |
|---|---|---|
| Scanners ML | picklescan (HF) | Détection pickle malveillants |
| Scanners ML | transformers safety scanner | Audit modèles |
| Scanners libs | pip-audit, Snyk | CVE libraries Python |
| Scanners containers | Trivy | CVE inference servers |
| Adversarial CI | Garak (NVIDIA) | Probes rapides |
| Adversarial nightly | PyRIT (Microsoft) | Orchestration multi-tour |
| AI BOM | cyclonedx-aibom | SBOM IA |
Production (semaines 7-9)
| Catégorie | Outil | Usage |
|---|---|---|
| K8s serving | KServe, Ray Serve, vLLM, TGI | Inference servers |
| Sandboxing | Kata Containers, gVisor, Firecracker | Isolation forte |
| Network policies | Cilium (eBPF), Calico | Egress allowlist |
| IaC | Terraform, Pulumi, Helm | Infra as code |
| Pod Security | Kyverno, OPA Gatekeeper | Policies K8s |
Spécialisation (semaines 10-12)
| Catégorie | Outil | Usage |
|---|---|---|
| GitOps | ArgoCD, Flux | Déploiement Git-driven |
| Secrets | External Secrets Operator + Vault | Gestion secrets K8s |
| Observabilité | OpenTelemetry collector + Langfuse + Splunk/Sentinel | Stack complète |
| Signing | Sigstore (Cosign) | Signature artefacts |
| ABAC | OpenFGA, AWS Cedar, Permit.io | Policies fine |
Pipeline CI/CD complet de référence
# .github/workflows/llm-app-cicd.yml
name: LLM App CI/CD
on:
push:
branches: [main]
pull_request:
jobs:
# ─── 1. SECURITY SCANS ─────────────────────────
scan-supply-chain:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Pip audit
run: pip-audit -r requirements.txt
- name: Picklescan
run: |
pip install picklescan
picklescan --recursive ./models/
- name: Generate AI BOM
run: |
pip install cyclonedx-aibom
cyclonedx-py requirements -i requirements.txt -o aibom.json
- uses: actions/upload-artifact@v4
with:
name: aibom
path: aibom.json
scan-images:
runs-on: ubuntu-latest
steps:
- name: Trivy
run: |
trivy image vllm/vllm-openai:0.6.0 \
--exit-code 1 \
--severity HIGH,CRITICAL
# ─── 2. ADVERSARIAL TESTING ──────────────────
adversarial-pr:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Garak fast probes
run: |
pip install garak
garak --model_type ${{ env.MODEL_TYPE }} \
--probes promptinject,dan,encoding \
--report_prefix garak_pr
- name: Regression check
run: python scripts/check_adversarial_regression.py
# ─── 3. UNIT TESTS ──────────────────────────
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run pytest
run: pytest tests/ -v --cov=app
# ─── 4. BUILD + SIGN ─────────────────────────
build-and-sign:
if: github.ref == 'refs/heads/main'
needs: [scan-supply-chain, scan-images, test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build image
run: docker build -t ${{ env.IMAGE }}:${{ github.sha }} .
- name: Cosign sign
run: |
cosign sign --yes ${{ env.IMAGE }}:${{ github.sha }}
- name: Attest AI BOM
run: |
cosign attest --yes \
--predicate aibom.json \
--type cyclonedx \
${{ env.IMAGE }}:${{ github.sha }}
# ─── 5. DEPLOY (GitOps) ──────────────────────
deploy-canary:
if: github.ref == 'refs/heads/main'
needs: [build-and-sign]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Update GitOps repo
run: |
# Update image tag in GitOps repo
# ArgoCD/Flux détecte et déploie en canary 5%
python scripts/update_gitops_canary.py ${{ github.sha }}
- name: Wait for canary metrics
run: python scripts/wait_canary_health.py --duration 30m
- name: Promote to 50%
run: python scripts/promote_canary.py 50
# ─── NIGHTLY ───────────────────────────────────
adversarial-nightly:
if: github.event_name == 'schedule'
runs-on: ubuntu-latest
timeout-minutes: 120
steps:
- name: PyRIT full campaign
run: python scripts/pyrit_nightly.pyPatterns Kubernetes pour IA
Pod Security Standards
| Profil | Inference servers | Code execution agents |
|---|---|---|
| Privileged | Refusé | Refusé |
| Baseline | Acceptable | Refusé |
| Restricted | Recommandé | Refusé sans Kata/gVisor |
# Pod Security Admission au namespace level
apiVersion: v1
kind: Namespace
metadata:
name: llm-production
labels:
pod-security.kubernetes.io/enforce: restricted
pod-security.kubernetes.io/enforce-version: latestRuntime classes pour code execution
# Pour agents qui exécutent du code généré
apiVersion: node.k8s.io/v1
kind: RuntimeClass
metadata:
name: kata-fc
handler: kata-fc # Firecracker via Kata
---
apiVersion: v1
kind: Pod
spec:
runtimeClassName: kata-fc
containers:
- name: code-executor
image: code-executor:latestNetwork policies stricts
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: llm-app-egress-strict
spec:
podSelector:
matchLabels:
app: llm-app
policyTypes:
- Egress
egress:
# Vers AI gateway interne uniquement
- to:
- podSelector:
matchLabels:
app: ai-gateway
ports:
- protocol: TCP
port: 8080
# DNS
- to:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: kube-system
ports:
- protocol: UDP
port: 53Erreurs fréquentes en formation DevSecOps IA
| Erreur | Symptôme | Fix |
|---|---|---|
| Sauter SLSA / Sigstore | Supply chain non-vérifiable | Renforcer fondamentaux supply chain d'abord |
| Adversarial testing manuel | Pas de régression automatique | Garak en CI dès le départ |
| Pas d'AI BOM | Invisibilité supply chain ML | CycloneDX-aibom à chaque build |
| Inference server sans Pod Security | Évasion possible | Pod Security Standards "restricted" |
| Secrets en env-vars K8s clear | Compromission au boot | External Secrets Operator + Vault |
| Pas de canary deploy | Rollout risqué | ArgoCD progressive sync ou Flagger |
| Logs LLM en stdout uniquement | Pas de SIEM | OTel → SIEM obligatoire |
| GPU drivers non patchés | CVE NVIDIA exploitable | Image patching automatique |
Plan de carrière DevSecOps → DevSecOps IA
| Niveau | Durée | Compétences clés |
|---|---|---|
| DevSecOps + IA-aware | 0-6 mois | Lectures + outils ajoutés au pipeline |
| DevSecOps IA opérationnel | 6-18 mois | Stack complète production + GitOps |
| Senior DevSecOps IA | 18 mois - 3 ans | Architecture multi-cluster + sectoriel |
| Platform engineer LLM | 3+ ans | Plateforme IA centrale d'entreprise |
Marché 2026 : pénurie significative sur ces profils, particulièrement Senior+ avec expérience pratique de PyRIT/Garak/Sigstore for ML.
Pour aller plus loin
- LLM security pour AppSec, vue AppSec.
- Supply chain attack ML, détail supply chain.
- Sandboxing agent IA, confinement code execution.
- Microsoft AI Red Team playbook, méthodologie red team.
- MITRE ATLAS, catalogue d'attaques.
Points clés à retenir
- DevSecOps IA = DevSecOps classique étendu à de nouveaux artefacts (modèles, datasets, prompts, inference servers, AI BOM). 70% reste identique.
- 4 piliers : supply chain ML, adversarial testing CI, IaC pour infra IA, GitOps pour configs.
- Stack outillage : picklescan + Trivy (scanners), Garak + PyRIT (adversarial), CycloneDX-aibom (BOM), KServe + vLLM + Kata (K8s), ArgoCD + ExternalSecrets (GitOps).
- Pipeline CI/CD complet : scans → adversarial → tests → build + sign → deploy canary. Bloquer merges sur findings critiques.
- Pod Security Standards "restricted" pour inference servers ; Kata/gVisor/Firecracker pour code execution agents.
- Plan 12 semaines : Fondations → Adversarial CI → K8s/IaC → GitOps + obs + spécialisation.
- 8 erreurs fréquentes : sauter SLSA, adversarial manuel, pas d'AI BOM, Pod Security default, secrets env-clear, pas de canary, logs stdout, GPU drivers non patchés.
- Plan de carrière : DevSecOps IA-aware (0-6m) → opérationnel (6-18m) → Senior (18m-3y) → Platform engineer LLM (3+y). Marché 2026 en pénurie.
DevSecOps IA est l'évolution naturelle du métier DevSecOps en 2026. Pour un senior, 3-6 mois d'investissement structuré transforment significativement la valeur sur le marché. Pour les organisations, c'est le pivot stratégique entre projets IA pilotes et déploiements production sécurisés à l'échelle.







