Repository navigation
fix(security): The approval snapshot and the integrity hash must apply one shared exclusion predicate so unreviewed files cannot be frozen. - #411
Conversation
Signed-off-by: Test Writer Agent <test-writer@security-remediate.invalid>
…y one shared exclusion predicate so unreviewed files cannot be frozen. Signed-off-by: Fix Writer Agent <fix-writer@security-remediate.invalid>
|
[AI] Independent R1 on Legacy snapshots bypass the new filter ( Keep #411 over duplicate #349: equivalent exclusions, plus working terminal-symlink protection. Retain #349's Go 1.26 targeted/race tests, focused CLI/supervisor checks, build/vet, and copy/symlink controls passed. One cold-start |
|
[AI] Independent R2, LOCAL PATCH / NOT PUSHED: F1 resolved; no actionable P0–P3 findings in the cumulative original PR plus repair. Spec and quality verdicts: PASS for candidate tree Fresh real-old- Not merge approval: integrate/review with #410/#412 (including migration/docs), then human push, exact-head native Linux/macOS CI and human approval. Remote head |
Legacy snapshots may contain unhashed files. Require host re-registration to rebuild them under the current copy policy. Refs #321 🤖 Generated with OpenCode Signed-off-by: Sajjad Ahmad <sajjad.ahmad@tngtech.com>
Issue: Refs #321
What
O_NOFOLLOW; a path that turns into a symlink between walk and copy is dropped instead of followed.Why
How
IsExcludedFileNameis exported frominternal/configas the single definition of the skip list (internal/config/meta.go).copyTreeininternal/skilltrust/snapshot.goconsults that predicate, andcopyFileopens withsyscall.O_NOFOLLOW, dropping the file onELOOPrather than retrying the same race.internal/skilltrust/snapshot_exclusion_parity_security_test.go) asserts the frozen set equals the hashed set.Verification
go build ./...— passgo vet ./...— passgofmt -l .— cleanstaticcheck ./internal/config/... ./internal/skilltrust/...— passgo test ./internal/skilltrust/) — passFollow-up