Expose component-purl as GitHub Action input#191
Conversation
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>
There was a problem hiding this comment.
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-purlas a GitHub Action input and map it toCOMPONENT_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>
There was a problem hiding this comment.
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>
There was a problem hiding this comment.
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.
- 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>
- 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>
Summary
component-purlinput toaction.ymlmapped toCOMPONENT_PURLenv var, making the existing CLI flag discoverable for GitHub Action usersTest plan
uv run pytest tests/test_augmentation_module.py::TestComponentPurlOverride -v— all 9 tests passuv run ruff checkanduv run ruff format --checkpass🤖 Generated with Claude Code