Fail closed when log secret masking errors #55

Open
lost-rob0t wants to merge 19 commits from rage/33-log-secret-mask-fail-closed into main
lost-rob0t commented 2026-08-24 15:23:26 +00:00 (Migrated from github.com)

Fixes #33.

TDD-first security slice. The first commit adds deterministic regression tests proving the current masking boundary returns raw candidate secrets when secret-manager lookup or masking raises.

Security invariant: masking failures must never emit the original candidate string/object into LogItem output, state snapshots, or persistence. Production code follows only after the red contract is established.

Fixes #33. TDD-first security slice. The first commit adds deterministic regression tests proving the current masking boundary returns raw candidate secrets when secret-manager lookup or masking raises. Security invariant: masking failures must never emit the original candidate string/object into LogItem output, state snapshots, or persistence. Production code follows only after the red contract is established.
nsaspy changed title from WIP: Fail closed when log secret masking errors to Fail closed when log secret masking errors 2026-08-27 19:43:11 +00:00
Merge branch 'main' into rage/33-log-secret-mask-fail-closed
Some checks failed
Log Secret Masking / regression (pull_request) Failing after 6s
f6a0ae0dbe
ci(log-masking): fetch install-nix-action by full URL
Some checks failed
Log Secret Masking / regression (pull_request) Failing after 2m5s
f69fde250e
cachix/install-nix-action is not mirrored on data.forgejo.org, so the
runner fails action resolution before any step runs. Reference the
action by its fully-qualified URL instead.
ci(log-masking): drop forgejo token from nix github fetches
Some checks failed
Log Secret Masking / regression (pull_request) Has been cancelled
781ef8e582
secrets.GITHUB_TOKEN on Forgejo is an instance token, not a GitHub one;
nix tarball fetches with it get HTTP 401 from api.github.com. Fetch the
public flake inputs anonymously.
ci(log-masking): retrigger when the nix environment changes
Some checks failed
Log Secret Masking / regression (pull_request) Has been cancelled
b2a0297858
Merge branch 'main' into rage/33-log-secret-mask-fail-closed
Some checks failed
Log Secret Masking / regression (pull_request) Has been cancelled
6315d4e85f
Merge branch 'main' into HEAD
Some checks failed
Log Secret Masking / regression (pull_request) Has been cancelled
Android APK / build (pull_request) Has been cancelled
280aedcf06
ci(log-masking): share the heavy-ci queue across workflows
Some checks failed
Log Secret Masking / regression (pull_request) Has been cancelled
a5e9aa4009
fix(nix): sandbox derivation builds on the CI runner
Some checks failed
Log Secret Masking / regression (pull_request) Failing after 29m59s
e1cbb861c7
ci(log-masking): run on the host nix runner
Some checks failed
Log Secret Masking / regression (pull_request) Failing after 43s
a198e20b6b
The docker runner container cannot sandbox nix builds (unsandboxed
root builds fail the /homeless-shelter purity check and upstream tests
assume an environment the container lacks). The registered host runner
(nix) has multi-user sandboxed nix with non-root build users; run the
regression there and drop the redundant installer step.
ci(log-masking): use the nix-ci lane
Some checks failed
Log Secret Masking / regression (pull_request) Failing after 3m28s
edfc962b5a
fix(ci): run pytest as a module so the repo root is importable
All checks were successful
Log Secret Masking / regression (pull_request) Successful in 54s
e549b23a8d
Bare pytest does not put the working directory on sys.path, so
'tests/test_log_secret_masking.py' cannot import the helpers package
(ModuleNotFoundError on the host runner; the docker runs never reached
this step). 'python -m pytest' inserts the cwd, matching the other
workflows.
All checks were successful
Log Secret Masking / regression (pull_request) Successful in 54s
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin rage/33-log-secret-mask-fail-closed:rage/33-log-secret-mask-fail-closed
git switch rage/33-log-secret-mask-fail-closed

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff rage/33-log-secret-mask-fail-closed
git switch rage/33-log-secret-mask-fail-closed
git rebase main
git switch main
git merge --ff-only rage/33-log-secret-mask-fail-closed
git switch rage/33-log-secret-mask-fail-closed
git rebase main
git switch main
git merge --no-ff rage/33-log-secret-mask-fail-closed
git switch main
git merge --squash rage/33-log-secret-mask-fail-closed
git switch main
git merge --ff-only rage/33-log-secret-mask-fail-closed
git switch main
git merge rage/33-log-secret-mask-fail-closed
git push origin main
Sign in to join this conversation.
No description provided.