Skip to content

feat: SBOM#81

Open
akafazov wants to merge 24 commits intomainfrom
feat/sbom
Open

feat: SBOM#81
akafazov wants to merge 24 commits intomainfrom
feat/sbom

Conversation

@akafazov
Copy link
Contributor

@akafazov akafazov commented Mar 3, 2026

SBOM

Introduce workflow changes to support new OCM structure and add Software Bill Of Materials to image components.

Changes:

  • new job .github/workflows/job-chart-ocm.yml to create chart-only OCM component
  • new job .github/workflows/job-image-ocm.yml to create image-only OCM component
  • new job job-sbom.yml to create CycloneDX and SPDX SBOM (Software Bill Of Materials) artefacts
  • modify .github/workflows/job-ocm.yml to support:
    • new chartOnly mode to build OCM component for a chart
    • keep existing monolithic mode to build component with chart and image (backward compatability during migration)
  • modified .github/workflows/pipeline-golang-app.yml and .github/workflows/pipeline-node-app.yml to build new OCM components for the images containing SBOM
  • sings OCM components before transfering them ot github OCI repository

Note

Needs OCM_SIGNING_PRIVATE_KEY env variable containing the private key to sign with.
Key pair can be generated with: ocm create rsakeypair acme.priv

refers to #82

akafazov added 8 commits March 9, 2026 14:07
On-behalf-of: @SAP angel.kafazov@sap.com
Signed-off-by: Angel Kafazov <akafazov@cst-bg.net>
On-behalf-of: @SAP angel.kafazov@sap.com
Signed-off-by: Angel Kafazov <akafazov@cst-bg.net>
On-behalf-of: @SAP angel.kafazov@sap.com
Signed-off-by: Angel Kafazov <akafazov@cst-bg.net>
… integration

On-behalf-of: @SAP angel.kafazov@sap.com
Signed-off-by: Angel Kafazov <akafazov@cst-bg.net>
On-behalf-of: @SAP angel.kafazov@sap.com
Signed-off-by: Angel Kafazov <akafazov@cst-bg.net>
…ioning

On-behalf-of: @SAP angel.kafazov@sap.com
Signed-off-by: Angel Kafazov <akafazov@cst-bg.net>
…upport

On-behalf-of: @SAP angel.kafazov@sap.com
Signed-off-by: Angel Kafazov <akafazov@cst-bg.net>
…handling

On-behalf-of: @SAP angel.kafazov@sap.com
Signed-off-by: Angel Kafazov <akafazov@cst-bg.net>
akafazov and others added 9 commits March 9, 2026 14:16
…able

On-behalf-of: @SAP angel.kafazov@sap.com
Signed-off-by: Angel Kafazov <akafazov@cst-bg.net>
…le and componentName inputs

On-behalf-of: @SAP angel.kafazov@sap.com
Signed-off-by: Angel Kafazov <akafazov@cst-bg.net>
…in permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…in permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…in permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
On-behalf-of: @SAP angel.kafazov@sap.com
Signed-off-by: Angel Kafazov <akafazov@cst-bg.net>
On-behalf-of: @SAP angel.kafazov@sap.com
Signed-off-by: Angel Kafazov <akafazov@cst-bg.net>
On-behalf-of: @SAP angel.kafazov@sap.com
Signed-off-by: Angel Kafazov <akafazov@cst-bg.net>
On-behalf-of: @SAP angel.kafazov@sap.com
Signed-off-by: Angel Kafazov <akafazov@cst-bg.net>
@akafazov akafazov changed the title Feat/sbom feat(SBOM) Mar 9, 2026
@akafazov akafazov changed the title feat(SBOM) feat: SBOM Mar 9, 2026
akafazov added 5 commits March 9, 2026 17:13
On-behalf-of: @SAP angel.kafazov@sap.com
Signed-off-by: Angel Kafazov <akafazov@cst-bg.net>
On-behalf-of: @SAP angel.kafazov@sap.com
Signed-off-by: Angel Kafazov <akafazov@cst-bg.net>
On-behalf-of: @SAP angel.kafazov@sap.com
Signed-off-by: Angel Kafazov <akafazov@cst-bg.net>
On-behalf-of: @SAP angel.kafazov@sap.com
Signed-off-by: Angel Kafazov <akafazov@cst-bg.net>
On-behalf-of: @SAP angel.kafazov@sap.com
Signed-off-by: Angel Kafazov <akafazov@cst-bg.net>
@akafazov akafazov marked this pull request as ready for review March 9, 2026 15:29
@akafazov akafazov requested review from a team as code owners March 9, 2026 15:29
@nexus49
Copy link
Contributor

