create-sbom
Add an SBOM (Software Bill of Materials) generation step to an existing Harness pipeline using Harness SCS SscaOrchestration (SBOM Orchestration). Supports container images and code repositories. Sources: docker, ECR, GCR, GAR, ACR, Harness AR (har), repository, and local workspace. Syft or cdxgen, SPDX or CycloneDX, optional SBOM attestation. Only works with existing pipelines. Use when asked to create an SBOM, generate a bill of materials, add SBOM to a pipeline, scan a container image or repo for components, or set up SBOM Orchestration. Trigger phrases: create SBOM, generate SBOM, add SBOM step, SBOM for image, SBOM for repo, scan for dependencies, SBOM Orchestration, add Generate SBOM step.
harness · 已有 AI 审核记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add harness/harness-skills --skill create-sbom技能说明
name: create-sbom description: >- Add an SBOM (Software Bill of Materials) generation step to an existing Harness pipeline using Harness SCS SscaOrchestration (SBOM Orchestration). Supports container images and code repositories. Sources: docker, ECR, GCR, GAR, ACR, Harness AR (har), repository, and local workspace. Syft or cdxgen, SPDX or CycloneDX, optional SBOM attestation. Only works with existing pipelines. Use when asked to create an SBOM, generate a bill of materials, add SBOM to a pipeline, scan a container image or repo for components, or set up SBOM Orchestration. Trigger phrases: create SBOM, generate SBOM, add SBOM step, SBOM for image, SBOM for repo, scan for dependencies, SBOM Orchestration, add Generate SBOM step. metadata: author: Harness version: 1.0.0 mcp-server: harness-mcp-v2 license: Apache-2.0 compatibility: Requires Harness MCP v2 server (harness-mcp-v2)
Create SBOM
Add an SBOM Orchestration (SscaOrchestration) step to an existing Harness pipeline for a
container image or code repository. This skill only works with existing pipelines — do not
create standalone SBOM pipelines.
Supported stages: SBOM Orchestration runs in CI, CD (Deployment), and Security
(Security) stages. Show stage type in Phase 2 and offer placement options that match the stage
type (see references/interactive-wizard-flow.md).
Guide the user through a step-by-step interactive wizard (same UX as /configure-repo-scan):
one decision per turn, recommended options marked, pipeline structure
shown after fetch, then confirm before harness_update.
- Wizard scripts:
references/interactive-wizard-flow.md - UI ↔ YAML mapping:
references/sbom-orchestration-step.md - CD containerized step groups:
references/cd-containerized-step-group.md
Interaction model (mandatory)
Follow this UX for every invocation. Do not dump all Pipeline Studio fields in one message.
- One question per turn — use the
AskQuestiontool when available. If unavailable, use a numbered option list with(Recommended)on the default choice (same pattern as container scan). - Opening message — briefly state the goal: add SBOM Orchestration to an existing pipeline.
- Progress breadcrumb — after pipeline fetch, show on each wizard turn:
Pipeline · Placement · Method · Source · Details · Attestation · Submit - Record answers — keep a running summary of choices; do not re-ask unless the user changes direction.
- Fetch before configure —
harness_get(URL or id) before placement/source questions. - Show pipeline structure — list stages and steps (Phase 2) before asking placement.
- Infer, don’t assume — suggest connector/source from YAML; skip connector question if unambiguous.
- Never guess image tags — always ask for image or repo+branch in Phase 8.
- Confirm before write — Phase 10 summary +
harness_updateonly after user confirms. - Stop after update — after successful
harness_update, provide a configuration summary and point the user to/run-pipelineto execute. Do not callharness_execute, poll executions, or runharness_diagnosein this skill (same pattern as/configure-repo-scan). - “Defaults” shortcut — apply recommended wizard choices (see reference) but still ask for image/repo.
- Phase 3 Placement is never optional — always run Phase 2 (structure) then Phase 3
(
AskQuestionfor stage + position) before method/source/attestation, even when:- The pipeline has only one CI stage
- An
SscaOrchestrationstep already exists in CI - The user said “add SBOM to the pipeline” without naming a stage
- A prior chat configured the same pipeline (do not reuse that to skip Placement)
- Never assume pipeline or stage from session history — confirm pipeline URL/ID in Phase 0/1 unless the user pasted it in the current message. Prior workspace context may inform suggestions, not replace the wizard.
- CD is a different placement path — if the user chooses a
Deploymentstage (or asks for CD), followreferences/cd-containerized-step-group.mdend to end (step group,<+artifact.image>, infra). Do not place CD SBOM underexecution.stepsat the stage top level. - CI-only pipeline + CD SBOM — if Phase 2 shows no
Deploymentstage and the user wants CD, run the CD prerequisites sub-flow (service, environment, infrastructure, K8s connector forstepGroupInfra) beforeharness_update. See CD edge case below.
Full phase prompts and option ids: references/interactive-wizard-flow.md.
Instructions
Wizard phases (user-facing)
Run in order. Stop after each phase until the user answers.
| Phase | Breadcrumb | Action |
|---|---|---|
| 0 | Pipeline | AskQuestion: pipeline URL ready? |
| 1 | Pipeline | Collect URL or org/project/id → harness_get |
| 2 | Pipeline | Display pipeline structure (no question) |
| 3 | Placement | Mandatory AskQuestion: target stage (CI / Deployment / Security) + position; see CD edge case if no Deploy stage |
| 3b | Placement (CD only) | If no Deployment stage: service, environment, infra, stepGroupInfra connector — then add stage + SBOM |
| 4 | Method | AskQuestion: Syft/SPDX, CycloneDX, cdxgen, or ingestion |
| 5 | Source | AskQuestion: source tile (Third-Party, HAR, Repository, Local) |
| 6 | Source | AskQuestion: registry provider (Third-Party only) |
| 7 | Details | AskQuestion: connector (skip if obvious from YAML) |
| 8 | Details | Ask: image, repo URL, or local artifact (free text) |
| 9 | Attestation | AskQuestion: attest or not; keyless vs cosign |
| 10 | Submit | AskQuestion: confirm pipeline update |
After Phase 10 confirm → generate YAML, insert step, harness_update, then provide summary (do not run the pipeline).
Supported stage types
| Stage type (YAML) | Module | SBOM plac
阅读完整来源 ↗