feat: add content-addressed cache for remote resources - #1554
Conversation
Site previewPreview: https://750d8332-site.fullsend-ai.workers.dev Commit: |
ReviewFindingsInfo
Previous runReviewFindingsInfo
Previous run (2)ReviewFindingsLow
Info
Previous run (3)ReviewFindingsMedium
Low
Previous run (4)ReviewFindingsMedium
Low
|
929eed7 to
d227f57
Compare
|
All three findings addressed in d227f57:
|
d227f57 to
20e179b
Compare
|
Both findings addressed in 20e179b:
|
20e179b to
2b27e65
Compare
waynesun09
left a comment
There was a problem hiding this comment.
Review Squad (7 agents) — 2 verified MEDIUM findings after deduplication and verification against source. See inline comments for details.
Implements a SHA-256 content-addressed cache under .fullsend-cache/resources/sha256/<hash>/ with atomic writes (temp+fsync+rename), integrity re-verification on read against the caller's requested hash, symlink protection via filepath.EvalSymlinks, and strict hash validation (64 lowercase hex chars only). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Greg Allen <gallen@redhat.com>
2b27e65 to
045aa12
Compare
waynesun09
left a comment
There was a problem hiding this comment.
LGTM. All review findings addressed — TOCTOU eliminated, symlink protection added with validateCachePath, strict hash validation, fsync on atomic writes, and good test coverage including symlink and concurrency cases.
Can you approve? |
it's already approved, check top right on the green check icon |
Well, you have to refresh the page to see it. That stinks. Thanks. |
Summary
internal/fetch/for storing remote resources by SHA256 hashCachePutuses atomic writes (temp file +os.Rename) with restrictive permissions (0o700 dirs, 0o600 files)CacheGetre-verifies SHA256 integrity on every read to detect corruptionTest plan
go test ./internal/fetch/— all 16 tests passgo vet ./internal/fetch/— clean🤖 Generated with Claude Code