Skip to content

validator: accept git-subdir sources (hardened path) — prereq for socxen#66 - #4

Merged
virtualsteve-exa merged 1 commit into
mainfrom
feat/git-subdir-source
Aug 5, 2026
Merged

validator: accept git-subdir sources (hardened path) — prereq for socxen#66#4
virtualsteve-exa merged 1 commit into
mainfrom
feat/git-subdir-source

Conversation

@virtualsteve-exa

Copy link
Copy Markdown
Collaborator

Teaches validate_catalog.py the git-subdir source 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); path must 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

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
virtualsteve-exa merged commit 8582ca3 into main Aug 5, 2026
1 check passed
@virtualsteve-exa
virtualsteve-exa deleted the feat/git-subdir-source branch August 5, 2026 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant