Repository navigation
fix(deploy): the sops test asserts the portable fact — mode bits on unix, the DACL on windows - #580
Merged
Conversation
…unix, the DACL on windows #433 expected a production fix and found none owed: DecryptSopsFile already writes the plaintext through the session root (encryption/provider.go), the deploy environment is confined, and enforceSecretFloor refuses any mode granting group or other. The write has been enforced all along. What remained was the test asserting Mode().Perm() == 0600, which reports 0666 on Windows however private the file actually is -- an assertion with nothing true to say there. TestExecute_SopsChains now asserts privacy in each platform's own terms through a build-tagged assertPrivateFile pair: the unix half checks the 0600 mode bits as before; the windows half reads the access-control list back and requires SE_DACL_PROTECTED, in the shape phase 2's applymode tests established. The runner now VERIFIES the production DACL on decrypted plaintext rather than assuming it -- if the deploy path ever stops protecting, the windows leg goes red with this test's name on it. Expected Windows movement: TestExecute_SopsChains leaves the known-failure set -- the baseline goes 4 to 3, and the write-path cluster is closed. Verified with make check (103 packages ok, 0 failures) and make vet under GOOS windows. Closes #433. Refs #405, #430.
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.
#433 expected a production fix and found none owed:
DecryptSopsFilealready writes the plaintext throughthe session root, the deploy environment is confined, and
enforceSecretFloorrefuses any mode grantinggroup or other. The write has been enforced all along — what remained was the test asserting
Mode().Perm() == 0600, which reports 0666 on Windows however private the file actually is.The change
TestExecute_SopsChainsasserts privacy in each platform's own terms via a build-taggedassertPrivateFilepair:
SE_DACL_PROTECTED— inheritance broken, phase 2's shapeThe runner now verifies the production DACL on decrypted plaintext rather than assuming it: if the deploy
path ever stops protecting, the Windows leg goes red with this test's name on it.
Zero production change — which is the finding. Plan §3.4 records it.
Expected Windows movement — the review check
Name-for-name diff vs baseline 4: exactly
TestExecute_SopsChainsremoved, none added. Baseline 4 → 3 —the write-path cluster closes; the three #547 path-as-text tests are all that remain.
Verified
make check— 103 packages ok, 0 failuresmake vetGOOS=windows (load-bearing: the new windows assertion file)gofmt -l— cleanCloses #433. Refs #405, #430.