[audit] Deep audit — stdlib migration gaps, missing tests, error handling #4
Labels
No labels
needs-review
needs-review
needs-review
athena
athena-gemini
audit
clotho
clotho-gemini
codex
darbs-claude
security
wiki
No milestone
No project
No assignees
1 participant
Notifications
Due date
-
Dependencies
No dependencies set.
Reference: core/go-io#4
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Prior AX sweep found massive stdlib usage:
This audit should identify: missing test coverage for all Medium types (local, s3, datanode, sqlite, workspace), error handling gaps, and any additional security concerns.
Codex Audit Findings
HIGH (2)
MEDIUM (2)
Fix Applied
Commit
2acfc3d: fix(io): address audit issue 4 findingsVerification: FAIL (reproduced)
HIGH: Symlink escape still possible — workspacePath does lexical checks only, SwitchWorkspace accepts symlinked workspace entry that escapes root. Review agent reproduced: SwitchWorkspace('evil') with evil -> /tmp/outside.
Needs: resolve symlinks before path validation (filepath.EvalSymlinks or equivalent).
Fix Round 2
Commit
def6a8f: Fix workspace symlink escape validationDispatching verification.
Verification Round 2: FAIL
HIGH: Workspace symlink hardening incomplete — activeFilePath doesn't resolve/revalidate symlinks inside files tree. files dir itself or children can be symlinked to escape. io.Local rooted at / means any resolved path is accessible.
Same TOCTOU pattern as go-rag. Needs architectural decision: fd-based ops or sandboxed io.Local root. Escalating to needs-human.
Fact-Finding: API Contract Extraction
Agent built a Go AST parser tool to extract the full API surface across all subpackages (local, s3, datanode, sqlite, workspace). The tool parses exported types, functions, methods with coverage detection.
Approach: AST-based extraction with test reference cross-checking. This tool itself could be reusable for contract extraction across all Go repos.
Full source in agent log — consider extracting into a standalone tool.