Skip to content

Publish SBOMs with releases, upload to DependencyTrack, upgrade locked deps - #20

Merged
fkilfoyleld merged 2 commits into
masterfrom
chore/sbom-dependencytrack
Oct 12, 2026
Merged

fkilfoyleld merged 2 commits into
masterfrom
chore/sbom-dependencytrack

Conversation

@fkilfoyleld

@fkilfoyleld fkilfoyleld commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Same pattern as labd/ecs-deplojo (#33, #34), adapted to this repo's changie release flow.

Dependencies

Release workflow

  • After uv build, install the package + locked runtime deps only (uv sync --frozen --no-default-groups --no-editable), scan with syft, and attach django-postcode-lookup.spdx.json and .cdx.json (CycloneDX 1.6) to the GitHub release.
  • New dependencytrack job uploads the CycloneDX SBOM as version <version> of oss/python/django-postcode-lookup (OSS › OSS Python), isLatest=true.
    • Uses DEPENDENCYTRACK_OSS_APIKEY (upload-only DT key, labd org secret scoped to selected repos).
    • No checkout, no repo code; only runs when the release job actually published.
    • Lives in this workflow because releases created with GITHUB_TOKEN don't trigger release events.
  • Step outputs and event data now go through env: instead of ${{ }} in run:.
  • persist-credentials: false on the test checkout.

Checks

  • Locally: ruff check passes, pytest 6 passed.
  • SBOM tested locally on Python 3.13 against this lock: 11 packages, no local paths, grype clean.
  • actionlint, pinact run --check --verify-comment, zizmor (only the trusted-publishing note).

Before the next release

  • Add this repo to the DEPENDENCYTRACK_OSS_APIKEY org secret's selected repos.
  • Create the DT library container: setup_project_hierarchy.py --client "OSS" --folder "OSS Python" --library "oss/python/django-postcode-lookup".

fkilfoyleld and others added 2 commits October 12, 2026 11:59
Clears the advisories in the locked runtime dependencies: Django
5.2.14 (fixed in 5.2.17), sqlparse 0.5.5, urllib3 2.7.0,
djangorestframework 3.17.1 and idna 3.14. Supersedes the open
Dependabot PRs #11, #16, #17, #18 and #19.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The release job builds a runtime-only SBOM (package + locked runtime
  deps) and attaches SPDX and CycloneDX files to the GitHub release.
- New dependencytrack job uploads the CycloneDX SBOM as version <tag> of
  oss/python/django-postcode-lookup, isLatest=true. It holds the DT key,
  does no checkout and runs no repo code. It lives in this workflow
  because releases made with GITHUB_TOKEN don't trigger release events.
- Pass step outputs and event data through env instead of ${{ }} in run.
- persist-credentials: false on the test checkout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fkilfoyleld
fkilfoyleld merged commit 0543a36 into master Oct 12, 2026
15 checks passed
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.

1 participant