Skip to content

ci: inline supply-chain workflows so they run on this public repo - #149

Merged
stackbilt-admin merged 3 commits into
mainfrom
ci/inline-supply-chain
Nov 9, 2026
Merged

stackbilt-admin merged 3 commits into
mainfrom
ci/inline-supply-chain

Conversation

@stackbilt-admin

@stackbilt-admin stackbilt-admin commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Summary

Fixes #137. supply-chain.yml called reusable workflows in Stackbilt-dev/stackbilt_llc, which is private with Actions access none. A public repo can't call workflows from a private one, so all 153 runs since 2026-05-20 failed before any job started.

This copies the jobs into the repo, following Stackbilt-dev/charter#362, which fixed the same problem there.

Repo setting changed: the dependency graph was off, which dependency review requires. It is now on, with Dependabot alerts (enabling alerts is what turned the graph on). Dependabot security-update PRs stay off.

Jobs

  • Generate SBOM (push to main and PRs):
    • npm ci --ignore-scripts, with the same checkout and setup-node pins as ci.yml (persist-credentials: false).
    • Installs @cyclonedx/cdxgen 12.8.5 from the committed lockfile in .github/sbom/, outside the checkout so the tool isn't scanned. Every dependency is pinned with an integrity hash. undici is overridden to 7.30.2, since cdxgen pins 7.28.0 and undici through 7.30.0 has several high advisories (GHSA-2m5v-pch6-74hx and others). fast-uri is refreshed to 3.1.9. body-parser, an optional cdxgen dependency that npm ci --omit=optional never installs but dependency review still checks, is overridden from 2.3.0 to 2.4.0 (GHSA-27r3-jxmh-p828, high). Apart from that override, the files match charter's after fix(supply-chain): override the SBOM tool's undici to 7.30.2 charter#425. npm audit on the full tool lockfile, optional dependencies included: 0 high, 5 moderate (glob, minimatch and @npmcli/*, which cdxgen pins exactly).
    • Generates a CycloneDX SBOM from package-lock.json, then checks it:
      • CycloneDX format, root component @stackbilt/llm-providers, at least 100 components;
      • typescript, vitest, esbuild and @cloudflare/workers-types present;
      • no package that only the generator's own lockfile contains (so a broken exclusion fails the job).
    • Hashes the SBOM and uploads it as an artifact (90 days).
  • Dependency Review (PRs only): actions/dependency-review-action v5.0.0, fail-on-severity: high, with a read-only token and no checkout, so it also runs on fork PRs once their CI run is approved.
  • Job timeouts and a per-ref concurrency group.

Dependabot

New .github/dependabot.yml: weekly updates for the SBOM tool (grouped) and for the pinned GitHub Actions. Dependabot doesn't update the undici override; a comment says to review it by hand when cdxgen is bumped. The package's own dev dependencies aren't included.

Dropped

  • The CodeBeast SBOM receipt step. It needs SBOM_INGEST_SECRET, which a public repo shouldn't rely on (and fork PRs never get).
  • pull-requests: write and secrets: inherit, which nothing here needs.

Validation

  • Locally, the pinned cdxgen generated an SBOM for this repo with 156 components and root @stackbilt/llm-providers 1.27.0. The verify step passes on it, and fails when a generator-only package (cheerio) is added.
  • Both jobs pass on this PR. Dependency review's first real run caught the body-parser advisory above.

Not in this PR

  • Attaching or attesting the SBOM on releases (it is only a 90-day artifact).

Still to check for #137 after merge

  • The SBOM job passes on the push to main.
  • Dependency review reports a result on a fork PR after approval.

🤖 Generated with Claude Code

The workflow called reusable workflows in the private stackbilt_llc repo,
which a public repo can't use, so every run failed before any job started.
Port the jobs here, following Stackbilt-dev/charter#362:
- SBOM: CycloneDX via @cyclonedx/cdxgen installed from a committed lockfile
  in .github/sbom/, a sanity check on the result, hash and artifact upload.
- Dependency review on pull requests, failing on high severity, with a
  read-only token.
The CodeBeast receipt step is dropped: it needs a secret this public repo
shouldn't rely on.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- SBOM tool: override undici to 7.30.2 and refresh fast-uri to 3.1.9
  (files match Stackbilt-dev/charter after #425); the old 7.29.1 override
  was still affected by GHSA-2m5v-pch6-74hx and other high advisories.
- Verify step: fail if any package that only the generator's lockfile
  contains appears in the SBOM, not just the generator itself.
- Dependabot for the SBOM tool and the pinned actions.
- persist-credentials: false, job timeouts, a concurrency group and exact
  version comments on the pins; drop the checkout dependency review
  doesn't need.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@stackbilt-admin stackbilt-admin changed the title ci: inline supply-chain workflows so they run on this public repo (#137) ci: inline supply-chain workflows so they run on this public repo Nov 9, 2026
Dependency review flagged body-parser 2.3.0 (GHSA-27r3-jxmh-p828, high) in
.github/sbom/package-lock.json. cdxgen 12.8.5 pins it as an optional
dependency, so npm ci --omit=optional never installs it, but dependency
review checks the whole lockfile.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
stackbilt-admin pushed a commit to Stackbilt-dev/charter that referenced this pull request Nov 9, 2026
….4.0

cdxgen 12.8.5 pins body-parser 2.3.0 (GHSA-27r3-jxmh-p828, high). It is an
optional dependency that `npm ci --omit=optional` skips, but dependency review
checks the whole lockfile, so a PR that touches it would fail. Matches
Stackbilt-dev/llm-providers#149.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@stackbilt-admin
stackbilt-admin merged commit 943fc64 into main Nov 9, 2026
5 checks passed
stackbilt-admin added a commit to Stackbilt-dev/charter that referenced this pull request Nov 9, 2026
* fix(supply-chain): override the SBOM tool's undici to 7.30.2

The pinned SBOM generator's package.json overrides undici to 7.29.1, which
the workflow comment calls patched. undici 7.0.0 through 7.30.0 is affected
by GHSA-2m5v-pch6-74hx (high) among other advisories; the first fixed
release is 7.30.1. Bump the override to 7.30.2, regenerate the lockfile
(only the undici entry changes) and correct the comment.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(supply-chain): review fixes for the undici override

- dependabot.yml: the override now holds undici at 7.30.2, not 7.29.1.
- supply-chain.yml: the override covers several undici advisories, not one.
- Refresh fast-uri to 3.1.9 in the SBOM tool lockfile, clearing its
  moderate advisory.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(supply-chain): override the SBOM tool's optional body-parser to 2.4.0

cdxgen 12.8.5 pins body-parser 2.3.0 (GHSA-27r3-jxmh-p828, high). It is an
optional dependency that `npm ci --omit=optional` skips, but dependency review
checks the whole lockfile, so a PR that touches it would fail. Matches
Stackbilt-dev/llm-providers#149.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Kurt Overmier <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
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.

Supply Chain workflow never runs: reusable workflows live in a private repo

2 participants