Draft
deps: support tracked-but-implied deps and hard-fail CVE scan on missing versions#46919
Conversation
…n hard-fail Co-authored-by: phlax <454682+phlax@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix deps.yaml to declare only built dependencies
deps: support tracked-but-implied deps and hard-fail CVE scan on missing versions
Aug 24, 2026
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.
bazel/deps.yaml/api/bazel/deps.yamlneed to represent transitive deps that we track for CVE purposes (e.g. wasm runtime transitives likehighway) without pretending they are direct deps with declared versions. This implements the schema decision from the issue discussion: tracked-implied deps become top-level metadata entries with aused_bylist, disjoint fromimplied_untracked_deps, and acpewithout a resolvable version becomes a hard failure in the CVE pipeline rather than a silent skip.Schema (
api/bazel/external_deps.bzl)used_byannotation: a top-level entry for a dep reached only transitively, carrying its owncpe/use_category/extensions, listing the tracked deps through which it is loaded.implied_untracked_depsas the complementary assertion ("exists, no metadata carried") — the two namespaces must be disjoint.Validation (
tools/dependency/validate_reachability_test.py)New
check_tracked_implied_disjointness, alongsidecheck_apparent_name_uniqueness:implied_untracked_depslist must not be a top-level metadata key — error names both the key and the parent:'highway' is a tracked entry - remove it from 'v8''s implied_untracked_deps.used_bylist must be a top-level metadata key.Disjointness by construction means
_resolve_dep_nameneeds no precedence rule, and untracked→tracked promotion is atomic (the intermediate state fails).Metadata join (
bazel/BUILD)legacy_all_repository_locationsnow iterates the union of version-data and metadata keys, so tracked-implied entries (norepository_locations.bzlentry) surface in the merged output for validation and CVE scanning instead of being silently dropped. Output for all existing entries is unchanged.CVE hard-fail (
tools/dependency/cve_utils.jq)parse_depserrors when a dep declares acpebut has no resolvable version — version-ranged matching against a missing version would make false negatives indistinguishable from "clean", the failure mode ruled out for the wasm runtimes.Out of scope
cpewill (correctly) hard-fail until dependency reachability aspect only covers the default config #46917 lands the config matrix providing resolved versions from the module graph.//bazel:update///bazel:api-updateat the resolved-version source belongs to that follow-up.AI-assisted (GitHub Copilot coding agent).