Commit f4d6932
committed
test(secureperm): force seed mode independent of umask
Address review feedback from coderabbitai on
pkg/secureperm/secureperm_unix_test.go:
TestLockDown_Mode0600_Unix and TestWriteFile_OverwriteDowngrades_Unix
seed a 0o644 file via os.WriteFile, but that mode is filtered by the
process umask. On a developer machine with a restrictive umask such
as 0o077, the seed lands at 0o600 and the tests pass without
exercising the downgrade path. Chmod the seed to 0o644 explicitly
after the write so the lax-mode precondition is deterministic.
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>1 parent a1a71ed commit f4d6932
1 file changed
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
51 | 58 | | |
52 | 59 | | |
53 | 60 | | |
| |||
72 | 79 | | |
73 | 80 | | |
74 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
75 | 88 | | |
76 | 89 | | |
77 | 90 | | |
| |||
0 commit comments