No slash command · from tiger-team
Senior-level DevSecOps reference covering secure CI/CD, IaC, container/Kubernetes hardening, secrets management, SAST/DAST/SCA/SBOM, supply chain (SLSA), CIS/ANSSI hardening, audit logging, and release strategies.
Ships in tiger-team. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Senior-level cheat sheet. Product details move fast: where a feature depends on edition or version it is flagged "verify against your version". Regulated contexts (banking/DORA, healthcare/HDS, defense/II 901) raise the bar on traceability, segregation of duties and evidence: every control below should produce an auditable trace.
| Principle | What it means in practice |
|---|---|
| Pipeline = production asset | Pipeline definitions, runners, shared templates and credentials get the same protection as prod servers. |
| Protected branches/tags | No direct push to main/release; merge via reviewed MR/PR; required status checks; no force push; tag protection for release tags. |
| Segregation of duties | Author cannot approve own change; deploy to prod requires approval by a distinct role; CODEOWNERS on pipeline files, IaC and security-sensitive paths. |
| Least-privilege runners | Ephemeral runners/agents, one job per VM/pod, no shared Docker socket, no privileged mode unless isolated, separate runner pools for prod deploys. |
| Short-lived credentials | OIDC federation to cloud/Vault instead of long-lived keys in CI variables; scope tokens to repo + branch + environment. |
| Untrusted input | MR/PR titles, branch names, commit messages, fork code are attacker-controlled: never interpolate them into shell; never run fork code with secrets. |
| Pin everything | Base images by digest, third-party actions/templates by commit SHA, tool versions explicit, dependency lock files committed. |
| Build once, promote | Same immutable artifact (by digest) promoted dev -> test -> prod; environment config injected at deploy time; never rebuild for prod. |
| Signed and traceable | Signed commits (GPG/SSH/X.509), signed artifacts/images, provenance attestation linking artifact -> commit -> pipeline run -> approver. |
| Fail closed | Security gates block on policy violations; exceptions are explicit, owned, time-boxed and recorded. |
GitLab CI
id_tokens: keyword with aud: to obtain a JWT for Vault/cloud federation (the legacy CI_JOB_JWT/CI_JOB_JWT_V2 variables were removed in GitLab 17.0).CI_JOB_TOKEN against this project).include: remote/project templates: pin with ref: to a tag or SHA; protect the template project.Jenkins
withCredentials([...]); use single-quoted sh '...$TOKEN...' so Groovy does not interpolate the secret into the command line (Jenkins warns on this).Azure DevOps
extends: templates + "required template" check to enforce mandatory stages (scans, signing).GitHub Actions
permissions: contents: read; elevate per job only (id-token: write for OIDC, packages: write to push).pull_request_target and workflow_run run with base-repo secrets: never check out and execute PR head code in them.run: echo "${{ github.event.pull_request.title }}"; pass via env: and quote "$TITLE".actions/attest-build-provenance, verified with gh attestation verify); available for public repositories on all current plans, private/internal repositories require GitHub Enterprise Cloud.sub (repo + ref or environment), aud, and issuer. A wildcard subject (repo:org/*) lets any repo/branch assume the role - classic finding.repo:<org>/<repo>:environment:prod or repo:<org>/<repo>:ref:refs/heads/main; GitLab default project_path:<group>/<project>:ref_type:branch:ref:main (components configurable per project, e.g. adding ref_protected).cosign (key-based or keyless with OIDC identity + Rekor transparency log), or Notation (Notary Project). Sign the digest, never a tag.
cosign sign --key <KMS_OR_KEY_REF> registry.example.org/app@sha256:<DIGEST>cosign verify --key cosign.pub registry.example.org/app@sha256:<DIGEST>; keyless verify requires --certificate-identity and --certificate-oidc-issuer (cosign v2).verifyImages, Sigstore policy-controller, Gatekeeper with external data, OpenShift sigstore ClusterImagePolicy/ImagePolicy - generally available since OpenShift 4.20).| Topic | Rule |
|---|---|
| State | Remote backend with locking (S3-native lock file use_lockfile = true, Terraform 1.10+ - the DynamoDB lock table is deprecated; azurerm uses blob lease; GCS native locking). Never local state for shared infra. |
| State secrecy | State contains secrets in clear (DB passwords, keys). Encrypt the backend, restrict read access, enable versioning. sensitive = true only masks CLI output, not state. OpenTofu 1.7+ offers client-side state and plan encryption; Terraform 1.10+ offers ephemeral values/resources and 1.11+ write-only arguments (never persisted to plan or state). |
| Locking incidents | terraform force-unlock <LOCK_ID> only after confirming no run is active. |
| Versions | required_version and required_providers constraints; commit .terraform.lock.hcl. |
| Modules | Versioned (tag/registry version), pinned, small, documented inputs/outputs; no ref=main. |
| Plan/apply | terraform plan -out=tfplan reviewed, then terraform apply tfplan (same plan). Apply only from CI with a dedicated identity. |
| Drift | Scheduled terraform plan -detailed-exitcode (exit 0 no change, 1 error, 2 changes) or plan -refresh-only; alert on 2. Root cause the drift (manual change?) before re-applying. |
| Refactors | moved blocks / import blocks (recent versions) instead of manual state mv/import - reviewable in code. |
| Safety | lifecycle { prevent_destroy = true } on stateful resources; review every -/+ (replace) in plan; avoid routine -target. |
| Policy as code | Checkov, Trivy (config; tfsec merged into it), KICS, tflint; OPA/Conftest or Sentinel (HCP Terraform/Enterprise) on the plan JSON (terraform show -json tfplan). |
shell/command; if unavoidable use creates:/removes: or changed_when:/failed_when:. Test: second run must report changed=0.--check --diff in review pipelines (note: some modules do not support check mode).ansible-vault encrypt / encrypt_string, vault IDs per environment (--vault-id prod@<source>), or lookups to Vault/CyberArk; no_log: true on tasks handling secrets.become only where needed; dedicated automation account; SSH keys from PAM/Vault.ansible-lint, Molecule tests, pinned collections/roles in requirements.yml, inventories per environment, no prod credentials reachable from non-prod controllers.FROM image@sha256:<digest>.USER 10001 (numeric, non-root); files owned by root and read-only for the runtime user where possible.ARG or ENV (they persist in history). Use BuildKit RUN --mount=type=secret,id=<id> with --secret id=<id>,src=<file>.COPY not ADD (ADD fetches URLs/extracts archives); .dockerignore excludes .git, .env, keys.latest; labels for source/commit/version (OCI annotations); HEALTHCHECK or K8s probes.--privileged, never mount /var/run/docker.sock (= root on host).| Area | Controls |
|---|---|
| Pod securityContext | runAsNonRoot: true, allowPrivilegeEscalation: false, readOnlyRootFilesystem: true, capabilities: {drop: ["ALL"]}, seccompProfile: {type: RuntimeDefault}; no hostNetwork/hostPID/hostIPC/hostPath. |
| Pod Security Admission | PodSecurityPolicy was removed in 1.25. Label namespaces pod-security.kubernetes.io/enforce: restricted (also warn, audit); baseline minimum for exceptions. |
| Admission policy | Kyverno, OPA Gatekeeper or ValidatingAdmissionPolicy (CEL; GA in 1.30) for registry allowlist, signature verification, required labels, no latest. |
| RBAC | Namespaced Roles over ClusterRoles; no wildcard verbs/resources; avoid cluster-admin bindings. Dangerous: escalate, bind, impersonate, create pods (can run as any SA of the namespace), get/list secrets, nodes/proxy. Check with kubectl auth can-i --list --as=system:serviceaccount:<ns>:<sa>. |
| Service accounts | One SA per workload; automountServiceAccountToken: false unless the pod calls the API. |
| NetworkPolicies | Default deny ingress + egress per namespace, then explicit allows (including DNS egress to the cluster DNS). Requires a CNI that enforces them. |
| Secrets | Base64 is not encryption. Enable encryption at rest (EncryptionConfiguration, KMS provider). Prefer External Secrets Operator, Secrets Store CSI driver or Vault Agent injector; Sealed Secrets/SOPS for GitOps. Restrict get secrets RBAC. |
| Resources | Requests/limits, ResourceQuota/LimitRange per namespace (DoS containment). |
| Supply chain | Private registry, pull by digest, signature verification at admission, image pull secrets scoped. |
| Audit | API server audit policy: keep Secrets/ConfigMaps/TokenReviews at Metadata level (higher levels write secret values into the audit log); RequestResponse for RBAC changes if volume allows; ship to SIEM. |
| Benchmarks | CIS Kubernetes Benchmark (kube-bench), NSA/CISA Kubernetes Hardening Guide. |
restricted-v2 is the default for authenticated users on new 4.11+ installations (clusters upgraded from 4.10 or earlier keep restricted available) and runs pods with a UID from the namespace's pre-allocated range: images must run as arbitrary UID with GID 0 (chgrp -R 0 /app && chmod -R g=u /app). Granting anyuid/privileged is a finding requiring justification.edge, passthrough or reencrypt; prefer reencrypt or passthrough for end-to-end encryption; redirect insecure traffic.oc adm policy who-can <verb> <resource> for RBAC review.| Rule | Detail |
|---|---|
| Never in Git | Pre-commit + CI scanning (gitleaks, trufflehog, platform secret scanning). On leak: revoke/rotate first, then purge history; assume compromise. |
| Secret zero | Bootstrap via platform identity (K8s SA token, cloud IAM, CI OIDC), not a static token in a file. |
| Dynamic > static | Short TTL, per-consumer credentials, automatic revocation. |
| Rotation | Defined period, automated, tested; rotation must not need a release. |
| Audit | Every read of a secret logged and attributable. |
HashiCorp Vault (concepts): auth methods (AppRole, Kubernetes, JWT/OIDC, LDAP, TLS certificates, cloud IAM); secrets engines (KV v2 with versioning - API paths include data/, database dynamic credentials, PKI, Transit encryption-as-a-service, SSH); policies are deny-by-default (path "secret/data/app/*" { capabilities = ["read"] }); tokens and leases with TTL, renewal, revocation; seal/unseal (Shamir shares or auto-unseal via cloud KMS; PKCS#11/HSM auto-unseal and seal wrapping require Vault Enterprise); audit devices (Vault refuses requests if no enabled audit device can be written - enable at least two); namespaces and performance/DR replication are Enterprise features; response wrapping for secret delivery. OpenBao is the open-source fork.
CyberArk (concepts): Digital Vault with Safes (access-controlled containers); CPM (Central Policy Manager) rotates/verifies credentials on target systems; PVWA (web portal, request/approval workflows); PSM / PSM for SSH (isolated, recorded privileged sessions - the bastion for admin flows); application credentials via Credential Providers (agent-based or central CCP) and Conjur / Secrets Manager for DevOps workloads. Typical integration: pipeline or app retrieves credential at runtime by application identity; human admins connect only via PSM.
| Type | What | Where in pipeline | Example tools |
|---|---|---|---|
| Secrets scan | Hard-coded credentials | Pre-commit, every MR | gitleaks, trufflehog |
| SAST | Source code flaws | Every MR, incremental | Semgrep, SonarQube, CodeQL |
| SCA | Vulnerable/licensed dependencies | Every build + continuous re-scan of released SBOMs | OWASP Dependency-Check, Dependency-Track, Trivy, Grype, Snyk |
| IaC scan | Misconfiguration | Every MR | Checkov, Trivy config, KICS |
| Container scan | OS/package CVEs, misconfig | Build + registry re-scan | Trivy, Grype, Clair |
| DAST | Running app (auth, injection, headers, TLS) | Test env, nightly/pre-release | OWASP ZAP, Burp Suite |
| Pentest | Manual, business logic | Before go-live / major change | Qualified provider (PASSI in France) |
| Baseline | Use |
|---|---|
| CIS Benchmarks | OS, Kubernetes, Docker, DBs, cloud. Level 1 (broadly applicable) / Level 2 (defense in depth). Assess with CIS-CAT, OpenSCAP, kube-bench. |
| ANSSI "Recommandations de configuration d'un systeme GNU/Linux" (BP-028) | French reference for Linux; v2.0 (October 2022) defines four cumulative levels: minimal, intermediary, enhanced, high. ComplianceAsCode/OpenSCAP ships `anssi_bp28_minimal |
| ANSSI secure administration guide (PA-022) | Admin tiering, dedicated admin workstations, bastions - basis for "admin flows via bastion". |
| ANSSI TLS guide (v1.2) and Docker fiche technique (FT-082, 2020) | TLS 1.3 preferred, TLS 1.2 accepted under conditions, SSLv3/TLS 1.0/1.1 forbidden; container isolation rules (dedicated namespaces, drop all capabilities, read-only root filesystem, resource limits). |
| Microsoft Security Baselines / CIS Windows | Windows Server, AD (see infra-reference windows.md). |
| Sector frameworks | Defense: II 901 (Diffusion Restreinte systems), IGI 1300 (classified); Healthcare: HDS certification; Cloud: SecNumCloud qualification. Confirm applicability with the security officer. |
Hardening rules: baseline as code (Ansible/OpenSCAP remediation), measured in CI and continuously (drift), deviations documented with risk acceptance, golden images rebuilt on a cadence rather than patched in place.
| What to log | Detail |
|---|---|
| Identity | Logins, failures, MFA events, token issuance, privilege elevation (sudo, PSM sessions). |
| Change | Pipeline runs (who triggered, commit SHA, artifact digest, approver, target env), IaC applies, manual changes, config/feature-flag changes. |
| Secrets | Vault/CyberArk access logs, K8s secret reads, failed secret access. |
| Platform | K8s API audit, cloud control-plane logs, registry pushes/pulls, admission denials. |
| Security tools | Scan results and waivers (evidence for auditors). |
| Strategy | How | Pros | Watch-outs |
|---|---|---|---|
| Rolling | Replace instances progressively | Simple, no extra capacity | Mixed versions coexist; needs backward-compatible APIs/schema |
| Blue/green | Two full environments, switch traffic | Instant rollback (switch back) | Double capacity; DB is shared - schema must serve both; sessions/caches |
| Canary | Small % of traffic to new version, widen on healthy metrics | Limits blast radius | Needs good metrics/SLOs and automated analysis (Argo Rollouts, Flagger) |
| Feature flags | Code deployed dark, enabled per user/segment | Decouple deploy from release; kill switch | Flag debt; flag changes are prod changes (audit, approval); default-off; test both paths |
| Shadow/dark launch | Duplicate traffic to new version, discard responses | Real load without user impact | Side effects (writes, emails, payments) must be suppressed |
Pipeline
IaC
prevent_destroy on stateful resources; no hard-coded secretschanged=0), vault/no_log for secretsContainers / Kubernetes
Operations
use_lockfile, DynamoDB locking deprecatedsub claim formatrestricted-v2What SKILL.md sets; muted values are Claude Code's defaults
27 skills in this plugin
/adrWrite an Architecture Decision Record or a target-architecture note - options, criteria, trade-offs, decision, consequences, reversibility and compliance impacts. Use when a structural technical choice must be made or documented./architecture-referenceEnterprise architecture knowledge base - design authority, principles, target and transition architectures, integration patterns, NFRs, cloud sovereignty, technical debt, DORA ICT risk; references on TOGAF/ArchiMate, urbanisation, ADRs./batch-reviewReview a batch chain (VTOM, Dollar Universe or Control-M export, or a description) for dependencies, restartability, windows, resources, calendars and monitoring, with prioritized findings. Use before go-live, a migration or after an incident.npx claudepluginhub crapule421/tiger-team --plugin tiger-teamOther plugins' skills for the same job