validator: accept git-subdir sources (hardened path) — prereq for socxen#66 - #4
Merged
Merged
Conversation
Prereq for socxen#66 (plugin/ payload split): the catalog needs socxen's
entry to become source type 'git-subdir' with path: plugin, and this
validator — deliberately strict — rejected the unknown type and key.
Support is added as a per-type key allow-list ('url' admits exactly its
old keys; 'git-subdir' additionally requires 'path') so an unreviewed
field remains an error on either type. The path is validated as strictly
relative and traversal-free: [A-Za-z0-9._-] segments only, '/'-joined,
no leading/trailing or empty segments, no '.'/'..' segments, no
backslashes, no whitespace/control characters. URL and ref rules are
unchanged and apply to both types.
Tested: current manifest passes; the exact socxen#66 flip passes; 15
adversarial cases rejected (traversal, absolute, dot-segments, trailing
slash, empty segment, backslash, whitespace/newline, missing path,
path-on-url-type, wrong org, non-main ref, unknown type, tilde).
This PR changes only the validator, so per validate.yml's design it is
checked under main's OLD rules (manifest untouched — passes); the new
rules take effect on merge, gating the index flip that follows.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Steve Wilson <steve.wilson@exabeam.com>
virtualsteve-exa
requested review from
SarahFishCO,
mike-machnik-exa and
scottcexab
as code owners
August 5, 2026 21:54
4 tasks
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.
Teaches
validate_catalog.pythegit-subdirsource type so socxen#66's catalog flip (path: plugin) can merge. Validator-only — the manifest is untouched, so this PR passes under main's old rules by design and the new rules gate the flip that follows.Hardening: per-type key allow-lists (unreviewed fields stay errors on both types);
pathmust be strictly relative and traversal-free ([A-Za-z0-9._-] segments, no./.., no absolute/trailing/empty/backslash/whitespace forms). URL/org/ref rules unchanged, applied to both types.Tested: current manifest green; the exact socxen#66 flip accepted; 15 adversarial path/type cases all rejected.
Refs: open-agent-ai-security/socxen#66, open-agent-ai-security/praxen#235.
🤖 Generated with Claude Code