Repository navigation
Conversation
A lookup through a registry entry with `mirrorOf` and credentials can read private data, but `credentialed` only recognized sources that carry their registry's URL. A private repository's npm, PyPI and other mirrored lookups were therefore stored with their updates, and could appear once the repository became public. Count an entry's credentials through its mirror as well. Docs: correct what mirrors cover, that image SBOM reads use registry credentials, and the mirror example that only covered PyPI's simple fallback.
|
|
Overall Grade |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| Rust | Nov 3, 2026 7:11a.m. | Review ↗ | |
| JavaScript | Nov 3, 2026 7:11a.m. | Review ↗ | |
| Shell | Nov 3, 2026 7:11a.m. | Review ↗ |
Important
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
count-patchula | 9208f93 | Commit Preview URL Branch Preview URL |
Nov 03 2026, 07:12 AM |
|
Docs7 for sweepies/count-patchula
Commit |
sweepies
added a commit
that referenced
this pull request
Nov 4, 2026
…#177) * fix(server): record at request time whether a lookup sent credentials Which lookups the public repository API withholds was decided by predicting one URL per source and matching it against the operator's registries. That covered npm, PyPI, container registries, Helm, Maven and forge tags only, and only the first URL a lookup reads; crates, Go, NuGet, RubyGems, Packagist, Terraform and the rest never counted, nor did a second request a lookup made through a mirror. Now the HTTP client records, as each request is made, whether it carried an operator entry's credentials (directly or through a mirror, from the network or the cache, whose entries are kept per credential) or a registry account's token, in a task-local record. The engine runs each catalog lookup inside one, keeps the result with its saved catalogs, and writes it into the dependency's metadata as credentialed; the server withholds exactly those. The predicting credentialed() functions and the URL helpers only they used are gone. The mirrors example now mirrors the Go proxy, since PyPI is read through its JSON API first and a simple-only mirror does not replace it (from #163). * fix(server): record coalesced, digest and image reads; drop stale catalogs From review: - A read served from the HTTP client's in-flight memo records the credentials its original request carried, so two lookups of the same URL both count. - Digest, image digest and SBOM reads run inside the record too; a dependency whose package any of them read with credentials is credentialed, which covers a digest-only image rule with no catalog. - Docker counts a token as an account's only when its entry sends credentials, not for a withheld entry. - Saved catalogs move to age-catalog-v4 without a default, so none saved before the record existed is reused as uncredentialed. - A withheld dependency also loses the version its range resolved to and its resolution, which came from the lookup. * fix(server): withhold advisories and messages; keep read records apart From the second review: - A withheld dependency also loses its advisories: an image's come from SBOMs read with the same credentials. - Warnings and lookup failures naming a dependency found with credentials are dropped from the withheld report, and a private repository's stored run takes its warnings and lookup failures from it, since they can quote what the registry answered. - Merging two report entries keeps credentialed if either was. - Digest reads and image reads are recorded apart (git: and image:), so a credentialed image named like an npm package does not withhold it. - Cached::read_credential, which only the removed prediction used, is gone; the report reference documents credentialed. * fix(report): keep metadata when merging into an entry without it An entry without metadata now takes the merged one's, so its credentialed flag is not lost. * fix(engine): box the futures each read record wraps Wrapping lookups and reads in a credential record grew the run's future past a debug build's test stack; boxing them keeps it on the heap.
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.
What
A
registriesentry withmirrorOfand credentials rewrites npm, PyPI and other package-registry requests through the mirror, and sends the entry's credentials. The server'scredentialedcheck only recognized sources whose package carries a registry URL (Helm, OCI, Docker, Maven, forge tags), so those mirrored lookups were not withheld from the public repository API. A private repository's npm or PyPI results could therefore appear after the repository became public.credentialed, for every source a mirror can cover.Docs
mirrorOfvalues and mirrors in the public API note.Checks
cargo test -p patchula-httpcargo test -p patchula-datasource --test registry_protocolcargo test -p patchula-server publiccargo clippy -p patchula-http -p patchula-datasource --all-targets -- -D warningsmise run docs:build