8000 hub: limit go-vulndb to data/osv by xerj-org · Pull Request #2229 · xerj-org/xerj · GitHub
[go: up one dir, main page]

Skip to content

hub: limit go-vulndb to data/osv - #2229

Merged
xerj-org merged 1 commit into
corpus-hubfrom
cursor/go-vulndb-paths-manifest-cbd2
Oct 23, 2026
Merged

xerj-org merged 1 commit into
corpus-hubfrom
cursor/go-vulndb-paths-manifest-cbd2

Conversation

@xerj-org
Copy link
Copy Markdown
Owner

What this changes, and why

go-vulndb.json pins golang/vulndb but could not say "only data/osv". corpus add --from therefore cloned the whole repository. The field report on #1842 got a searchable corpus only by copying data/osv out by hand (4,577 files). The pin and the withdrawn crypto-misuse manifest were fixed on this branch by #1641. This is the remaining manifest half.

The repo entry now sets "paths": ["data/osv"]. The CLI that sparse-checks out that field is #2228, against main. validate_hub.py (the corpus-hub validate workflow) accepts a paths array and refuses an empty array, a string, an absolute path, .., and globs — the same shapes the consumer gate refuses. A missing paths field still means the whole pin. CONTRIBUTING.md documents the field.

files and bytes are unchanged: they already described the data/osv tree, not the whole repo.

Evidence

python3 tools/xerj-code/hub/validate_hub.py
corpus-hub validation OK: 516 manifests, 3 recipes, backlog 552 rows (514 live)

That run includes the new self-check (good path data/osv, and refusals for .., absolute paths, globs, empty, and 33 entries) and the updated manifest. The self-check aborts the script on failure, so a green run is the path rules holding.

Separately, gh api repos/golang/vulndb/git/trees/5cd8418cf9c867d344fda07a73ea844b0f34bca2:data/osv --jq '.tree | length' printed 4577, which is the files value this manifest already recorded.

Checks

  • python3 tools/xerj-code/hub/validate_hub.py — the corpus-hub validate gate
  • cargo fmt / cargo test / ES-YAML — not applicable: this PR does not change Rust. The consumer gate and the checkout are fix(corpus): harvest a repo pin's paths, not the whole tree #2228.
  • Docs: tools/xerj-code/hub/CONTRIBUTING.md describes paths
  • No file under .github/ was edited. The existing corpus-hub validate w 8000 orkflow already runs validate_hub.py.

Not run: a live xerj corpus add --from of golang/vulndb. The checkout behaviour is tested on a local fixture in #2228. This PR only declares the directory.

Provenance

Refs #1842

Open in Web Open in Cursor 

A repo-pin manifest could not name a subdirectory, so corpus add --from
on go-vulndb cloned all of golang/vulndb. The CLI that honors "paths"
is #2228 on main. This manifest declares the directory the field report
actually indexed: data/osv (4,577 advisory files at the existing pin).

validate_hub.py accepts a paths array and refuses the same shapes the
consumer gate refuses (absolute, .., globs, empty). The check runs on
every corpus-hub validate, including a small self-check of those rules.

Refs #1842

Co-authored-by: xerj-org <xerj-org@users.noreply.github.com>
@cla-bot cla-bot Bot added the cla-signed label Oct 23, 2026
@xerj-org
xerj-org merged commit 4b3e3d3 into corpus-hub Oct 23, 2026
2 checks passed
@xerj-org
Copy link
Copy Markdown
Owner Author

Xerj Merger made the fix: go-vulndb's hub manifest now pins paths: ["data/osv"], so corpus add --from can harvest only the advisory directory instead of all of golang/vulndb. validate_hub.py checks the new optional paths field (relative directories only; absolute paths, .., globs, and more than 32 entries are refused), and CONTRIBUTING documents it. The manifest reader ignores unknown fields, so current releases stay unaffected until the consumer side (#2228) lands. Validated with corpus-hub validate and locally (516 manifests OK).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0