Skip to content

Expose component-purl as GitHub Action input#191

Merged
vpetersson merged 3 commits intomasterfrom
purl
Mar 7, 2026
Merged

Expose component-purl as GitHub Action input#191
vpetersson merged 3 commits intomasterfrom
purl

Conversation

@vpetersson
Copy link
Copy Markdown
Contributor

Summary

  • Add component-purl input to action.yml mapped to COMPONENT_PURL env var, making the existing CLI flag discoverable for GitHub Action users
  • Add integration tests verifying custom PURLs survive augmentation for both SPDX (prevents VCS auto-PURL) and CycloneDX formats

Test plan

  • uv run pytest tests/test_augmentation_module.py::TestComponentPurlOverride -v — all 9 tests pass
  • uv run ruff check and uv run ruff format --check pass

🤖 Generated with Claude Code

Add `component-purl` input to action.yml mapped to COMPONENT_PURL env var,
making the existing CLI flag discoverable for GitHub Action users. Add
integration tests for both SPDX and CycloneDX verifying custom PURLs
survive augmentation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 7, 2026 16:42
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR exposes the existing component PURL override capability to GitHub Action users by adding a new component-purl action input mapped to COMPONENT_PURL, and adds integration tests to ensure custom PURLs are preserved through augmentation for both SPDX and CycloneDX SBOMs.

Changes:

  • Add component-purl as a GitHub Action input and map it to COMPONENT_PURL.
  • Add tests ensuring custom PURLs prevent VCS-derived SPDX PURLs and survive CycloneDX augmentation.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
action.yml Adds the new component-purl input and maps it into the container environment as COMPONENT_PURL.
tests/test_augmentation_module.py Adds integration tests to verify custom PURL override behavior in SPDX and CycloneDX flows.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…datetime

Use inputs['component-purl'] bracket notation in action.yml for the
hyphenated input name, and replace datetime.now() with a fixed datetime
in the test for deterministic output.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Parse SPDX/CycloneDX SBOMs back from disk after applying the PURL
override, matching the production code path. This validates the full
end-to-end flow rather than constructing in-memory objects manually.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@vpetersson vpetersson merged commit 22f7116 into master Mar 7, 2026
15 checks passed
vpetersson added a commit to sbomify/library that referenced this pull request Mar 7, 2026
- Cleanup step runs on every sync (not just after upload) so stale
  tag-versioned SBOMs get removed even when dedup skips upload
- Adds sbomify_cleanup_versioned_releases to remove empty versioned
  releases left as side effects of PRODUCT_RELEASE
- Pass COMPONENT_PURL to sbomify-action via new component-purl input
  (sbomify/sbomify-action#191) for all build and upload steps
- Docker/chainguard PURLs use digest as version; lockfile/github_release
  use tag version

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
vpetersson added a commit to sbomify/library that referenced this pull request Mar 7, 2026
- Cleanup step runs on every sync (not just after upload) so stale
  tag-versioned SBOMs get removed even when dedup skips upload
- Adds sbomify_cleanup_versioned_releases to remove empty versioned
  releases left as side effects of PRODUCT_RELEASE
- Pass COMPONENT_PURL to sbomify-action via new component-purl input
  (sbomify/sbomify-action#191) for all build and upload steps
- Docker/chainguard PURLs use digest as version; lockfile/github_release
  use tag version

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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