콘텐츠로 이동
한국어

Supply chain

이 콘텐츠는 아직 번역되지 않았습니다.

Everything on this page is about the package you install, not about code you write. It answers one question: how much of actor-ts can you check rather than trust?

ArtifactWhereWhat it proves
npm provenance attestationThe npm registry, on the published tarballWhich commit and which workflow run produced these bytes.
CycloneDX SBOMAttached to the GitHub Release as actor-ts-sbom.cyclonedx.json, from v0.17.0 onwardThe exact dependency closure that was installed when the release was built.
CHANGELOG entryCHANGELOG.mdSecurity-relevant changes get their own Security section.

Publishing runs through npm Trusted Publishing (OIDC) — the workflow exchanges a short-lived GitHub identity token for a one-shot publish token. There is no long-lived npm token stored anywhere, so there is none to leak.

The publishing job runs in the GitHub environment npm, and that environment is what decides who may publish (#704). GitHub starts the job only on a ref the environment allows — a v* tag or the main branch — and holds it until a maintainer approves the run. The Trusted Publisher on npmjs.com is registered with the same environment name, so npm refuses a publish token to any run that does not carry it. A branch pushed by an account with write access therefore cannot publish a version of its own, whether through a manual dispatch or through an edited copy of the workflow.

Terminal window
npm audit signatures

Run in a project that has actor-ts installed, this checks the registry signature and the provenance attestation for every installed package, including this one.

The SBOM is a release asset, so it does not need an install. Substitute the release you are asking about:

Terminal window
gh release download vX.Y.Z --pattern 'actor-ts-sbom.cyclonedx.json'

Every release up to and including v0.16.0 predates the jobs that produce the asset, so for those there is nothing to fetch. gh release view vX.Y.Z --json assets tells you whether a given release carries it before you try.

It is a CycloneDX 1.x JSON document, which every SCA tool reads. Its point is that you can answer “was release X affected by advisory Y” without reconstructing the closure from a lockfile you would first have to check out.

Four checks stand between a change and a release. They run on pull requests — the advisory gate only when the pull request touches src/** or a manifest or lockfile it audits, which is its path filter, so a prose-only one does not wait for it; the two that can go stale without anybody committing also run on a schedule.

.github/workflows/codeql.yml analyses the whole repository with CodeQL’s javascript-typescript pack on every pull request, on pushes to main and develop, and weekly. Findings land in the repository’s code-scanning alerts.

The query suite is security-extended. It was not always: the narrower default suite ran first, on purpose, so that the very first analysis of a codebase this size produced a triage you could finish. Once that baseline was clean the suite was widened.

The weekly run is not redundant: CodeQL ships new queries continuously, so a file that was clean when it was written can be flagged months later with nobody having touched it.

bun audit runs in .github/workflows/package-health.yml at --audit-level=high and fails the job on any new high or critical advisory. You can run exactly what CI runs — at the repository root for the shipped closure, and under docs/ for the documentation site’s:

Terminal window
bun run lint:audit

It reads a lockfile rather than a manifest, so it sees the versions that actually ship — which is the whole reason it is bun audit rather than actions/dependency-review-action. And it reads every Bun lockfile CI installs, not only the shipped one: bun.lock, docs/bun.lock and devtools-ui/bun.lock, the last of them resolved inside the job that publishes to npm. The two nested closures went unaudited until the gate was widened and carried nine high advisories between them, every one with a fix inside its declared range, while the root gate stayed green; a test now fails when a workflow installs a Bun closure the job does not audit. The DevTools UI step writes the same flags out instead of going through a script, because that manifest is hashed into the embedded UI bundle and a script line there would force a rebuild of it. The gate also runs on a weekly cron, because an advisory is published upstream against a lockfile that did not change; a push-triggered gate would not notice one until the next unrelated commit.

Nothing is suppressed. The gate landed with a baseline — eleven advisory IDs ignored so it could land green rather than land red and be ignored — and that baseline is gone: every one of them was fixed by a release inside the range package.json already declared, so refreshing bun.lock cleared them without widening anything. Any suppression added back has to be written up in SECURITY.md, and a test fails if the ignore list and that page drift apart, so the set cannot grow quietly.

Every uses: in every workflow is pinned to a full 40-character commit SHA with its release tag in a trailing comment. A tag is a mutable pointer: whoever can move actions/checkout@v7 runs arbitrary code inside the job that publishes to npm. A SHA cannot be repointed. The trailing comment is what keeps Dependabot updating the pins.

tests/unit/ci/WorkflowHygiene.test.ts asserts this on every bun test — workflow YAML is invisible to the type checker, so without it a hardening decision decays the first time somebody edits a file without knowing about it.

Every CI install is --frozen-lockfile, so a green check never means “passed against a dependency set nobody can reproduce”. Job tokens are read-only by default; a write scope sits on the single job that needs it, and no job that can write to the repository also runs third-party install scripts. The same test file asserts all three.

That last rule covers the publishing credential, not just the ones that write to the repository. id-token: write mints the OIDC token npm exchanges for a one-shot publish token, so a job holding it can ship a release — which makes it the worst scope of all to run a dependency tree beside. The release workflow therefore builds, tests and packs the tarball in a job that holds no credential, and publishes that artifact from a job that neither checks out the repository nor installs anything. The two communicate only through the packed tarball, and the version guard reads its version out of those same bytes rather than out of a second copy of the tree.

trustedDependencies: [] in the root package.json closes the other half. Bun runs a dependency’s install scripts only for packages named there, and an empty list is the honest description of this closure today — nothing in it has an install script. The point is what happens next: a dependency that acquires one shows up as a bun pm untrusted line to be looked at, instead of simply running.

SECURITY.md is the policy: the private reporting channel, the response expectation, and — the part worth reading before you file — the scope boundary. The cluster transport ships as plain TCP without peer authentication on purpose, documented alongside the cluster security recipe, so that default is not a vulnerability. A documented mitigation that does not deliver what it promises is one.