You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(security): blob_store path injection, sandbox escape, and data integrity #545
Findings from the post-hoc bot review audit (#544).
CONFIRMED
blob_store.py:38 — path injection via hash_hex (CodeRabbit, Critical) blob_path() constructs filesystem path from hash_hex with zero validation. A malformed raw_id containing ../ or / would escape the blob root directory.
blob_store.py:127 — partial write corruption (Copilot) os.write(fd, chunk) can perform partial writes. For large chunks, a partial write would silently corrupt the blob since the hasher was already updated.
blob_store.py:171 — temp file leakage (CodeRabbit, Major) iter_all() uses prefix_dir.iterdir() without filtering .blob.* temp files. Crash-left temp files are yielded as valid blobs.
blob_store.py:72 — heartbeat exception aborts write (CodeRabbit, Major)
Exception in heartbeat() callback propagates and aborts the entire blob write.
lib/security.py:55-56 — sandbox escape via absolute paths (Copilot) sanitize_path() preserves absolute paths like /etc/passwd — no allowlist for safe directories.
storage/blob_store.py:88,94 — TOCTOU race (Both, UNCERTAIN)
File could change between hash check and write. Appears partially mitigated in HEAD but needs verification.
Activity
fix: harden blob store against path injection, partial writes, and te…