fix(security): prevent acquisition preflight Git filter execution - #576
Merged
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (10)
📝 WalkthroughWalkthroughGit preflight가 ChangesAcquisition Git 인증
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant AcquisitionPreflight
participant Git
participant CheckoutDescriptor
participant NodeCrypto
AcquisitionPreflight->>Git: exact HEAD tree inventory 조회
AcquisitionPreflight->>CheckoutDescriptor: tracked file raw bytes 읽기
CheckoutDescriptor->>NodeCrypto: Git blob framing 적용 후 hash 계산
NodeCrypto-->>AcquisitionPreflight: blob object ID 반환
AcquisitionPreflight->>Git: exact HEAD tree object ID와 비교
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
19 tasks
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.
Scope
Repair issue #575 without broadening Noema authority. This lane owns only the acquisition Git conversion-boundary defect and directly affected tests/decision documentation. It does not copy quarantine/security/outbound authority, provider routing, product domain truth, or lifecycle truth into this acquisition boundary.
Reality RED → causal repair
The original test-only exact
15e5fe04c454f64aa3cfe97b2966aca3ec730ff6changed the existing clean-filter regression to same-sizebase\n→evil\n; hosted application CI34371012334reached release tests and failed on that exact while Security Scan and reviewer-ci independently succeeded. That established the production defect without weakening any gate.Production
33970e6da225fb8314f59a2573923bcb268821c2removed the worktree-awaregit diff-filescall. The preflight still requires exact HEAD, pre/post unsafe-index checks, staged index-vs-HEAD comparison, immutable exact-tree enumeration, descriptor-boundO_NOFOLLOWraw-byte hashing, mode/size/path bounds, and final exact-HEAD stability. It does not blacklist filters, mutate repository config, or relax byte authenticity.Hosted CI on predecessor exact
02e8bbe331b0b24cd892fee67de16afa2c959c46then exposed a narrow convergence RED: exact checkout/base/lock/install/typecheck succeeded, butrelease testsfailed while Security Scan, reviewer-ci, and patch-validator-image succeeded. Two stale assertions intest/acquisition-git-content-hash.test.tsstill expected the supersededauthenticated Git index bytesdiagnostic. Commit944379c1273ebcb8d5a20dae8e73120dcf838970changed only those assertions.After normal #574 integration, the lane ordinary/non-force reconverged by a two-parent merge onto protected
main@fdae30f5657529b79bbbb6d24e37e8270e912ebe. Hosted application CI34378908355on reconverged exact7c9a6739ceed01014bf7f9f65ebde53e953185d1then provided the next precise RED: 4,304/4,305 tests passed; onlytest/acquisition-git-worktree-binding.test.tsstill expected the old staged-comparison diagnostic containing the commit SHA, while raw worktree drift is now correctly rejected by the exact-tree byte authenticator withtracked checkout differs from exact HEAD tree bytes. Commit4ac4bfcd2c0696c51954aefd14ebae4e3c7d168cupdates that one hostile regression expectation. Production behavior and all authentication gates remain unchanged.Current exact authority
Current exact is
4ac4bfcd2c0696c51954aefd14ebae4e3c7d168cand it already contains protectedmain@fdae30f5657529b79bbbb6d24e37e8270e912ebethrough the ordinary merge parent. The previous exact had Security Scan and reviewer-ci GREEN; its application CI failure is intentionally superseded by this causal test repair, and its patch-validator-image result cannot be inherited. Keep Draft until all four gates complete on the unchanged current exact and fresh review/base remain clean.docs/acquisition-data-room-integrity.md,docs/acquisition-git-content-authentication.md, ADR 0016, and the doctoring record describe the filter-free exact-tree + descriptor-bound local Git-blob hashing path.CHANGELOG.mdalready describes the protected direct Node-crypto exact-tree hashing authority and is not rewritten solely to repeat this narrower conversion-helper repair. No merge, release, deployment, or acquisition-readiness completion is claimed.Summary by CodeRabbit
보안 및 안정성
문서
테스트