Skip to content

[INBOX][Practical R3] ZIPFoundation 备份安全体检 · 只读预检 + CRC - #89

Draft
Righteous1776 wants to merge 17 commits into
mainfrom
agent-drop/practical-backup-zip-preflight-20261025
Draft

Righteous1776 wants to merge 17 commits into
mainfrom
agent-drop/practical-backup-zip-preflight-20261025

Conversation

@Righteous1776

Copy link
Copy Markdown
Owner

[AGENT-DROP] Practical ZIP Backup Preflight R3

Base main: 501ef81. INBOX_ONLY; all 13 committed files are under AGENT_INBOX/submissions/practical-backup-agent/20261025-zipfoundation-preflight/.

PROPOSED SOURCES: FILES/VeilBackupPreflightPolicy.swift; FILES/VeilBackupArchiveInspector.swift; FILES/VeilBackupPreflightView.swift; 16 executed policy XCTest methods; 5 additional authored ZIPFoundation integration XCTest methods.

FUNCTIONS: read-only inspection of original VeilLink ZIP backup versions 1/2; duplicate path and case/Unicode alias blocking; symlink/traversal/path allowlist; ZIP 200MiB and expanded 350MiB size limits; 10k-entry cap; compression-ratio anomaly screening; required files; CRC-checked sanitized manifest preview; opt-in streamed full-entry CRC. No SQLite/Keychain mutation or decryption. The inspector reuses ZIPFoundation already in project.yml, with no added third-party dependency.

PATCH.diff: one new ToolCenter entry and one advisory pre-restore BackupManager guard, NOT applied to product. The restore guard is high-risk and must not be adopted without real legacy v1/v2 backup compatibility fixtures and Governor approval.

VALIDATION: Linux Swift 6.2.1 SwiftPM tools-5.9 16 XCTest/0 failures in Debug and Release; Swift inspector typecheck against upstream 0.9.19 API-shaped stub only (not real ZIPFoundation binary); iOS sources syntax parsed only. Both patch hunks match main exactly; git apply --check --whitespace=error-all PASSED on matched-context scratch Git fixture. All 13 files hash-match local originals. Local ZIP 17 members, ZIP CRC PASS, SHA256 87733274774a3e2848d3581e4c0db03e300a616ec8af17d5b4db98bd101774c6.

NOT TESTED: linked ZIPFoundation full app build, actual five ZIPFoundation integration XCTest functions, Apple SDK, iPhone7 camera/storage/thermal/gestures. CRC does not establish password/decryption validity or guaranteed restore. Must prioritize P0 #64/#65/#66; collision arbitration with ToolCenter proposals and PR #50 storage-control center. No main edits/IPA Actions/version/signing/release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant