[codex] fix local object store key safety - #5
Merged
Conversation
sarthakagrawal927
marked this pull request as ready for review
June 13, 2026 05:31
sarthakagrawal927
added a commit
that referenced
this pull request
Jun 13, 2026
sarthakagrawal927
added a commit
that referenced
this pull request
Jun 19, 2026
PR #5 added parent_id to _ALLOWED_FILTER_COLS for cross-backend compatibility but forgot to update the corresponding test assertion. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
sarthakagrawal927
added a commit
that referenced
this pull request
Jun 19, 2026
Both sides wanted raw/<domain>/<content_hash> (no filename). HEAD also carried _safe_key_segment() path-traversal guard and the safety rejection test from PR #5; kept the superset (HEAD) on both conflicted hunks so no intent is lost. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
What changed
put_raw_file()refuses path-traversal-shaped domains.Why
domainviaraw/<domain>/<hash>. With a local object store, a malicious or malformed domain like../evilcould escape the object root.object_store=localis a supported configuration.Validation
uv run pytest -q tests/test_objects.pyuv run ruff check src/kb/storage/objects.py tests/test_objects.py