codetruss 0.2.57 - #21
Merged
Merged
Conversation
Points the formula at the v0.2.57 release archive. The digest was measured off the downloaded asset and the URL fetched independently and cmp'd against it. Carries 0.2.56 (Firebase web API keys are not committed credentials) and 0.2.57 (an error-code enum is not three leaked passwords; scope globs are bounded). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Points the formula at the
v0.2.57release archive.That digest was measured off the downloaded release asset, not copied from the release notes, and the URL written above was fetched independently with
curlandcmpd against it. The asset is byte-identical topublic/downloads/codetruss-cli-0.2.57.tgzin the monorepo, to the bytes codetruss.com serves, to the site'slatestpointer, and to the archive rebuilt independently in the mirror from its own lockfile — five copies, allcmpclean.gh attestation verify codetruss-cli-0.2.57.tgz --repo CodeTruss/codetruss-clipasses — the command was derived fromattestationCommand()inpackages/cli/scripts/release-metadata.mjsrather than retyped, and matches theattestationCommandfield the live manifest publishes. It was run with--format jsonrather than trusting a bare exit code, so the subject it actually verified (codetruss-cli-0.2.57.tgz, digest533bd51c…) and the signer identity (https://github.com/CodeTruss/codetruss-cli/.github/workflows/release.yml@refs/tags/v0.2.57, issuertoken.actions.githubusercontent.com) are on the record.The release carries all three attestations:
https://slsa.dev/provenance/v1codetruss-cli-0.2.57.tgz@533bd51c…gh attestation verify --format jsonhttps://cyclonedx.org/bomcodetruss-cli-0.2.57.tgz@533bd51c…gh attestation verify --predicate-type … --format json, CycloneDX 1.6, 5 componentshttps://in-toto.io/attestation/release/v0.2pkg:github/CodeTruss/codetruss-cli@v0.2.57, tag object0ec9954f…, plus all three release assets by digestgh2.85 exits 1 on this predicate because it is signed bydotcom.releases.github.com, not an Actions OIDC identityThat last row was confirmed rather than assumed: the certificate's SAN reads
URI:https://dotcom.releases.github.com, which is exactly why theghpath cannot verify it.The exit 0 is not vacuous. The same
cmpagainst 0.2.55 — the version this formula pointed at until now — exits 1.gh attestation verifywas checked against a tampered copy of the archive (one appended NUL), against the pre-transferDeliriumPulse/codetruss-clislug, and against an unrelated repository; all three exit 1, the attestations API returns non-zero for the tampered digest, and the release-predicate query for the 0.2.55 tag object returnspkg:github/CodeTruss/codetruss-cli@v0.2.55, not 0.2.57.Nothing else changes.
.github/workflows/test.ymlderives the expected version frombrew inforather than a literal, so it needs no edit; the version assertion in CI is what proves the installed binary matches the formula.What 0.2.57 carries
Both changes are false-positive fixes — for a tool whose output is a security verdict, the failure mode that costs the most trust.
This release supersedes 0.2.56, which was merged but never released — no tag, no GitHub release, no formula bump. That has precedent (0.2.42, 0.2.47 through 0.2.49, and 0.2.54 are all merged-but-unreleased). It is not retroactively released; its change ships inside these bytes.
0.2.56 — Firebase web API keys are no longer reported as committed credentials. A
VITE_/NEXT_PUBLIC_-prefixed key, and a Firebase config object passed straight toinitializeApp({…}), are published to every visitor by design. Reporting them was CRITICAL and HIGH noise respectively, and these were the last two CRITICAL false positives on the ten-repo benchmark corpus.0.2.57 — an error-code enum is no longer three leaked passwords. A value that merely spells out its own key (
IncorrectEmailPassword = "incorrect-email-password") carries nothing the identifier beside it did not. The exemption is now the relation between value and key rather than the shape of the value, sopassword = "correct-horse-battery-staple"is still reported. Repo-supplied scope globs are also bounded (512 chars, 16 brace groups, 1,024 expansions) before reaching the matcher, and rejected by name rather than truncated.The downgrade is deliberately narrow, and the narrowness is pinned by a fixture rather than by prose: a server-side Google API key in the same
.env, under a name the build tool does not publish, is asserted to stay CRITICAL.receipt.tswas also split intoreceipt-markdown.ts,receipt-store.tsandreceipt-verify.tsbehind a facade.dist/cli.cjsmoves 828,065 → 834,037 bytes (+5,972), 32 changed lines of 296. Receipts stay onlocal-registry-v5, and every frozen profile renderer (v1 through v5) pins an unchanged SHA-256 —packages/cli/test/verify-receipt.test.tsis byte-identical between the 0.2.55 and 0.2.57 source trees, which matters more than usual given the file split.Verified against the published archive, not a local build
Installed into a dedicated
npm --prefixand invoked by absolute path — this machine also carries a stale globalcodetruss(0.2.28, from Homebrew) that must not be allowed to answer:codetruss --version→codetruss 0.2.57(the stale global still answerscodetruss 0.2.28, so the absolute path is doing real work)dist/cli.cjsis byte-identical to the one inside the downloaded release archive, andcmps non-zero against 0.2.55's bundleREADME.mdinside the installed package readslocal-registry-v5and15-pass, matchingLOCAL_ANALYSIS_PROFILE.idin source — the 0.2.54 derivation guard holds in these bytesProfile: `local-registry-v5`andcodetruss verify latestaccepts its signature; flipping one word inside the signed receipt makes it exit 3 withMarkdown receipt does not match the signed JSON, so the acceptance is not vacuousreproduced 6 adjudicated verdicts over 4 fixturesThe acceptance check was demonstrated red in both directions before being trusted. Emptying
PUBLISHABLE_CREDENTIAL_TYPES(reverting the 0.2.56 fix) reports.env.production:6 … severity CRITICAL, expected INFOandsrc/firebase.ts:8 … severity HIGH, expected INFO; wideningPUBLISHABLE_ENV_BINDINGto match any binding trips the negative control withMAPS_SERVER_KEY … severity LOW, expected CRITICAL. So it fails if the fix is missing and if the fix is too broad. It ran green in all six upstream CI contexts that execute the test suite, and in the tag-triggered release job that produced this archive.One note, not a wart
The upstream
ci.ymlstill gates itsTeststep onmatrix.node != '20.9.0', so the acceptance script runs in six of the nine required contexts — confirmed from the job step conclusions (Test: skippedon Node 20.9.0,Test: successon Node 24), not inferred. The 0.2.55 changelog claimed "all nine"; that count is stated correctly in the 0.2.57 release PR rather than repeated.🤖 Generated with Claude Code