Repository navigation
fix(repo-universe): validate full_name/html_url/fork fields at the entry gate (#6814) - #6836
Merged
Merged
Conversation
…try gate (#6814) validate_entry checked only that an entry is an object with a string full_name (#6716); the fields inside went unvalidated, so build() could emit a newline-bearing full_name or html_url verbatim into doc/fleet/repo-universe.yaml (forging phantom repo entries), render a non-string html_url as Python syntax, or classify a repo as fork on a truthy string fork=false and silently un-watch it. The one gate every consumer passes through now also requires: full_name matching the GitHub owner/name shape, html_url (when present and non-null) a string free of whitespace/control characters, and fork (when present and non-null) a JSON boolean - each rejected with the existing named-error style. Regression tests cover the six acceptance cases plus an end-to-end CLI capture; well-formed and absent-field entries are unchanged.
developing-today
Bot
requested review from
a team and
dezren39
as code owners
November 7, 2026 06:30
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
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.
Closes #6814 (field-level residual of #6716, generator side; checker side was #6757).
What changed
scripts/fleet/repo-universe/generate.py—validate_entry, the single gatedecode_pages,merge_repos, andbuildall pass through, now validates the fields inside an object entry, in the existing named-error style (source + entry index + offending value):full_namemust match the GitHub owner/name shape (FULL_NAME_RE: owner = alphanumerics/hyphens, never leading/trailing; name =[A-Za-z0-9._-]+, not./..) — rejects empty, slash-less,/leading, and newline-bearing values, so a capture can no longer forge phantom repo entries indoc/fleet/repo-universe.yamlthrough the verbatim emit inbuild().html_url, when present and non-null, must be a string with no whitespace/control characters — a non-string no longer renders as Python syntax and a newline can no longer inject an entry. Absent (or null) keeps the current derived-URL fallback.fork, when present and non-null, must be a JSON boolean — a string"false"no longer classifies a real owned repo as a fork and silently drops it from issue watching.Tests
test_generate.py: 17/17 pass (15 pre-existing + 2 new). New:test_field_level_wrong_shapes_fail_namedcovers all six acceptance cases (emptyfull_name, slash-lessfull_name, newline-bearingfull_name, non-stringhtml_url, newline-bearinghtml_url, string"false"fork) plus controls proving well-formed and absent-field entries pass unchanged;test_newline_full_name_capture_fails_named_end_to_endproves the CLI fails named and writes no artifact.build()(the issue's evidence path): all three probe shapes rejected with named errors.test_check_issues.py: 19/19 pass (adjacent suite untouched).Implemented by lane code-b in fallback mode (queue backend down, code#6619), claimed on #6814.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.