[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75JM5AME8047R738TSS91VJ":3,"skill-same:01M75JM5AME8047R738TSS91VJ":59},{"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":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":28,"commitSha":29,"skillDirectory":30,"forksCount":13,"repositoryHtmlUrl":31,"repositoryHomepageUrl":6,"ownerHtmlUrl":32,"ownerBlogUrl":6,"ownerDescription":33,"updatedAt":34,"install":35,"resources":48},"01M75JM5AME8047R738TSS91VJ","enforce-sbom",null,"Add an SBOM Policy Enforcement (SscaEnforcement \u002F CdSscaEnforcement) step to an existing Harness pipeline to verify SBOM attestations and apply OPA SBOM policy sets. Supports CI, Security, and CD (Deployment) including CI-only pipelines — if no Deploy stage exists, add one via Phase 3b (service, environment, infra, containerized step group) then place CdSscaEnforcement before deploy. Supports container images and repositories from Artifact Registry, Third-Party registries (docker, ECR, GCR, GAR, ACR), and Git. Matches Pipeline Studio SBOM Policy Enforcement UI. Only works with existing pipelines (may append a Deploy stage). Use when asked to enforce SBOM policies, add SBOM policy enforcement, verify SBOM attestation in pipeline, or block non-compliant components. Trigger phrases: enforce SBOM, SBOM policy enforcement, SBOM policy step, verify SBOM policy, SscaEnforcement, add policy enforcement after SBOM.","AdmiralGallade\u002Fharness-repository","AdmiralGallade","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F59243621?v=4","01M759AG0891RDPWNGJBX1Y2TG","01M759AG10MS924J53ZWJ60AEC",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FAdmiralGallade\u002Fharness-repository\u002Fblob\u002Fmain\u002Fharnesses\u002Fharness-skills\u002Fskills\u002Fenforce-sbom\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: enforce-sbom\ndescription: >-\n  Add an SBOM Policy Enforcement (SscaEnforcement \u002F CdSscaEnforcement) step to an existing Harness\n  pipeline to verify SBOM attestations and apply OPA SBOM policy sets. Supports CI, Security, and CD\n  (Deployment) including CI-only pipelines — if no Deploy stage exists, add one via Phase 3b\n  (service, environment, infra, containerized step group) then place CdSscaEnforcement before deploy.\n  Supports container images and repositories from Artifact Registry, Third-Party registries (docker,\n  ECR, GCR, GAR, ACR), and Git. Matches Pipeline Studio SBOM Policy Enforcement UI. Only works with\n  existing pipelines (may append a Deploy stage). Use when asked to enforce SBOM policies, add SBOM\n  policy enforcement, verify SBOM attestation in pipeline, or block non-compliant components.\n  Trigger phrases: enforce SBOM, SBOM policy enforcement, SBOM policy step, verify SBOM policy,\n  SscaEnforcement, add policy enforcement after SBOM.\nmetadata:\n  author: Harness\n  version: 1.0.0\n  mcp-server: harness-mcp-v2\nlicense: Apache-2.0\ncompatibility: Requires Harness MCP v2 server (harness-mcp-v2)\n---\n\n# Enforce SBOM\n\nAdd an **SBOM Policy Enforcement** (`SscaEnforcement` \u002F `CdSscaEnforcement`) step to an existing\nHarness pipeline. The step verifies SBOM attestations (when enabled) and evaluates SBOM OPA policy\nsets against the artifact's bill of materials.\n\nThis skill only works with **existing pipelines** — do not create standalone enforcement-only pipelines.\n\n**Prerequisites:** An SBOM must already exist for the artifact (typically from `SscaOrchestration` via\n`\u002Fcreate-sbom` or SBOM ingestion). SBOM **policy sets** must exist (`\u002Fcreate-policy`).\n\n**Supported stages:** CI, CD (`Deployment`), and Security — same as SBOM Orchestration. CD requires a\n**containerized step group** with container-based execution.\n\nGuide the user through a **step-by-step interactive wizard** (same UX as `\u002Fcreate-sbom`):\n\n- Wizard: `references\u002Finteractive-wizard-flow.md`\n- UI ↔ YAML: `references\u002Fsbom-enforcement-step.md`\n- CD containerized step groups (new or existing Deploy stage): `skills\u002Fcreate-sbom\u002Freferences\u002Fcd-containerized-step-group.md`\n\n---\n\n## Interaction model (mandatory)\n\n1. **One question per turn** — use `AskQuestion` when available; otherwise numbered options with `(Recommended)`.\n2. **Opening message** — add SBOM Policy Enforcement to an existing pipeline; mention SBOM + policy set prerequisites.\n3. **Progress breadcrumb** — after pipeline fetch:\n   `Pipeline · Placement · Source · Details · Verify · Policy · Submit`\n4. **Record answers** — running summary; do not re-ask unless the user changes direction.\n5. **Fetch before configure** — `harness_get` before placement\u002Fsource questions.\n6. **Show pipeline structure** — list stages\u002Fsteps; highlight `SscaOrchestration` and connectors.\n7. **Infer source from orchestration** — when one SBOM generation step exists, reuse its `source` and image.\n8. **Never guess image tags** — default to orchestration step image; ask if ambiguous.\n9. **Confirm before write** — summary + `harness_update` only after user confirms.\n10. **Stop after update** — after successful `harness_update`, provide a configuration summary and\n    point the user to `\u002Frun-pipeline` to execute. Do **not** call `harness_execute`, poll\n    executions, or run `harness_diagnose` in this skill (same pattern as `\u002Fconfigure-repo-scan`).\n11. **CD placement without an existing Deploy stage** — if the user chooses CD enforcement (`cd_before_deploy`, `add_cd_stage`, or similar) on a CI-only pipeline, **do not** reject or force CI-only. Run **Phase 3b** to add a `Deployment` stage with a containerized step group and `CdSscaEnforcement` before deploy (same prerequisites as `\u002Fcreate-sbom`).\n12. **Never block CD on “no Deployment stage”** — warn in Phase 2, then proceed via Phase 3b when the user wants CD.\n\nFull phase prompts: `references\u002Finteractive-wizard-flow.md`.\n\n---\n\n## Instructions\n\n### Wizard phases (user-facing)\n\n| Phase | Breadcrumb | Action |\n|-------|------------|--------|\n| 0 | Pipeline | AskQuestion: pipeline URL ready? |\n| 1 | Pipeline | Collect URL or org\u002Fproject\u002Fid → `harness_get` |\n| 2 | Pipeline | Display structure; note missing `SscaOrchestration` |\n| 3 | Placement | AskQuestion: after SBOM step, CD before deploy, add CD stage, etc. |\n| 3b | Placement (CD only) | If no `Deployment` stage: service, environment, infra, `stepGroupInfra` — then add stage + `CdSscaEnforcement` |\n| 4 | Source | AskQuestion: infer from pipeline or pick tile |\n| 5 | Source | AskQuestion: registry provider (Third-Party only) |\n| 6 | Details | Connector (skip if obvious) |\n| 7 | Details | Image \u002F repo (free text; default from orchestration) |\n| 8 | Verify | AskQuestion: verify attestation method |\n| 9 | Policy | AskQuestion: policy set(s) — `harness_list` `policy_set` |\n| 10 | Submit | AskQuestion: confirm pipeline update |\n\nAfter Phase 10 `confirm` → insert step, `harness_update`, then provide summary (do not run the pipeline).\n\n### Supported stage types\n\n| Stage type (YAML) | Step `type` | Placement notes |\n|-------------------|-------------|-----------------|\n| `CI` | `SscaEnforcement` | **After** `SscaOrchestration` in the same stage |\n| `Deployment` | `CdSscaEnforcement` | Containerized step group; **before** deploy |\n| `Security` | `SscaEnforcement` | After SBOM generation when artifact is known |\n\n### CD edge case (mandatory workflow)\n\nUse when Placement targets **CD** (`cd_before_deploy`, `add_cd_stage`, or an existing `Deployment` stage).\n\n#### Phase 2 — CI-only pipeline\n\nIf there is **no** `type: Deployment` stage, note it in the structure table and add:\n\n> This pipeline has no CD Deploy stage yet. You can still enforce SBOM in CD — we will add a **Deployment** stage with a **containerized step group** and place **SBOM Policy Enforcement** before the deploy step.\n\n**Do not** tell the user CD is invalid for this pipeline. If they chose CD in Phase 3, continue to Phase 3b.\n\n#### Phase 3b — CD prerequisites (no Deploy stage yet)\n\nMirror `\u002Fcreate-sbom` Phase 3b — **one topic per turn**:\n\n| Step | Action |\n|------|--------|\n| Service | `harness_list` (`service`) → `serviceRef` |\n| Environment | `harness_list` (`environment`) → `environmentRef` |\n| Infrastructure | `harness_list` (`infrastructure`, `params: { environment_id }`); create if missing per `\u002Fcreate-infrastructure` |\n| Step group infra | K8s connector + namespace for `stepGroupInfra` |\n| Deploy step | Default `K8sRollingDeploy` for Kubernetes services |\n| CI enforcement | Optional: keep CI `SscaEnforcement` **and** add CD `enforce_sbom_cd`, or CD-only — confirm in Phase 10 |\n\nAppend a Deploy stage with containerized group containing `CdSscaEnforcement` **before** `K8sRollingDeploy`. Full YAML patterns: `skills\u002Fcreate-sbom\u002Freferences\u002Fcd-containerized-step-group.md` (use `CdSscaEnforcement` instead of `SscaOrchestration`).\n\n**CD image \u002F source:** prefer `\u003C+artifact.image>` from the service primary artifact; reuse connector from CI `SscaOrchestration` or service artifact source. **Verify attestation** must match the CI generation step (e.g. keyless Harness OIDC).\n\n**Step id:** use `enforce_sbom_cd` when CI already has `enforce_sbom`.\n\n### After the wizard — backend steps\n\n#### Check prerequisites\n\n1. **SBOM generation** — pipeline YAML contains `SscaOrchestration` (or user confirms SBOM was ingested).\n2. **Policy sets** — `harness_list(resource_type=\"policy_set\", org_id, project_id)`. If empty, direct user to `\u002Fcreate-policy` (SBOM entity, `onstep` event) before continuing.\n\n#### Extract context from pipeline YAML\n\nFrom `SscaOrchestration` (if present), copy:\n\n- `spec.source` (type + spec)\n- `spec.attestation` (use matching `verifyAttestation` when user chooses verify)\n- `connector` \u002F `image` \u002F `registry`\n\nFrom build\u002Fpush steps: `connectorRef` in `BuildAndPushDockerRegistry`, `Run`, `Plugin`.\n\n#### Generate SBOM enforcement step YAML\n\nUse **only wizard answers**. Default: verify SBOM + keyless Harness OIDC + policy sets from Phase 9.\n\n**CI \u002F Security — `SscaEnforcement` (Third-Party Docker):**\n\n```yaml\n- step:\n    identifier: enforce_sbom\n    name: SBOM Policy Enforcement\n    type: SscaEnforcement\n    spec:\n      source:\n        type: docker\n        spec:\n          connector: \u003Cdocker_registry_connector>\n          image: \u003Corg>\u002F\u003Crepo>:\u003Ctag>\n      verifyAttestation:\n        type: cosign\n        spec:\n          type: keyless\n          spec:\n            oidcProvider: harness\n      policy:\n        policySets:\n          - \u003Csbom_policy_set_identifier>\n    timeout: 15m\n```\n\n**Policy sets only** (UI Policy Configuration):\n\n```yaml\n      policy:\n        policySets:\n          - sbom_license_allowlist\n          - sbom_deny_critical\n```\n\n**No verification** (when user unchecks Verify SBOM):\n\n```yaml\n      policy:\n        policySets:\n          - \u003Csbom_policy_set_identifier>\n```\n\nOmit `verifyAttestation`.\n\n**Repository source** — add `overrideConnectorRef` on `spec` (see reference doc).\n\n**CD `Deployment`** — use `CdSscaEnforcement` inside a containerized `stepGroup` (`stepGroupInfra`);\ninclude `spec.infrastructure` matching that group (see `references\u002Fsbom-enforcement-step.md` and\n`skills\u002Fcreate-sbom\u002Freferences\u002Fcd-containerized-step-group.md`). When adding a new Deploy stage, place\nenforcement in `stepGroup.steps` **before** the deploy step — not at top-level `execution.steps`.\n\nSource types (`docker`, `ecr`, `gcr`, `gar`, `acr`, `har`, `repository`) match `\u002Fcreate-sbom` — see\n`skills\u002Fcreate-sbom\u002Freferences\u002Fsbom-orchestration-step.md` for provider-specific `source.spec` fields.\n\nFull UI mapping: `references\u002Fsbom-enforcement-step.md`.\n\n#### Insert step into pipeline YAML\n\n- Insert at Phase 3 placement — **after** `generate_sbom` \u002F `SscaOrchestration` when possible.\n- Do not modify unrelated steps, variables, or failure strategies.\n- Step identifier: `enforce_sbom` (rename if duplicate).\n- **CI:** same `spec.execution.steps` list as orchestration.\n- **CD:** inside the containerized step group only.\n\n#### Update pipeline via MCP\n\n```\nharness_update\n  resource_type: pipeline\n  resource_id: \u003Cpipeline_identifier>\n  org_id: \u003Corganization>\n  project_id: \u003Cproject>\n  body: { yamlPipeline: \"\u003Cupdated pipeline YAML>\" }\n```\n\nOn validation errors, read the API message, fix fields (often `verifyAttestation` shape or `policy.policySets`), retry.\n\n#### Provide summary\n\nReport the results to the user (same pattern as `\u002Fconfigure-repo-scan` — do **not** execute the pipeline):\n\n```\n## SBOM Policy Enforcement Configured\n\n**Pipeline:** \u003Cpipeline_name>\n**Step:** SBOM Policy Enforcement (SscaEnforcement | CdSscaEnforcement)\n**Location:** Stage \"\u003Cstage_name>\", \u003Cposition>\n**Source:** \u003Ctype> — \u003Cconnector\u002Fregistry> — \u003Cimage or repo>\n**Verify attestation:** Keyless (Harness OIDC) — or as configured\n**Policy sets:** \u003Clist>\n\n**Pipeline URL:** https:\u002F\u002Fapp.harness.io\u002Fng\u002Faccount\u002F\u003Caccount_id>\u002Fmodule\u002Fci\u002Forgs\u002F\u003Corg_id>\u002Fprojects\u002F\u003Cproject_id>\u002Fpipelines\u002F\u003Cpipeline_id>\u002Fpipeline-studio\u002F\n\n**Note:** Review the SBOM Policy Enforcement step in Pipeline Studio to adjust Advanced settings.\n\n### Next Steps\n1. Run the pipeline via `\u002Frun-pipeline` to verify enforcement executes successfully\n2. If the run fails, diagnose with `\u002Fdebug-pipeline`\n3. View policy evaluation on the execution **Supply Chain** tab and Artifacts → **Policy Violations**\n4. If **Failed** due to policy deny, tune policies via `\u002Fcreate-policy` (entity-sbom.md)\n5. Add or adjust SBOM generation with `\u002Fcreate-sbom` if SBOM was missing\n6. Automate with `\u002Fcreate-trigger`\n```\n\n**CD pipelines:** note in the summary if runtime inputs (service artifact, environment, infrastructure)\nwill be required at run time — the user provides those via `\u002Frun-pipeline` or Harness UI Run.\n\n---\n\n## Examples\n\n### Enforce after existing SBOM step\n\n```\n\u002Fenforce-sbom\nAdd SBOM policy enforcement to backend-api pipeline after Generate SBOM — keyless verify, policy set sbom_prod_rules\n```\n\n### CD pipeline before deploy\n\n```\n\u002Fenforce-sbom\nEnforce SBOM policies in deploy stage before K8s rolling deploy for myapp:v7\n```\n\n### Defaults\n\n```\n\u002Fenforce-sbom\nUse defaults — same image as SBOM orchestration step, Harness OIDC verify\n```\n\n---\n\n## Performance Notes\n\n- Only **existing pipelines** — do not offer to create new pipelines (you may **append** a Deploy stage to an existing pipeline).\n- **Wizard UX is mandatory** — one question per turn; see `references\u002Finteractive-wizard-flow.md`.\n- **CI-only + CD enforcement:** allowed — Phase 3b adds Deploy stage + containerized group; do not redirect to CI unless the user chooses CI placement.\n- Reuse `SscaOrchestration` `source` + image when present — avoids drift from generation step.\n- List `policy_set` via MCP before Phase 9 — do not invent policy set identifiers.\n- Enforcement **after** SBOM exists; orchestration and enforcement run **sequentially**.\n- CD: `CdSscaEnforcement` only in **containerized** step groups.\n- **Do not execute pipelines** in this skill — use `\u002Frun-pipeline` after configuration (same as `\u002Fconfigure-repo-scan`).\n- Pair with `\u002Fcreate-sbom` (generate) and `\u002Fcreate-policy` (OPA rules).\n\n---\n\n## Troubleshooting\n\n### No SBOM \u002F Orchestration Step in Pipeline\n- Add `\u002Fcreate-sbom` first, or ingest SBOM per Harness docs.\n- Enforcement evaluates components from an existing SBOM for the artifact.\n\n### No Policy Sets Found\n- `harness_list(resource_type=\"policy_set\")` at project\u002Forg\u002Faccount scope.\n- Create SBOM policies (`package sbom`) and a policy set with **onstep** via `\u002Fcreate-policy`.\n\n### Policy Evaluation Failed (Deny)\n- Review deny\u002Fallow lists in policy Rego (`skills\u002Fcreate-policy\u002Freferences\u002Fentity-sbom.md`).\n- Check execution **Supply Chain** → policy violations for component UUIDs.\n\n### Attestation Verification Failed\n- Verification method must match **SBOM Orchestration** attestation (keyless vs key-based).\n- Keyless non-harness: configure OIDC connector for keyless signing (SCS → Manage → Configuration).\n- Key-based: public key file secret must match the key pair used when SBOM was attested.\n\n### Wrong Image \u002F No SBOM for Artifact\n- Use the same `source.spec.image` as `SscaOrchestration`.\n- Symptom: policy passes but wrong artifact — image mismatch.\n\n### CD Step Validation Errors\n- `CdSscaEnforcement` requires `spec.infrastructure` and containerized execution.\n- Place inside `stepGroup` with `stepGroupInfra` — not top-level `execution.steps` on a Deployment stage.\n- See `skills\u002Fcreate-sbom\u002Freferences\u002Fcd-containerized-step-group.md`.\n\n### User Chose CD on CI-Only Pipeline\n- Expected — run Phase 3b; do not re-ask Placement with only CI options unless the user changes direction.\n- SBOM must still exist (from CI `SscaOrchestration` or ingestion); enforcement in CD uses the same artifact image\u002Fexpression.\n\n### Pipeline Update Validation Errors\n- `DUPLICATE_IDENTIFIER` — rename `enforce_sbom`.\n- Invalid `policy.policySets` — use policy set **identifiers**, not display names.\n- `verifyAttestation` shape — align with upstream attestation; see reference doc.\n\n### MCP Errors\n- `CONNECTOR_NOT_FOUND` — verify connector in Project Settings.\n- `ACCESS_DENIED` — PAT needs pipeline edit and policy read permissions.\n\n### Pipeline Run Failed\n- Use `\u002Frun-pipeline` to execute and `\u002Fdebug-pipeline` to diagnose failures\n- Missing runtime inputs: provide branch\u002Ftag or deploy inputs via `\u002Frun-pipeline` or Harness UI Run\n- Policy deny fails the step — expected when components violate rules; report violations clearly\n","# Enforce SBOM\n\nAdd an **SBOM Policy Enforcement** (`SscaEnforcement` \u002F `CdSscaEnforcement`) step to an existing\nHarness pipeline. The step verifies SBOM attestations (when enabled) and evaluates SBOM OPA policy\nsets against the artifact's bill of materials.\n\nThis skill only works with **existing pipelines** — do not create standalone enforcement-only pipelines.\n\n**Prerequisites:** An SBOM must already exist for the artifact (typically from `SscaOrchestration` via\n`\u002Fcreate-sbom` or SBOM ingestion). SBOM **policy sets** must exist (`\u002Fcreate-policy`).\n\n**Supported stages:** CI, CD (`Deployment`), and Security — same as SBOM Orchestration. CD requires a\n**containerized step group** with container-based execution.\n\nGuide the user through a **step-by-step interactive wizard** (same UX as `\u002Fcreate-sbom`):\n\n- Wizard: `references\u002Finteractive-wizard-flow.md`\n- UI ↔ YAML: `references\u002Fsbom-enforcement-step.md`\n- CD containerized step groups (new or existing Deploy stage): `skills\u002Fcreate-sbom\u002Freferences\u002Fcd-containerized-step-group.md`\n\n---\n\n## Interaction model (mandatory)\n\n1. **One question per turn** — use `AskQuestion` when available; otherwise numbered options with `(Recommended)`.\n2. **Opening message** — add SBOM Policy Enforcement to an existing pipeline; mention SBOM + policy set prerequisites.\n3. **Progress breadcrumb** — after pipeline fetch:\n   `Pipeline · Placement · Source · Details · Verify · Policy · Submit`\n4. **Record answers** — running summary; do not re-ask unless the user changes direction.\n5. **Fetch before configure** — `harness_get` before placement\u002Fsource questions.\n6. **Show pipeline structure** — list stages\u002Fsteps; highlight `SscaOrchestration` and connectors.\n7. **Infer source from orchestration** — when one SBOM generation step exists, reuse its `source` and image.\n8. **Never guess image tags** — default to orchestration step image; ask if ambiguous.\n9. **Confirm before write** — summary + `harness_update` only after user confirms.\n10. **Stop after update** — after successful `harness_update`, provide a configuration summary and\n    point the user to `\u002Frun-pipeline` to execute. Do **not** call `harness_execute`, poll\n    executions, or run `harness_diagnose` in this skill (same pattern as `\u002Fconfigure-repo-scan`).\n11. **CD placement without an existing Deploy stage** — if the user chooses CD enforcement (`cd_before_deploy`, `add_cd_stage`, or similar) on a CI-only pipeline, **do not** reject or force CI-only. Run **Phase 3b** to add a `Deployment` stage with a containerized step group and `CdSscaEnforcement` before deploy (same prerequisites as `\u002Fcreate-sbom`).\n12. **Never block CD on “no Deployment stage”** — warn in Phase 2, then proceed via Phase 3b when the user wants CD.\n\nFull phase prompts: `references\u002Finteractive-wizard-flow.md`.\n\n---\n\n## Instructions\n\n### Wizard phases (user-facing)\n\n| Phase | Breadcrumb | Action |\n|-------|------------|--------|\n| 0 | Pipeline | AskQuestion: pipeline URL ready? |\n| 1 | Pipeline | Collect URL or org\u002Fproject\u002Fid → `harness_get` |\n| 2 | Pipeline | Display structure; note missing `SscaOrchestration` |\n| 3 | Placement | AskQuestion: after SBOM step, CD before deploy, add CD stage, etc. |\n| 3b | Placement (CD only) | If no `Deployment` stage: service, environment, infra, `stepGroupInfra` — then add stage + `CdSscaEnforcement` |\n| 4 | Source | AskQuestion: infer from pipeline or pick tile |\n| 5 | Source | AskQuestion: registry provider (Third-Party only) |\n| 6 | Details | Connector (skip if obvious) |\n| 7 | Details | Image \u002F repo (free text; default from orchestration) |\n| 8 | Verify | AskQuestion: verify attestation method |\n| 9 | Policy | AskQuestion: policy set(s) — `harness_list` `policy_set` |\n| 10 | Submit | AskQuestion: confirm pipeline update |\n\nAfter Phase 10 `confirm` → insert step, `harness_update`, then provide summary (do not run the pipeline).\n\n### Supported stage types\n\n| Stage type (YAML) | Step `type` | Placement notes |\n|-------------------|-------------|-----------------|\n| `CI` | `SscaEnforcement` | **After** `SscaOrchestration` in the same stage |\n| `Deployment` | `CdSscaEnforcement` | Containerized step group; **before** deploy |\n| `Security` | `SscaEnforcement` | After SBOM generation when artifact is known |\n\n### CD edge case (mandatory workflow)\n\nUse when Placement targets **CD** (`cd_before_deploy`, `add_cd_stage`, or an existing `Deployment` stage).\n\n#### Phase 2 — CI-only pipeline\n\nIf there is **no** `type: Deployment` stage, note it in the structure table and add:\n\n> This pipeline has no CD Deploy stage yet. You can still enforce SBOM in CD — we will add a **Deployment** stage with a **containerized step group** and place **SBOM Policy Enforcement** before the deploy step.\n\n**Do not** tell the user CD is invalid for this pipeline. If they chose CD in Phase 3, continue to Phase 3b.\n\n#### Phase 3b — CD prerequisites (no Deploy stage yet)\n\nMirror `\u002Fcreate-sbom` Phase 3b — **one topic per turn**:\n\n| Step | Action |\n|------|--------|\n| Service | `harness_list` (`service`) → `serviceRef` |\n| Environment | `harness_list` (`environment`) → `environmentRef` |\n| Infrastructure | `harness_list` (`infrastructure`, `params: { environment_id }`); create if missing per `\u002Fcreate-infrastructure` |\n| Step group infra | K8s connector + namespace for `stepGroupInfra` |\n| Deploy step | Default `K8sRollingDeploy` for Kubernetes services |\n| CI enforcement | Optional: keep CI `SscaEnforcement` **and** add CD `enforce_sbom_cd`, or CD-only — confirm in Phase 10 |\n\nAppend a Deploy stage with containerized group containing `CdSscaEnforcement` **before** `K8sRollingDeploy`. Full YAML patterns: `skills\u002Fcreate-sbom\u002Freferences\u002Fcd-containerized-step-group.md` (use `CdSscaEnforcement` instead of `SscaOrchestration`).\n\n**CD image \u002F source:** prefer `\u003C+artifact.image>` from the service primary artifact; reuse connector from CI `SscaOrchestration` or service artifact source. **Verify attestation** must match the CI generation step (e.g. keyless Harness OIDC).\n\n**Step id:** use `enforce_sbom_cd` when CI already has `enforce_sbom`.\n\n### After the wizard — backend steps\n\n#### Check prerequisites\n\n1. **SBOM generation** — pipeline YAML contains `SscaOrchestration` (or user confirms SBOM was ingested).\n2. **Policy sets** — `harness_list(resource_type=\"policy_set\", org_id, project_id)`. If empty, direct user to `\u002Fcreate-policy` (SBOM entity, `onstep` event) before continuing.\n\n#### Extract context from pipeline YAML\n\nFrom `SscaOrchestration` (if present), copy:\n\n- `spec.source` (type + spec)\n- `spec.attestation` (use matching `verifyAttestation` when user chooses verify)\n- `connector` \u002F `image` \u002F `registry`\n\nFrom build\u002Fpush steps: `connectorRef` in `BuildAndPushDockerRegistry`, `Run`, `Plugin`.\n\n#### Generate SBOM enforcement step YAML\n\nUse **only wizard answers**. Default: verify SBOM + keyless Harness OIDC + policy sets from Phase 9.\n\n**CI \u002F Security — `SscaEnforcement` (Third-Party Docker):**\n\n```yaml\n- step:\n    identifier: enforce_sbom\n    name: SBOM Policy Enforcement\n    type: SscaEnforcement\n    spec:\n      source:\n        type: docker\n        spec:\n          connector: \u003Cdocker_registry_connector>\n          image: \u003Corg>\u002F\u003Crepo>:\u003Ctag>\n      verifyAttestation:\n        type: cosign\n        spec:\n          type: keyless\n          spec:\n            oidcProvider: harness\n      policy:\n        policySets:\n          - \u003Csbom_policy_set_identifier>\n    timeout: 15m\n```\n\n**Policy sets only** (UI Policy Configuration):\n\n```yaml\n      policy:\n        policySets:\n          - sbom_license_allowlist\n          - sbom_deny_critical\n```\n\n**No verification** (when user unchecks Verify SBOM):\n\n```yaml\n      policy:\n        policySets:\n          - \u003Csbom_policy_set_identifier>\n```\n\nOmit `verifyAttestation`.\n\n**Repository source** — add `overrideConnectorRef` on `spec` (see reference doc).\n\n**CD `Deployment`** — use `CdSscaEnforcement` inside a containerized `stepGroup` (`stepGroupInfra`);\ninclude `spec.infrastructure` matching that group (see `references\u002Fsbom-enforcement-step.md` and\n`skills\u002Fcreate-sbom\u002Freferences\u002Fcd-containerized-step-group.md`). When adding a new Deploy stage, place\nenforcement in `stepGroup.steps` **before** the deploy step — not at top-level `execution.steps`.\n\nSource types (`docker`, `ecr`, `gcr`, `gar`, `acr`, `har`, `repository`) match `\u002Fcreate-sbom` — see\n`skills\u002Fcreate-sbom\u002Freferences\u002Fsbom-orchestration-step.md` for provider-specific `source.spec` fields.\n\nFull UI mapping: `references\u002Fsbom-enforcement-step.md`.\n\n#### Insert step into pipeline YAML\n\n- Insert at Phase 3 placement — **after** `generate_sbom` \u002F `SscaOrchestration` when possible.\n- Do not modify unrelated steps, variables, or failure strategies.\n- Step identifier: `enforce_sbom` (rename if duplicate).\n- **CI:** same `spec.execution.steps` list as orchestration.\n- **CD:** inside the containerized step group only.\n\n#### Update pipeline via MCP\n\n```\nharness_update\n  resource_type: pipeline\n  resource_id: \u003Cpipeline_identifier>\n  org_id: \u003Corganization>\n  project_id: \u003Cproject>\n  body: { yamlPipeline: \"\u003Cupdated pipeline YAML>\" }\n```\n\nOn validation errors, read the API message, fix fields (often `verifyAttestation` shape or `policy.policySets`), retry.\n\n#### Provide summary\n\nReport the results to the user (same pattern as `\u002Fconfigure-repo-scan` — do **not** execute the pipeline):\n\n```\n## SBOM Policy Enforcement Configured\n\n**Pipeline:** \u003Cpipeline_name>\n**Step:** SBOM Policy Enforcement (SscaEnforcement | CdSscaEnforcement)\n**Location:** Stage \"\u003Cstage_name>\", \u003Cposition>\n**Source:** \u003Ctype> — \u003Cconnector\u002Fregistry> — \u003Cimage or repo>\n**Verify attestation:** Keyless (Harness OIDC) — or as configured\n**Policy sets:** \u003Clist>\n\n**Pipeline URL:** https:\u002F\u002Fapp.harness.io\u002Fng\u002Faccount\u002F\u003Caccount_id>\u002Fmodule\u002Fci\u002Forgs\u002F\u003Corg_id>\u002Fprojects\u002F\u003Cproject_id>\u002Fpipelines\u002F\u003Cpipeline_id>\u002Fpipeline-studio\u002F\n\n**Note:** Review the SBOM Policy Enforcement step in Pipeline Studio to adjust Advanced settings.\n\n### Next Steps\n1. Run the pipeline via `\u002Frun-pipeline` to verify enforcement executes successfully\n2. If the run fails, diagnose with `\u002Fdebug-pipeline`\n3. View policy evaluation on the execution **Supply Chain** tab and Artifacts → **Policy Violations**\n4. If **Failed** due to policy deny, tune policies via `\u002Fcreate-policy` (entity-sbom.md)\n5. Add or adjust SBOM generation with `\u002Fcreate-sbom` if SBOM was missing\n6. Automate with `\u002Fcreate-trigger`\n```\n\n**CD pipelines:** note in the summary if runtime inputs (service artifact, environment, infrastructure)\nwill be required at run time — the user provides those via `\u002Frun-pipeline` or Harness UI Run.\n\n---\n\n## Examples\n\n### Enforce after existing SBOM step\n\n```\n\u002Fenforce-sbom\nAdd SBOM policy enforcement to backend-api pipeline after Generate SBOM — keyless verify, policy set sbom_prod_rules\n```\n\n### CD pipeline before deploy\n\n```\n\u002Fenforce-sbom\nEnforce SBOM policies in deploy stage before K8s rolling deploy for myapp:v7\n```\n\n### Defaults\n\n```\n\u002Fenforce-sbom\nUse defaults — same image as SBOM orchestration step, Harness OIDC verify\n```\n\n---\n\n## Performance Notes\n\n- Only **existing pipelines** — do not offer to create new pipelines (you may **append** a Deploy stage to an existing pipeline).\n- **Wizard UX is mandatory** — one question per turn; see `references\u002Finteractive-wizard-flow.md`.\n- **CI-only + CD enforcement:** allowed — Phase 3b adds Deploy stage + containerized group; do not redirect to CI unless the user chooses CI placement.\n- Reuse `SscaOrchestration` `source` + image when present — avoids drift from generation step.\n- List `policy_set` via MCP before Phase 9 — do not invent policy set identifiers.\n- Enforcement **after** SBOM exists; orchestration and enforcement run **sequentially**.\n- CD: `CdSscaEnforcement` only in **containerized** step groups.\n- **Do not execute pipelines** in this skill — use `\u002Frun-pipeline` after configuration (same as `\u002Fconfigure-repo-scan`).\n- Pair with `\u002Fcreate-sbom` (generate) and `\u002Fcreate-policy` (OPA rules).\n\n---\n\n## Troubleshooting\n\n### No SBOM \u002F Orchestration Step in Pipeline\n- Add `\u002Fcreate-sbom` first, or ingest SBOM per Harness docs.\n- Enforcement evaluates components from an existing SBOM for the artifact.\n\n### No Policy Sets Found\n- `harness_list(resource_type=\"policy_set\")` at project\u002Forg\u002Faccount scope.\n- Create SBOM policies (`package sbom`) and a policy set with **onstep** via `\u002Fcreate-policy`.\n\n### Policy Evaluation Failed (Deny)\n- Review deny\u002Fallow lists in policy Rego (`skills\u002Fcreate-policy\u002Freferences\u002Fentity-sbom.md`).\n- Check execution **Supply Chain** → policy violations for component UUIDs.\n\n### Attestation Verification Failed\n- Verification method must match **SBOM Orchestration** attestation (keyless vs key-based).\n- Keyless non-harness: configure OIDC connector for keyless signing (SCS → Manage → Configuration).\n- Key-based: public key file secret must match the key pair used when SBOM was attested.\n\n### Wrong Image \u002F No SBOM for Artifact\n- Use the same `source.spec.image` as `SscaOrchestration`.\n- Symptom: policy passes but wrong artifact — image mismatch.\n\n### CD Step Validation Errors\n- `CdSscaEnforcement` requires `spec.infrastructure` and containerized execution.\n- Place inside `stepGroup` with `stepGroupInfra` — not top-level `execution.steps` on a Deployment stage.\n- See `skills\u002Fcreate-sbom\u002Freferences\u002Fcd-containerized-step-group.md`.\n\n### User Chose CD on CI-Only Pipeline\n- Expected — run Phase 3b; do not re-ask Placement with only CI options unless the user changes direction.\n- SBOM must still exist (from CI `SscaOrchestration` or ingestion); enforcement in CD uses the same artifact image\u002Fexpression.\n\n### Pipeline Update Validation Errors\n- `DUPLICATE_IDENTIFIER` — rename `enforce_sbom`.\n- Invalid `policy.policySets` — use policy set **identifiers**, not display names.\n- `verifyAttestation` shape — align with upstream attestation; see reference doc.\n\n### MCP Errors\n- `CONNECTOR_NOT_FOUND` — verify connector in Project Settings.\n- `ACCESS_DENIED` — PAT needs pipeline edit and policy read permissions.\n\n### Pipeline Run Failed\n- Use `\u002Frun-pipeline` to execute and `\u002Fdebug-pipeline` to diagnose failures\n- Missing runtime inputs: provide branch\u002Ftag or deploy inputs via `\u002Frun-pipeline` or Harness UI Run\n- Policy deny fails the step — expected when components violate rules; report violations clearly\n",{"name":5,"license":14,"metadata":23,"description":7,"compatibility":27},{"author":24,"version":25,"mcp-server":26},"Harness","1.0.0","harness-mcp-v2","Requires Harness MCP v2 server (harness-mcp-v2)","main","f3af6b6781621109871cca9e2989364afc509f3d","harnesses\u002Fharness-skills\u002Fskills\u002Fenforce-sbom","https:\u002F\u002Fgithub.com\u002FAdmiralGallade\u002Fharness-repository","https:\u002F\u002Fgithub.com\u002FAdmiralGallade","Eager to learn!\r\nI'll do anything for more knowledge anywhere.","2026-06-06 07:34:31",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add AdmiralGallade\u002Fharness-repository --skill enforce-sbom",{"tool":41,"command":42},"bunx","bunx skills add AdmiralGallade\u002Fharness-repository --skill enforce-sbom",{"tool":44,"command":45},"pnpm","pnpm dlx skills add AdmiralGallade\u002Fharness-repository --skill enforce-sbom","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FAdmiralGallade\u002Fharness-repository\u002Fblob\u002Fmain\u002Fharnesses\u002Fharness-skills\u002Fskills\u002Fenforce-sbom\u002FSKILL.md",true,[49,55],{"path":50,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":53,"sourceHtmlUrl":54},"references\u002Finteractive-wizard-flow.md","REFERENCE","参考文档",8264,"https:\u002F\u002Fgithub.com\u002FAdmiralGallade\u002Fharness-repository\u002Fblob\u002Fmain\u002Fharnesses\u002Fharness-skills\u002Fskills\u002Fenforce-sbom\u002Freferences\u002Finteractive-wizard-flow.md",{"path":56,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":57,"sourceHtmlUrl":58},"references\u002Fsbom-enforcement-step.md",9086,"https:\u002F\u002Fgithub.com\u002FAdmiralGallade\u002Fharness-repository\u002Fblob\u002Fmain\u002Fharnesses\u002Fharness-skills\u002Fskills\u002Fenforce-sbom\u002Freferences\u002Fsbom-enforcement-step.md",[60,67,74,81,88,95],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":18},"01M75JSM6WGJ71BTHM6VC8CJ1X","verify-sign","Add an Artifact Verification (SscaArtifactVerification) step to an existing Harness pipeline to verify Cosign signatures on container or local-stage artifacts. Supports CI, Security, and CD Deploy (containerized step group). Supports Third-Party registries (Docker, ECR, GCR, GAR, ACR), Harness Artifact Registry (HAR), and Harness Local Stage artifacts. Only works with existing pipelines. Use when asked to verify signed artifacts, verify artifact signature, verify-sign, validate Cosign signature, or configure SscaArtifactVerification. Trigger phrases: verify sign, verify artifact, artifact verification, verify signature, verify-sign, SscaArtifactVerification, verify signed image, verify Cosign, HAR verification.","https:\u002F\u002Fgithub.com\u002FAdmiralGallade\u002Fharness-repository\u002Fblob\u002Fmain\u002Fharnesses\u002Fharness-skills\u002Fskills\u002Fverify-sign\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":18},"01M75JSDSTP77TFM3JFGBB8QKP","template-usage","Track Harness template dependencies, usage, and adoption via MCP v2 tools. Find which pipelines or other templates reference a given template, analyze update impact, identify unused templates, and compare version adoption. Use when asked about template usage, template references, template dependencies, impact analysis before updating a template, finding unused templates, or tracking template adoption across projects. Trigger phrases: template usage, who uses template, template references, template dependencies, template impact, unused templates, template adoption. Do NOT use for creating or updating templates (use create-template instead).","https:\u002F\u002Fgithub.com\u002FAdmiralGallade\u002Fharness-repository\u002Fblob\u002Fmain\u002Fharnesses\u002Fharness-skills\u002Fskills\u002Ftemplate-usage\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":18},"01M75JS76Q2KC8PD598H2DZZRA","sign-artifact","Add an Artifact Signing (SscaArtifactSigning) step to an existing Harness pipeline to Cosign-sign container or local-stage artifacts with keyless, key-based, or Vault signing. Supports Third-Party registries (Docker, ECR, GCR, GAR, ACR), Harness Artifact Registry (HAR), and Harness Local Stage artifacts. Place after image build\u002Fpush; optionally upload .sig to the registry. Only works with existing pipelines. Use when asked to sign artifacts, add artifact signing, Cosign sign image, attach signature to registry, or configure SscaArtifactSigning. Trigger phrases: sign artifact, artifact signing, sign image, Cosign sign, add signing step, SscaArtifactSigning, attach signature, sign container image, HAR signing.","https:\u002F\u002Fgithub.com\u002FAdmiralGallade\u002Fharness-repository\u002Fblob\u002Fmain\u002Fharnesses\u002Fharness-skills\u002Fskills\u002Fsign-artifact\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":18},"01M75JS16EEFFHA44EBNE8KWNT","sei-analytics","Advanced engineering analytics via Harness Software Engineering Insights (SEI) MCP. Configure sprint velocity and estimation accuracy tracking, engineering investment allocation breakdowns, sprint planning with capacity forecasts, and release readiness assessments. Use when asked about sprint analytics, investment allocation, sprint planning, capacity forecasting, or release readiness. Do NOT use for DORA metrics (use dora-metrics instead). Trigger phrases: sprint velocity, sprint analytics, investment allocation, capacity planning, sprint forecast, release readiness, engineering productivity, estimation accuracy, sprint planning, scope creep, code quality trends.","https:\u002F\u002Fgithub.com\u002FAdmiralGallade\u002Fharness-repository\u002Fblob\u002Fmain\u002Fharnesses\u002Fharness-skills\u002Fskills\u002Fsei-analytics\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":18},"01M75JRWE3X3E7V9JFQ4ENZYZM","security-report","Generate security compliance reports using Harness SCS and STO via MCP. Analyze vulnerabilities, SBOMs, and manage exemptions. Use when user says \"security report\", \"vulnerabilities\", \"SBOM\", \"security scan\", \"compliance check\", or asks about application security.","https:\u002F\u002Fgithub.com\u002FAdmiralGallade\u002Fharness-repository\u002Fblob\u002Fmain\u002Fharnesses\u002Fharness-skills\u002Fskills\u002Fsecurity-report\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":18},"01M75JRSFJSNZFZRFKX8MSPCS2","scorecard-review","Review service maturity scorecards and compliance using Harness IDP via MCP. Check production readiness, security, and documentation scores. Use when user says \"scorecard\", \"service maturity\", \"production readiness\", \"compliance score\", or asks about service health scores.","https:\u002F\u002Fgithub.com\u002FAdmiralGallade\u002Fharness-repository\u002Fblob\u002Fmain\u002Fharnesses\u002Fharness-skills\u002Fskills\u002Fscorecard-review\u002FSKILL.md",[],[]]