8000 prettier: declare provenance so advisories can be queried at all by bryan-minimal · Pull Request #729 · gominimal/pkgs · GitHub
[go: up one dir, main page]

Skip to content

prettier: declare provenance so advisories can be queried at all - #729

Merged
bryan-minimal merged 1 commit into
mainfrom
prettier-provenance
Sep 21, 2026
Merged

bryan-minimal merged 1 commit into
mainfrom
prettier-provenance

Conversation

@bryan-minimal
Copy link
Copy Markdown
Member

The monitoring-gap alarm fired for six packages after #721/#723 landed. prettier was one: no source_provenance, no CPE, so nothing could reach it and it scanned 0/0/0 — indistinguishable from genuinely clean. Nothing is known-vulnerable here; the point is we couldn't tell either way.

Why GithubRepo and not a CPE curation

Checked against the prod vulndb rather than guessed:

lookup result
advisory_cpe, product prettier zero rows — no CPE exists
advisory_packages, pkg:npm/prettier zero rows
advisory_packages, pkg:github/prettier/prettier 1 advisory

GithubRepo provenance is what resolves to pkg:github/{owner}/{repo} (nickel.rs:183 → purl.rs:53), which is the only identity that actually holds anything.

A trap worth recording

upstream_purl is not the lever it looks like. For an npm package it's the obvious choice — and it has zero consumers in either minimal-supply-chain or pkgmgr-rs. Setting it would have looked like a fix while restoring no coverage whatsoever. I nearly did exactly that.

Version-check safety

This matters because provenance — unlike a CPE identity entry — does drive the upstream version check. prettier's upstream tags are bare semver (3.9.8, 3.9.7, 3.9.6), exactly the shape this package already pins, so there's no dev-branch or wrong-series hazard.

Sibling half

The other half is in minimal-supply-chain (cpe-identity-agentbox-six): curated CPE identities for mariadb (mariadb:mariadb, 1502 advisories — by far the largest gap), xdg-utils (freedesktop + gentoo, unioned because Gentoo filed its own CVEs for the same scripts) and typescript (microsoft:typescript).

tree and which are genuinely unreachable — no CPE, no npm purl, no generic purl, only false friends (thinkleft:submenu_tree, pixarra:tree_studio, gillesdumas:which_template_file). They're the only two of the six that legitimately belong behind --update-baseline.

Checks

parse, fmt, imports and standalone tests pass. The three build-dependent checkers (enumerate bins, output types valid, missing runtime_deps) Skip locally because the package isn't built in that session — this change adds only metadata inside attrs and touches no build input, and buildbot runs the full set here.

🤖 Generated with Claude Code

The monitoring-gap alarm fired for six packages after pkgs#721/#723.
prettier was one: it shipped with no source_provenance and no CPE, so
nothing could reach it and it scanned 0/0/0 — which is indistinguishable
from a genuinely clean result. Nothing here is known-vulnerable; the point
is that we could not tell either way.

GithubRepo rather than a CPE curation, because the evidence points that
way. Checked against the prod vulndb:

  advisory_cpe, product 'prettier'      ZERO rows (no CPE exists)
  advisory_packages, pkg:npm/prettier   ZERO rows
  advisory_packages, pkg:github/...     1 advisory

GithubRepo provenance is what resolves to pkg:github/{owner}/{repo}
(nickel.rs:183 -> purl.rs:53), which is the identity that actually holds
something.

Worth recording because it is a trap: `upstream_purl` looks like the
obvious lever for an npm package and is not one. It has ZERO consumers in
minimal-supply-chain or pkgmgr-rs, so setting it would have looked like a
fix while restoring no coverage whatsoever.

Safe for version checking, which matters because provenance — unlike a CPE
identity entry — does drive the upstream check. prettier's upstream tags
are bare semver (3.9.8, 3.9.7, 3.9.6) exactly matching the shape this
package already pins, so there is no dev-branch or wrong-series hazard.

The sibling half of this fix is in minimal-supply-chain: curated CPE
identities for mariadb (1502 advisories, by far the largest gap),
xdg-utils (freedesktop + gentoo, unioned) and typescript. tree and which
are genuinely unreachable — no CPE, no npm purl, no generic purl, only
false friends — and are the only two of the six that belong behind
--update-baseline.

parse, fmt, imports and standalone-tests pass. The three build-dependent
checkers (enumerate-bins, output-types, missing-runtime_deps) SKIP here
because the package is not built in this session; this change adds only
metadata inside `attrs` and touches no build input, and buildbot runs the
full set on the PR.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@bryan-minimal
bryan-minimal requested a review from a team as a code owner September 19, 2026 17:27
@coderabbitai
coderabbitai Bot commented Sep 19, 2026
Copy link
Copy Markdown
Contributor

Warning

Review paused — included plan limit reached

Keep your review moving with free on-demand reviews.

  • Run this review for free

On-demand reviews are free for one more day.

  • Ask an admin to make reviews automatic

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Promotion and pricing details

On-demand reviews are free for one more day. After that, they cost $0.25 per reviewed file.

Review limit details

Or wait 54 minutes for your next included review.

Check out review usage here.

Limit details: You’ve used the included review currently available. Your 64 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: gominimal/pkgs/.coderabbit.yaml

Review profile: CHILL

Plan: Essentials

Run ID: e7df02e8-862f-404b-a80d-5c07dccf56e8

📥 Commits

Reviewing files that changed from the base of the PR and between c7d567b and 51317f6.

📒 Files selected for processing (1)
  • packages/prettier/build.ncl

Comment @coderabbitai help to get the list of available commands.

@bryan-minimal
bryan-minimal added this pull request to the merge queue Sep 21, 2026
Merged via the queue into main with commit ab6a234 Sep 21, 2026
11 checks passed
@bryan-minimal
bryan-minimal deleted the prettier-provenance branch September 21, 2026 15:48
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.

2 participants

0