fix: file-tool security vulnerabilities#37
Merged
Conversation
- confineToCWD now resolves symlinks to prevent directory-symlink traversal in write_file / patch / batch_patch - glob simple mode uses Lstat and skips symlinks - batch_read wraps content with untrusted_content boundary - read_file / batch_read cap returned content at 1 MiB - write_file preserves original file mode on overwrite Includes 9 regression tests and a verification certificate.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
odek | 1b9aeba | Commit Preview URL Branch Preview URL |
Jun 13 2026, 08:34 AM |
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.
Verification Certificate
Protocol: The AI Verification Protocol v5.2.7
Certificate ID:
odek-sec-fixes-20260613Created: 2026-06-13
Branch:
fix/security-vulnerabilities-tddSubject SHA: (post-repair tree; certificate issued against the branch HEAD)
PR Summary
cmd/odek/file_tool.go; ~280 test lines incmd/odek/security_vulnerabilities_test.goGeneratedCodegenerator_identityabsentGeneratedCode; ρ family/version signals at maximumPreconditions
go vet ./...,go build ./...) with no high-severity findings.9-Axis Review
cmd/odek/file_tool.go; no new coupling.EvalSymlinksandLstat; no new sinks.η Derivation
Agent E (same instance, monoculture) re-derived η from available signals.
m(mutation kill)o(oracle agreement)b(branch coverage)f(fuzz survival)s(SAST clean)go vetclean; no secret/credential patterns added.t(static analysis)go build ./...and fullgo test ./...pass.d(doc coverage)Weights used (redistributed):
o=0.55, s=0.20, t=0.20, d=0.05η_raw ≈ 0.97
Correlation Penalty (ρ)
Monoculture fallback from §0.1 applies: single provider family across generator and verifier.
η = clamp(0.97 − 0.20, 0, 1) = 0.77
Verification Debt
Verdict
HumanReviewRequiredHumanReviewRecommendedFinal verdict:
HumanReviewRequiredRationale: The automated fixes and tests are structurally sound, but the single-agent monoculture means η falls below the 0.80 threshold. A human reviewer should inspect the
confineToCWDsymlink-resolution logic and themaxReadBytescap before merge.Attestation
cmd/odek/security_vulnerabilities_test.go(9 regression tests)Fixed Finding
During protocol review, one structural finding was remediated:
os.Chdirto set the working directory, which is not thread-safe and would break undert.Parallel().