nexus49 commented Mar 10, 2026

@coderabbitai full review

@coderabbitai
Copy link

coderabbitai bot commented Mar 10, 2026

✅ Actions performed

Full review triggered.

@coderabbitai
Copy link

coderabbitai bot commented Mar 10, 2026

Walkthrough

This pull request introduces OCM (Open Component Model) integration and SBOM generation to the CI/CD pipeline. Three new reusable workflow files are added: job-chart-ocm.yml for Helm chart component creation, job-image-ocm.yml for Docker image component creation, and job-sbom.yml for generating CycloneDX and SPDX software bills of materials. Existing workflows are modified to support dual-path orchestration via new inputs chartOnly and imageComponentName, enabling either chart-only or monolithic builds. The pipeline workflows for Golang and Node.js applications are refactored to include SBOM generation and image OCM processing jobs while removing legacy dockerBuild jobs.

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/job-chart-ocm.yml:
- Around line 25-28: The workflow defines ocmRegistryUrl but the auth block that
writes the .ocmconfig is hard-coded to "ghcr.io/platform-mesh", so pushes to
custom registries fail; update the code that generates the .ocmconfig/auth
config to use the ocmRegistryUrl input variable instead of the literal
"ghcr.io/platform-mesh" (also update any repeated blocks that handle auth
generation around the other related auth sections), ensuring the registry host
used in authentication entries and credential lookups is derived from
ocmRegistryUrl (reference the ocmRegistryUrl input and the logic that emits
.ocmconfig/auth entries).

In @.github/workflows/job-image-ocm.yml:
- Around line 21-24: The generated auth config and any .ocmconfig creation
currently hard-codes "ghcr.io/platform-mesh" instead of using the workflow input
ocmRegistryUrl, causing mismatched registry/authentication; update every place
that writes .ocmconfig or embedding the registry (including the blocks
referenced around the other occurrences) to interpolate the ocmRegistryUrl input
(use the workflow input variable name ocmRegistryUrl) instead of the literal
string, ensuring the echo/printf or template that creates .ocmconfig uses ${ {
inputs.ocmRegistryUrl } } (or the appropriate GitHub Actions variable syntax) so
auth entries match the configured registry.

In @.github/workflows/job-ocm.yml:
- Around line 18-27: The chartOnly input currently prevents populating image
metadata but does not switch the default constructor or stop passing image
variables (so workflows still use .ocm/component-constructor.yaml and image
vars); update the workflow to: when chartOnly is true set the constructor to a
chart-only constructor (e.g., .ocm/chart-only-constructor.yaml or a dedicated
constructor variable) and ensure the archive/trigger steps do not pass
image-related variables (imageComponentName, image tags, etc.) unless chartOnly
is false; apply the same conditional logic wherever the workflow sets image
metadata or the constructor (the other blocks referenced around the image inputs
and archive/trigger steps) so chartOnly is safe by default.

In @.github/workflows/pipeline-golang-app.yml:
- Around line 2-3: The workflow-level permissions only grant "contents: read",
preventing called reusable workflows (like job-image-ocm.yml) from performing
GHCR pushes; update the top-level permissions mapping to include "packages:
write" alongside "contents: read" so the called job can push images to GHCR
(modify the permissions block that currently lists permissions: and contents:
read to add packages: write).

In @.github/workflows/pipeline-node-app.yml:
- Around line 76-85: The imageOcm reusable job (uses:
./.github/workflows/job-image-ocm.yml) requires the caller to grant packages:
write so GHCR publishing works; add an explicit permissions block granting
packages: write — either at the workflow top-level or immediately under the
imageOcm job definition — e.g., add permissions: { packages: write } so the
caller workflow explicitly provides the token scope required by
job-image-ocm.yml.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: platform-mesh/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 50dbe335-ddb6-4646-9af4-0932bccaf9d9

📥 Commits

Reviewing files that changed from the base of the PR and between 233be4f and 9f4f0a7.

📒 Files selected for processing (7)
  • .github/workflows/job-chart-ocm.yml
  • .github/workflows/job-image-ocm.yml
  • .github/workflows/job-ocm.yml
  • .github/workflows/job-sbom.yml
  • .github/workflows/pipeline-chart.yml
  • .github/workflows/pipeline-golang-app.yml
  • .github/workflows/pipeline-node-app.yml

On-behalf-of: @SAP angel.kafazov@sap.com
Signed-off-by: Angel Kafazov <akafazov@cst-bg.net>
@akafazov akafazov requested a review from nexus49 March 10, 2026 08:51
On-behalf-of: @SAP angel.kafazov@sap.com
Signed-off-by: Angel Kafazov <akafazov@cst-bg.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants