Repository navigation
fix(manager): local npm protocols are not registry versions; manager facts decided once - #228
Merged
Merged
Conversation
npm's registry check kept its own prefix list, so portal:, patch: and the other protocols the public verdict already calls local still extracted as registry versions. registry() now reads the same LOCAL_SCHEMES taxonomy fetch_ok uses; npm: stays, since it aliases a registry package. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…d once Locked::dependency() asked the ecosystem descriptor for the source a lockfile-only package is looked up in instead of guessing npm for everything that is not Cargo; a manager that records no locked packages is an explicit unreachable arm. cargo::crates_io answers "is this crates.io" for lock sources, registry indexes and the public descriptor, replacing the three formulations that had to agree. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
EcoRoles names the CredentialScan a file's text gets, so credentials::keyed dispatches through the taxonomy instead of its own filename match: a credential-bearing file cannot lack a check. The npm, nuget and composer arms compose the shared name lists rather than repeating them. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
acceptable_registry_url lives in config, below manager's registry_url, so the recorded-bytes sort and the producer check cannot drift; the dot-path normaliser the import walk and the virtual filesystem each kept is now one function, the /repo rule staying where it applies. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
The uses/container/image line patterns are keyed by a Locator enum, so the lookup cannot ask for a key that has no pattern and the unreachable fallback is gone. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
There was a problem hiding this comment.
1 issue found across 17 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="crates/manager/src/public.rs">
<violation number="1" location="crates/manager/src/public.rs:55">
P1: `patch:` is not fetch-free: Yarn patch locators wrap an underlying package that can come from a private archive or registry. Because this shared entry makes `fetch_ok` return `true` before inspecting that locator, a `package.json` can be marked public despite a private patch source; keep the npm extraction taxonomy separate and inspect or fail closed on the inner patch locator for public verdicts.</violation>
</file>
Merged
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.
Manager and config leftovers from the post-refactor sweep: each fact is now decided once.
Ecosystem::locked_source) instead of a Cargo-else-npmif.cargo::crates_io, used by the lockfile reader,nonpublic_registryand the public-origin rule. Before, there were four copies in three formulations.fix):npm.rsreads the same local-protocol list (public::LOCAL_SCHEMES) as the public-source verdict.portal:,patch:,exec:and the other local protocols no longer extract as registry versions. The managers guide page is updated. The corpus has no such specifiers, so it is unchanged.CredentialScan, so a file in the taxonomy cannot lack a check.acceptable_registry_url), shared byRegistry::from_recordedand manager'sregistry_url. Recorded bytes sort into the same variants; a test pins the cases../..normaliser.Follow-up noted, not done here:
crates/update/src/lockfiles.rshas its own crates.io lock-source check.