[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6F932WQYA01QHGMH3167FMD":3,"skill-same:01M6F932WQYA01QHGMH3167FMD":72},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":26,"commitSha":52,"skillDirectory":53,"forksCount":54,"repositoryHtmlUrl":55,"repositoryHomepageUrl":6,"ownerHtmlUrl":56,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":57,"install":58,"resources":71},"01M6F932WQYA01QHGMH3167FMD","model-supply-chain-security",null,"Secure the AI model supply chain with artifact signing, provenance attestation, SBOM workflows, dependency controls, and trusted model promotion.","boisenoise\u002Fskills-collections","boisenoise","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F193180?v=4","01M6CDBDQK6BDN55ZMA6B6PKBM","01M6CDBDVSJ3JPTBYN26FZ7TZK",13,"MIT","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-model-supply-chain-security\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"chain security","supply chain security","model supply chain security","supply","model","chain","security","supply chain","main","relevant","scope","critical","active","artifact","community","dependency","only","devops-security","attestation","assessment","workflows","2026-11-10 10:12:30",false,"---\nname: model-supply-chain-security\ndescription: Secure the AI model supply chain with artifact signing, provenance attestation,\n  SBOM workflows, dependency controls, and trusted model promotion.\ncategory: security\nrisk: critical\nsource: https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\nsource_repo: BagelHole\u002FDevOps-Security-Agent-Skills\nsource_type: community\ndate_added: '2026-09-20'\nlicense: MIT\nlicense_source: https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\u002Fblob\u002Fmain\u002FLICENSE\ncompatibility: Requires the relevant security tooling (scanners, vault CLIs) and an\n  authorized scope for any active assessment. Docs-only; helper scripts and templates\n  not bundled.\nmetadata:\n  author: devops-skills\n  version: '1.0'\n---\n\n# Model Supply Chain Security\n\nProtect models and inference components from tampering, dependency compromise, and untrusted artifact promotion.\n\n## When to Use This Skill\n\nUse this skill when:\n- Pulling pretrained models from public registries (Hugging Face, TensorFlow Hub)\n- Building model-serving containers for production deployment\n- Establishing trust policies for ML artifact promotion across environments\n- Responding to supply chain incidents affecting ML dependencies\n- Meeting SLSA or SOC2 compliance requirements for AI systems\n\n## Prerequisites\n\n- `cosign` v2+ installed for signing and verification\n- `syft` for SBOM generation of model-serving images\n- `crane` or `skopeo` for OCI image inspection\n- Container registry with signature support (GHCR, ECR, ACR, Artifact Registry)\n- CI\u002FCD pipeline with provenance generation capability\n\n## Threats\n\n- Poisoned pretrained weights or adapters\n- Malicious model conversion tools or loaders\n- Compromised build pipelines and registries\n- Insecure runtime images with critical CVEs\n- Typosquatting on model registries\n- Deserialization attacks via pickle or custom loaders\n\n## Control Objectives\n\n- Verify artifact integrity end-to-end\n- Prove provenance for every promoted model\n- Detect vulnerable dependencies before deploy\n- Restrict execution to trusted signed artifacts\n\n## Model Signing with Cosign\n\n### Sign a Model Artifact\n\n```bash\n# Generate a keypair (store private key securely)\ncosign generate-key-pair\n\n# Sign an OCI-packaged model image\ncosign sign --key cosign.key ghcr.io\u002Facme\u002Fml-models\u002Fsentiment:v2.1.0\n\n# Keyless signing with Sigstore (uses OIDC identity)\ncosign sign ghcr.io\u002Facme\u002Fml-models\u002Fsentiment:v2.1.0\n\n# Verify the signature\ncosign verify --key cosign.pub ghcr.io\u002Facme\u002Fml-models\u002Fsentiment:v2.1.0\n\n# Keyless verification (requires certificate identity)\ncosign verify \\\n  --certificate-identity=ci-bot@acme.iam.gserviceaccount.com \\\n  --certificate-oidc-issuer=https:\u002F\u002Faccounts.google.com \\\n  ghcr.io\u002Facme\u002Fml-models\u002Fsentiment:v2.1.0\n```\n\n### Sign Model Weight Files Directly\n\n```bash\n# For model files stored as blobs (not OCI images)\n# Compute digest and sign\nsha256sum model-weights.safetensors > model-weights.sha256\ncosign sign-blob --key cosign.key model-weights.safetensors \\\n  --output-signature model-weights.sig \\\n  --output-certificate model-weights.crt\n\n# Verify blob signature\ncosign verify-blob --key cosign.pub \\\n  --signature model-weights.sig \\\n  model-weights.safetensors\n```\n\n## SLSA for ML Pipelines\n\n### SLSA Level Requirements for Model Builds\n\n```yaml\n# slsa-requirements.yaml\nslsa_levels:\n  level_1:\n    - Build process is scripted (not manual)\n    - Provenance document generated automatically\n  level_2:\n    - Build runs on hosted CI service\n    - Provenance is authenticated (signed)\n    - Source is version controlled\n  level_3:\n    - Build environment is ephemeral and isolated\n    - Provenance is non-falsifiable (hardened builder)\n    - Source integrity verified (two-person review)\n```\n\n### Generate SLSA Provenance for Model Training\n\n```yaml\n# .github\u002Fworkflows\u002Fmodel-build-slsa.yml\nname: Model Build with SLSA Provenance\non:\n  push:\n    tags: ['model-v*']\n\njobs:\n  train-and-package:\n    runs-on: ubuntu-latest\n    permissions:\n      id-token: write\n      contents: read\n      packages: write\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - name: Train model\n        run: python train.py --config configs\u002Fproduction.yaml\n\n      - name: Package model as OCI artifact\n        run: |\n          oras push ghcr.io\u002Facme\u002Fml-models\u002Fsentiment:${{ github.ref_name }} \\\n            model-weights.safetensors:application\u002Fvnd.acme.model.safetensors \\\n            model-config.json:application\u002Fjson\n\n      - name: Generate SBOM for training environment\n        run: |\n          syft dir:. -o cyclonedx-json > training-sbom.json\n\n      - name: Sign and attest\n        run: |\n          cosign sign ghcr.io\u002Facme\u002Fml-models\u002Fsentiment:${{ github.ref_name }}\n          cosign attest --predicate training-sbom.json \\\n            --type cyclonedx \\\n            ghcr.io\u002Facme\u002Fml-models\u002Fsentiment:${{ github.ref_name }}\n\n# Provenance must be generated by a supported reusable workflow invoked at jobs.\u003Cjob>.uses,\n# not as a step. Add a separate dependent job with the actual immutable digest output\n# from an identified push step and the selected generator's required inputs.\n```\n\n## Model Cards for Provenance\n\n```yaml\n# model-card.yaml\nmodel_details:\n  name: \"sentiment-classifier-v2.1.0\"\n  version: \"2.1.0\"\n  type: \"text-classification\"\n  framework: \"pytorch\"\n  license: \"Apache-2.0\"\n\nprovenance:\n  training_data:\n    source: \"s3:\u002F\u002Facme-datasets\u002Fsentiment-v3\u002F\"\n    hash: \"sha256:abc123...\"\n    data_card_ref: \"https:\u002F\u002Finternal.acme.com\u002Fdata-cards\u002Fsentiment-v3\"\n  training_config:\n    source: \"git:\u002F\u002Fgithub.com\u002Facme\u002Fml-models@abc123\"\n    hyperparameters:\n      learning_rate: 0.00005\n      epochs: 10\n      batch_size: 32\n  build_environment:\n    builder: \"github-actions\"\n    runner: \"ubuntu-22.04\"\n    python: \"3.11.7\"\n    torch: \"2.1.2\"\n    cuda: \"12.1\"\n  build_id: \"gh-actions-12345\"\n  commit_sha: \"abc123def456\"\n  build_timestamp: \"2025-01-15T10:30:00Z\"\n  signed_by: \"ci-bot@acme.iam.gserviceaccount.com\"\n\nperformance:\n  accuracy: 0.94\n  f1_score: 0.93\n  evaluation_dataset: \"s3:\u002F\u002Facme-datasets\u002Fsentiment-eval-v3\u002F\"\n  evaluation_hash: \"sha256:def456...\"\n\nsecurity:\n  vulnerability_scan: \"clean\"\n  sbom_ref: \"ghcr.io\u002Facme\u002Fml-models\u002Fsentiment:v2.1.0.sbom\"\n  last_security_review: \"2025-01-10\"\n  known_limitations:\n    - \"May produce biased outputs for underrepresented languages\"\n    - \"Not evaluated for adversarial robustness\"\n```\n\n## Registry Scanning\n\n```bash\n# Scan model-serving image for CVEs\ntrivy image ghcr.io\u002Facme\u002Fml-models\u002Fsentiment-serving:v2.1.0\n\n# Generate SBOM for the serving container\nsyft ghcr.io\u002Facme\u002Fml-models\u002Fsentiment-serving:v2.1.0 -o spdx-json > serving-sbom.json\n\n# Scan SBOM for vulnerabilities\ngrype sbom:serving-sbom.json --fail-on critical\n\n# Check for known-malicious model files (pickle scanning)\npip install fickling\nfickling --check model.pkl\n```\n\n### Automated Registry Scan Pipeline\n\n```yaml\n# .github\u002Fworkflows\u002Fregistry-scan.yml\nname: Nightly Registry Scan\non:\n  schedule:\n    - cron: '0 2 * * *'\n\njobs:\n  scan:\n    runs-on: ubuntu-latest\n    strategy:\n      matrix:\n        image:\n          - ghcr.io\u002Facme\u002Fml-models\u002Fsentiment-serving:latest\n          - ghcr.io\u002Facme\u002Fml-models\u002Fembedding-serving:latest\n          - ghcr.io\u002Facme\u002Fml-models\u002Frag-api:latest\n    steps:\n      - name: Scan image\n        run: |\n          trivy image --severity CRITICAL,HIGH \\\n            --exit-code 1 \\\n            --format json \\\n            --output scan-$(echo ${{ matrix.image }} | tr '\u002F:' '-').json \\\n            ${{ matrix.image }}\n\n      - name: Verify signatures are still valid\n        run: |\n          cosign verify \\\n            --certificate-identity=ci-bot@acme.iam.gserviceaccount.com \\\n            --certificate-oidc-issuer=https:\u002F\u002Faccounts.google.com \\\n            ${{ matrix.image }}\n```\n\n## Promotion Policy Enforcement\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n\"\"\"model_promotion_gate.py - Verify model meets all promotion criteria.\"\"\"\n\nimport subprocess\nimport json\nimport sys\n\ndef check_signature(image: str) -> bool:\n    result = subprocess.run(\n        [\"cosign\", \"verify\", \"--certificate-identity=ci-bot@acme.iam.gserviceaccount.com\",\n         \"--certificate-oidc-issuer=https:\u002F\u002Faccounts.google.com\", image],\n        capture_output=True, text=True,\n    )\n    return result.returncode == 0\n\ndef check_vulnerabilities(image: str) -> bool:\n    result = subprocess.run(\n        [\"trivy\", \"image\", \"--severity\", \"CRITICAL\", \"--exit-code\", \"1\",\n         \"--quiet\", image],\n        capture_output=True, text=True,\n    )\n    return result.returncode == 0\n\ndef check_sbom_exists(image: str) -> bool:\n    result = subprocess.run(\n        [\"cosign\", \"verify-attestation\", \"--type\", \"cyclonedx\",\n         \"--certificate-identity=ci-bot@acme.iam.gserviceaccount.com\",\n         \"--certificate-oidc-issuer=https:\u002F\u002Faccounts.google.com\", image],\n        capture_output=True, text=True,\n    )\n    return result.returncode == 0\n\ndef check_model_card(image: str) -> bool:\n    result = subprocess.run(\n        [\"cosign\", \"verify-attestation\", \"--type\", \"custom\",\n         \"--certificate-identity=ci-bot@acme.iam.gserviceaccount.com\",\n         \"--certificate-oidc-issuer=https:\u002F\u002Faccounts.google.com\", image],\n        capture_output=True, text=True,\n    )\n    return result.returncode == 0\n\ndef main():\n    image = sys.argv[1]\n    checks = {\n        \"signature_valid\": check_signature(image),\n        \"no_critical_cves\": check_vulnerabilities(image),\n        \"sbom_attached\": check_sbom_exists(image),\n        \"model_card_present\": check_model_card(image),\n    }\n    all_passed = all(checks.values())\n    for name, passed in checks.items():\n        status = \"PASS\" if passed else \"FAIL\"\n        print(f\"  [{status}] {name}\")\n    if not all_passed:\n        print(\"Promotion BLOCKED: not all checks passed.\")\n        sys.exit(1)\n    print(\"Illustrative checks passed; policy\u002Fcontent validation and authorized promotion still required.\")\n\nif __name__ == \"__main__\":\n    main()\n```\n\n## Runtime Hardening\n\n- Run inference containers as non-root.\n- Apply egress restrictions to prevent unauthorized downloads.\n- Mount model volumes read-only when possible.\n- Alert on unsigned artifact pull attempts.\n- Prefer safetensors weights to avoid pickle execution during weight decoding; custom model code, dependencies and parsers still require review.\n\n```yaml\n# kubernetes deployment hardening\napiVersion: apps\u002Fv1\nkind: Deployment\nmetadata:\n  name: model-serving\nspec:\n  template:\n    spec:\n      securityContext:\n        runAsNonRoot: true\n        runAsUser: 1000\n        fsGroup: 1000\n      containers:\n        - name: inference\n          image: ghcr.io\u002Facme\u002Fml-models\u002Fsentiment-serving:v2.1.0\n          securityContext:\n            readOnlyRootFilesystem: true\n            allowPrivilegeEscalation: false\n            capabilities:\n              drop: [\"ALL\"]\n          volumeMounts:\n            - name: model-weights\n              mountPath: \u002Fmodels\n              readOnly: true\n          resources:\n            limits:\n              memory: \"4Gi\"\n              nvidia.com\u002Fgpu: \"1\"\n      volumes:\n        - name: model-weights\n          persistentVolumeClaim:\n            claimName: model-weights-pvc\n            readOnly: true\n```\n\n## Kyverno Policy for Admission Control\n\n```yaml\napiVersion: kyverno.io\u002Fv1\nkind: ClusterPolicy\nmetadata:\n  name: require-signed-model-images\nspec:\n  validationFailureAction: Enforce\n  rules:\n    - name: verify-model-image-signature\n      match:\n        any:\n          - resources:\n              kinds: [\"Pod\"]\n              namespaces: [\"ml-serving\"]\n      verifyImages:\n        - imageReferences: [\"ghcr.io\u002Facme\u002Fml-models\u002F*\"]\n          attestors:\n            - entries:\n                - keyless:\n                    subject: \"ci-bot@acme.iam.gserviceaccount.com\"\n                    issuer: \"https:\u002F\u002Faccounts.google.com\"\n```\n\n## Troubleshooting\n\n| Problem | Cause | Solution |\n|---------|-------|----------|\n| `cosign verify` fails with \"no matching signatures\" | Image was pushed without signing | Quarantine and investigate missing signatures; do not sign an untrusted artifact merely to make verification pass |\n| Provenance attestation missing | SLSA generator not configured | Add slsa-github-generator to the build workflow |\n| Trivy reports CVEs in base image | Stale base image | Update `FROM` image in Dockerfile; rebuild and re-sign |\n| Pickle deserialization warning | Model saved in unsafe format | Do not load suspicious pickle to convert it on a trusted host; obtain a verified safe source or use an isolated analysis environment |\n| Keyless verification fails | Wrong OIDC issuer or identity | Check `--certificate-identity` and `--certificate-oidc-issuer` flags |\n| Model card not found for artifact | Attestation not attached to digest | Attach with `cosign attest --predicate model-card.yaml --type custom IMAGE` |\n\n## Related Skills\n\n- sbom-supply-chain (`sbom-supply-chain`) - Generate SBOM and provenance evidence\n- container-hardening (`container-hardening`) - Harden runtime container posture\n- model-registry-governance (`model-registry-governance`) - Controlled lifecycle and approvals\n\n## Limitations\n\n- Apply guidance only within authorized scope; test destructive steps in non-production first.\n- Docs-only import: upstream scripts and templates not bundled.\n\n### Example\n\n```bash\n# Read-only first: inventory before any active step.\nwhich \u003Ctool> && \u003Ctool> --help | head -n 20\n```\n\n> Adapted from [BagelHole\u002FDevOps-Security-Agent-Skills](https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills) (MIT); frontmatter, When to Use\u002FLimitations, and safety boundaries added for upstream compliance. Docs-only import: helper scripts and templates not bundled.\n\nAll artifacts, identities and scores are fictional examples. Resolve mutable tags to a digest once and verify, scan and promote that exact digest; otherwise checks can inspect different artifacts. Signatures prove signer\u002Fintegrity, not safe weights or training data. Attestation existence is insufficient: decode and validate predicate schema, subject digest, builder\u002Fsource\u002Fdependency policy, and substantive model-card contents. A generic custom attestation is not proof of a model card, and YAML is not automatically the JSON predicate required by a tool. The training workflow needs reviewed tool installation, registry login, actual push outputs and jobs-level reusable provenance wiring; the Kubernetes manifest is a partial fragment lacking selector\u002Ftemplate labels. SLSA requirements depend on the spec version and track; two-person review is not a universal Build L3 requirement. Directory SBOM scans do not inventory every installed training dependency. Pin reviewed tools\u002Factions and bound scanner\u002Fnetwork\u002Fresource use.\n","# Model Supply Chain Security\n\nProtect models and inference components from tampering, dependency compromise, and untrusted artifact promotion.\n\n## When to Use This Skill\n\nUse this skill when:\n- Pulling pretrained models from public registries (Hugging Face, TensorFlow Hub)\n- Building model-serving containers for production deployment\n- Establishing trust policies for ML artifact promotion across environments\n- Responding to supply chain incidents affecting ML dependencies\n- Meeting SLSA or SOC2 compliance requirements for AI systems\n\n## Prerequisites\n\n- `cosign` v2+ installed for signing and verification\n- `syft` for SBOM generation of model-serving images\n- `crane` or `skopeo` for OCI image inspection\n- Container registry with signature support (GHCR, ECR, ACR, Artifact Registry)\n- CI\u002FCD pipeline with provenance generation capability\n\n## Threats\n\n- Poisoned pretrained weights or adapters\n- Malicious model conversion tools or loaders\n- Compromised build pipelines and registries\n- Insecure runtime images with critical CVEs\n- Typosquatting on model registries\n- Deserialization attacks via pickle or custom loaders\n\n## Control Objectives\n\n- Verify artifact integrity end-to-end\n- Prove provenance for every promoted model\n- Detect vulnerable dependencies before deploy\n- Restrict execution to trusted signed artifacts\n\n## Model Signing with Cosign\n\n### Sign a Model Artifact\n\n```bash\n# Generate a keypair (store private key securely)\ncosign generate-key-pair\n\n# Sign an OCI-packaged model image\ncosign sign --key cosign.key ghcr.io\u002Facme\u002Fml-models\u002Fsentiment:v2.1.0\n\n# Keyless signing with Sigstore (uses OIDC identity)\ncosign sign ghcr.io\u002Facme\u002Fml-models\u002Fsentiment:v2.1.0\n\n# Verify the signature\ncosign verify --key cosign.pub ghcr.io\u002Facme\u002Fml-models\u002Fsentiment:v2.1.0\n\n# Keyless verification (requires certificate identity)\ncosign verify \\\n  --certificate-identity=ci-bot@acme.iam.gserviceaccount.com \\\n  --certificate-oidc-issuer=https:\u002F\u002Faccounts.google.com \\\n  ghcr.io\u002Facme\u002Fml-models\u002Fsentiment:v2.1.0\n```\n\n### Sign Model Weight Files Directly\n\n```bash\n# For model files stored as blobs (not OCI images)\n# Compute digest and sign\nsha256sum model-weights.safetensors > model-weights.sha256\ncosign sign-blob --key cosign.key model-weights.safetensors \\\n  --output-signature model-weights.sig \\\n  --output-certificate model-weights.crt\n\n# Verify blob signature\ncosign verify-blob --key cosign.pub \\\n  --signature model-weights.sig \\\n  model-weights.safetensors\n```\n\n## SLSA for ML Pipelines\n\n### SLSA Level Requirements for Model Builds\n\n```yaml\n# slsa-requirements.yaml\nslsa_levels:\n  level_1:\n    - Build process is scripted (not manual)\n    - Provenance document generated automatically\n  level_2:\n    - Build runs on hosted CI service\n    - Provenance is authenticated (signed)\n    - Source is version controlled\n  level_3:\n    - Build environment is ephemeral and isolated\n    - Provenance is non-falsifiable (hardened builder)\n    - Source integrity verified (two-person review)\n```\n\n### Generate SLSA Provenance for Model Training\n\n```yaml\n# .github\u002Fworkflows\u002Fmodel-build-slsa.yml\nname: Model Build with SLSA Provenance\non:\n  push:\n    tags: ['model-v*']\n\njobs:\n  train-and-package:\n    runs-on: ubuntu-latest\n    permissions:\n      id-token: write\n      contents: read\n      packages: write\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - name: Train model\n        run: python train.py --config configs\u002Fproduction.yaml\n\n      - name: Package model as OCI artifact\n        run: |\n          oras push ghcr.io\u002Facme\u002Fml-models\u002Fsentiment:${{ github.ref_name }} \\\n            model-weights.safetensors:application\u002Fvnd.acme.model.safetensors \\\n            model-config.json:application\u002Fjson\n\n      - name: Generate SBOM for training environment\n        run: |\n          syft dir:. -o cyclonedx-json > training-sbom.json\n\n      - name: Sign and attest\n        run: |\n          cosign sign ghcr.io\u002Facme\u002Fml-models\u002Fsentiment:${{ github.ref_name }}\n          cosign attest --predicate training-sbom.json \\\n            --type cyclonedx \\\n            ghcr.io\u002Facme\u002Fml-models\u002Fsentiment:${{ github.ref_name }}\n\n# Provenance must be generated by a supported reusable workflow invoked at jobs.\u003Cjob>.uses,\n# not as a step. Add a separate dependent job with the actual immutable digest output\n# from an identified push step and the selected generator's required inputs.\n```\n\n## Model Cards for Provenance\n\n```yaml\n# model-card.yaml\nmodel_details:\n  name: \"sentiment-classifier-v2.1.0\"\n  version: \"2.1.0\"\n  type: \"text-classification\"\n  framework: \"pytorch\"\n  license: \"Apache-2.0\"\n\nprovenance:\n  training_data:\n    source: \"s3:\u002F\u002Facme-datasets\u002Fsentiment-v3\u002F\"\n    hash: \"sha256:abc123...\"\n    data_card_ref: \"https:\u002F\u002Finternal.acme.com\u002Fdata-cards\u002Fsentiment-v3\"\n  training_config:\n    source: \"git:\u002F\u002Fgithub.com\u002Facme\u002Fml-models@abc123\"\n    hyperparameters:\n      learning_rate: 0.00005\n      epochs: 10\n      batch_size: 32\n  build_environment:\n    builder: \"github-actions\"\n    runner: \"ubuntu-22.04\"\n    python: \"3.11.7\"\n    torch: \"2.1.2\"\n    cuda: \"12.1\"\n  build_id: \"gh-actions-12345\"\n  commit_sha: \"abc123def456\"\n  build_timestamp: \"2025-01-15T10:30:00Z\"\n  signed_by: \"ci-bot@acme.iam.gserviceaccount.com\"\n\nperformance:\n  accuracy: 0.94\n  f1_score: 0.93\n  evaluation_dataset: \"s3:\u002F\u002Facme-datasets\u002Fsentiment-eval-v3\u002F\"\n  evaluation_hash: \"sha256:def456...\"\n\nsecurity:\n  vulnerability_scan: \"clean\"\n  sbom_ref: \"ghcr.io\u002Facme\u002Fml-models\u002Fsentiment:v2.1.0.sbom\"\n  last_security_review: \"2025-01-10\"\n  known_limitations:\n    - \"May produce biased outputs for underrepresented languages\"\n    - \"Not evaluated for adversarial robustness\"\n```\n\n## Registry Scanning\n\n```bash\n# Scan model-serving image for CVEs\ntrivy image ghcr.io\u002Facme\u002Fml-models\u002Fsentiment-serving:v2.1.0\n\n# Generate SBOM for the serving container\nsyft ghcr.io\u002Facme\u002Fml-models\u002Fsentiment-serving:v2.1.0 -o spdx-json > serving-sbom.json\n\n# Scan SBOM for vulnerabilities\ngrype sbom:serving-sbom.json --fail-on critical\n\n# Check for known-malicious model files (pickle scanning)\npip install fickling\nfickling --check model.pkl\n```\n\n### Automated Registry Scan Pipeline\n\n```yaml\n# .github\u002Fworkflows\u002Fregistry-scan.yml\nname: Nightly Registry Scan\non:\n  schedule:\n    - cron: '0 2 * * *'\n\njobs:\n  scan:\n    runs-on: ubuntu-latest\n    strategy:\n      matrix:\n        image:\n          - ghcr.io\u002Facme\u002Fml-models\u002Fsentiment-serving:latest\n          - ghcr.io\u002Facme\u002Fml-models\u002Fembedding-serving:latest\n          - ghcr.io\u002Facme\u002Fml-models\u002Frag-api:latest\n    steps:\n      - name: Scan image\n        run: |\n          trivy image --severity CRITICAL,HIGH \\\n            --exit-code 1 \\\n            --format json \\\n            --output scan-$(echo ${{ matrix.image }} | tr '\u002F:' '-').json \\\n            ${{ matrix.image }}\n\n      - name: Verify signatures are still valid\n        run: |\n          cosign verify \\\n            --certificate-identity=ci-bot@acme.iam.gserviceaccount.com \\\n            --certificate-oidc-issuer=https:\u002F\u002Faccounts.google.com \\\n            ${{ matrix.image }}\n```\n\n## Promotion Policy Enforcement\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n\"\"\"model_promotion_gate.py - Verify model meets all promotion criteria.\"\"\"\n\nimport subprocess\nimport json\nimport sys\n\ndef check_signature(image: str) -> bool:\n    result = subprocess.run(\n        [\"cosign\", \"verify\", \"--certificate-identity=ci-bot@acme.iam.gserviceaccount.com\",\n         \"--certificate-oidc-issuer=https:\u002F\u002Faccounts.google.com\", image],\n        capture_output=True, text=True,\n    )\n    return result.returncode == 0\n\ndef check_vulnerabilities(image: str) -> bool:\n    result = subprocess.run(\n        [\"trivy\", \"image\", \"--severity\", \"CRITICAL\", \"--exit-code\", \"1\",\n         \"--quiet\", image],\n        capture_output=True, text=True,\n    )\n    return result.returncode == 0\n\ndef check_sbom_exists(image: str) -> bool:\n    result = subprocess.run(\n        [\"cosign\", \"verify-attestation\", \"--type\", \"cyclonedx\",\n         \"--certificate-identity=ci-bot@acme.iam.gserviceaccount.com\",\n         \"--certificate-oidc-issuer=https:\u002F\u002Faccounts.google.com\", image],\n        capture_output=True, text=True,\n    )\n    return result.returncode == 0\n\ndef check_model_card(image: str) -> bool:\n    result = subprocess.run(\n        [\"cosign\", \"verify-attestation\", \"--type\", \"custom\",\n         \"--certificate-identity=ci-bot@acme.iam.gserviceaccount.com\",\n         \"--certificate-oidc-issuer=https:\u002F\u002Faccounts.google.com\", image],\n        capture_output=True, text=True,\n    )\n    return result.returncode == 0\n\ndef main():\n    image = sys.argv[1]\n    checks = {\n        \"signature_valid\": check_signature(image),\n        \"no_critical_cves\": check_vulnerabilities(image),\n        \"sbom_attached\": check_sbom_exists(image),\n        \"model_card_present\": check_model_card(image),\n    }\n    all_passed = all(checks.values())\n    for name, passed in checks.items():\n        status = \"PASS\" if passed else \"FAIL\"\n        print(f\"  [{status}] {name}\")\n    if not all_passed:\n        print(\"Promotion BLOCKED: not all checks passed.\")\n        sys.exit(1)\n    print(\"Illustrative checks passed; policy\u002Fcontent validation and authorized promotion still required.\")\n\nif __name__ == \"__main__\":\n    main()\n```\n\n## Runtime Hardening\n\n- Run inference containers as non-root.\n- Apply egress restrictions to prevent unauthorized downloads.\n- Mount model volumes read-only when possible.\n- Alert on unsigned artifact pull attempts.\n- Prefer safetensors weights to avoid pickle execution during weight decoding; custom model code, dependencies and parsers still require review.\n\n```yaml\n# kubernetes deployment hardening\napiVersion: apps\u002Fv1\nkind: Deployment\nmetadata:\n  name: model-serving\nspec:\n  template:\n    spec:\n      securityContext:\n        runAsNonRoot: true\n        runAsUser: 1000\n        fsGroup: 1000\n      containers:\n        - name: inference\n          image: ghcr.io\u002Facme\u002Fml-models\u002Fsentiment-serving:v2.1.0\n          securityContext:\n            readOnlyRootFilesystem: true\n            allowPrivilegeEscalation: false\n            capabilities:\n              drop: [\"ALL\"]\n          volumeMounts:\n            - name: model-weights\n              mountPath: \u002Fmodels\n              readOnly: true\n          resources:\n            limits:\n              memory: \"4Gi\"\n              nvidia.com\u002Fgpu: \"1\"\n      volumes:\n        - name: model-weights\n          persistentVolumeClaim:\n            claimName: model-weights-pvc\n            readOnly: true\n```\n\n## Kyverno Policy for Admission Control\n\n```yaml\napiVersion: kyverno.io\u002Fv1\nkind: ClusterPolicy\nmetadata:\n  name: require-signed-model-images\nspec:\n  validationFailureAction: Enforce\n  rules:\n    - name: verify-model-image-signature\n      match:\n        any:\n          - resources:\n              kinds: [\"Pod\"]\n              namespaces: [\"ml-serving\"]\n      verifyImages:\n        - imageReferences: [\"ghcr.io\u002Facme\u002Fml-models\u002F*\"]\n          attestors:\n            - entries:\n                - keyless:\n                    subject: \"ci-bot@acme.iam.gserviceaccount.com\"\n                    issuer: \"https:\u002F\u002Faccounts.google.com\"\n```\n\n## Troubleshooting\n\n| Problem | Cause | Solution |\n|---------|-------|----------|\n| `cosign verify` fails with \"no matching signatures\" | Image was pushed without signing | Quarantine and investigate missing signatures; do not sign an untrusted artifact merely to make verification pass |\n| Provenance attestation missing | SLSA generator not configured | Add slsa-github-generator to the build workflow |\n| Trivy reports CVEs in base image | Stale base image | Update `FROM` image in Dockerfile; rebuild and re-sign |\n| Pickle deserialization warning | Model saved in unsafe format | Do not load suspicious pickle to convert it on a trusted host; obtain a verified safe source or use an isolated analysis environment |\n| Keyless verification fails | Wrong OIDC issuer or identity | Check `--certificate-identity` and `--certificate-oidc-issuer` flags |\n| Model card not found for artifact | Attestation not attached to digest | Attach with `cosign attest --predicate model-card.yaml --type custom IMAGE` |\n\n## Related Skills\n\n- sbom-supply-chain (`sbom-supply-chain`) - Generate SBOM and provenance evidence\n- container-hardening (`container-hardening`) - Harden runtime container posture\n- model-registry-governance (`model-registry-governance`) - Controlled lifecycle and approvals\n\n## Limitations\n\n- Apply guidance only within authorized scope; test destructive steps in non-production first.\n- Docs-only import: upstream scripts and templates not bundled.\n\n### Example\n\n```bash\n# Read-only first: inventory before any active step.\nwhich \u003Ctool> && \u003Ctool> --help | head -n 20\n```\n\n> Adapted from [BagelHole\u002FDevOps-Security-Agent-Skills](https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills) (MIT); frontmatter, When to Use\u002FLimitations, and safety boundaries added for upstream compliance. Docs-only import: helper scripts and templates not bundled.\n\nAll artifacts, identities and scores are fictional examples. Resolve mutable tags to a digest once and verify, scan and promote that exact digest; otherwise checks can inspect different artifacts. Signatures prove signer\u002Fintegrity, not safe weights or training data. Attestation existence is insufficient: decode and validate predicate schema, subject digest, builder\u002Fsource\u002Fdependency policy, and substantive model-card contents. A generic custom attestation is not proof of a model card, and YAML is not automatically the JSON predicate required by a tool. The training workflow needs reviewed tool installation, registry login, actual push outputs and jobs-level reusable provenance wiring; the Kubernetes manifest is a partial fragment lacking selector\u002Ftemplate labels. SLSA requirements depend on the spec version and track; two-person review is not a universal Build L3 requirement. Directory SBOM scans do not inventory every installed training dependency. Pin reviewed tools\u002Factions and bound scanner\u002Fnetwork\u002Fresource use.\n",{"name":5,"risk":29,"source":44,"license":14,"category":24,"metadata":45,"date_added":48,"description":7,"source_repo":49,"source_type":32,"compatibility":50,"license_source":51},"https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills",{"author":46,"version":47},"devops-skills","1.0","2026-09-20","BagelHole\u002FDevOps-Security-Agent-Skills","Requires the relevant security tooling (scanners, vault CLIs) and an authorized scope for any active assessment. Docs-only; helper scripts and templates not bundled.","https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\u002Fblob\u002Fmain\u002FLICENSE","7bf2279c8a65758319526a721d5c4b75683aec9c","skills\u002Fantigravity-model-supply-chain-security",3,"https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections","https:\u002F\u002Fgithub.com\u002Fboisenoise","2026-11-14 14:18:11",{"source":8,"skillName":5,"commands":59,"prompt":69,"zipAvailable":70},[60,63,66],{"tool":61,"command":62},"npx","npx skills add boisenoise\u002Fskills-collections --skill model-supply-chain-security",{"tool":64,"command":65},"bunx","bunx skills add boisenoise\u002Fskills-collections --skill model-supply-chain-security",{"tool":67,"command":68},"pnpm","pnpm dlx skills add boisenoise\u002Fskills-collections --skill model-supply-chain-security","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-model-supply-chain-security\u002FSKILL.md",true,[],[73,82,90,99,107,115],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":77,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":81},"01M7B6HREHB53EHGGVZND7DDXN","scrapely-scrape","Collect web data with ready-made Scrape.ly scrapers: Google Maps places, Amazon products, LinkedIn jobs, reviews, social posts. Use when the user wants structured data from a site.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-scrapely-scrape\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-scrapely-scrape\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":86,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":81},"01M7B6GDNNN4HE662KA6KPF7GW","lumify-odds","Lumify's hosted sports MCP\u002FREST API for sportsbook odds, line-movement history, public betting splits, and player props across MLB, NFL, NBA, NHL, soccer, tennis, NCAAF, NCAAB. Read-only market data.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-lumify-odds\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-lumify-odds\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":94,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":98},"01M743PZMJW2GEKG5J199GPSK7","sync-lipsync","Lip-sync an existing video of a real person to new audio or a typed script with sync. labs through its hosted MCP server, quoting the cost and waiting for approval first.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-sync-lipsync\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-sync-lipsync\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":103,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":98},"01M743MMN3CKTJVNRSZMB684E5","music-for-robots","Optional music-inspired creative exercise for multimodal agents. Ingests an unquantized acoustic MP3 composition by Michael Luchtan (Music For Robots) into a private temporary directory, analyzing microtiming and texture to inspire creative writing, brainstorming, or technical tasks.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-music-for-robots\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-music-for-robots\u002FSKILL.md",[],[],{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":111,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":98},"01M743KC2GN5WE11BSTWSSWD8B","imagera-media","Generate or edit images, video clips, voiceovers and music through the hosted Imagera MCP server, quoting the credit cost and getting approval before each paid call.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-imagera-media\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-imagera-media\u002FSKILL.md",[],[],{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":119,"sourceHtmlUrl":120,"categories":121,"keywords":122,"publishedAt":98},"01M743HDJNZQA8A4VT68NWGWQJ","deja-history","Search this machine's past AI coding sessions across Claude Code, Codex, Cursor, Gemini CLI and thirty-nine other agents before editing, debugging, or denying something exists.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-deja-history\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-deja-history\u002FSKILL.md",[],[]]