[Security] Redact persisted secrets and harden controller file permissions#253
Open
fettpl wants to merge 10 commits into
Open
[Security] Redact persisted secrets and harden controller file permissions#253fettpl wants to merge 10 commits into
fettpl wants to merge 10 commits into
Conversation
Author
|
@0xSero PR #253 is now mergeable at independently approved exact head |
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.
Summary
Redact controller and engine output before it reaches persistent logs, console streams, event streams, API tails, or failure diagnostics, and enforce owner-only handling for sensitive controller files. The implementation uses one bounded, stateful credential-redaction model across scalar, structured, query-string, environment, CLI, fragmented, multiline, and cross-stream forms.
The change also makes controller startup and restart paths fail closed when runtime paths, process identity, systemd or launchd ownership, or listener ownership cannot be verified.
Closes #229
Root cause
Controller output previously reached several sinks through independent paths. That allowed credentials split across writes, streams, records, structured values, or query continuations to escape scalar-only sanitization. Sensitive files also depended on ambient creation modes and pathname checks that did not consistently protect reopen, migration, replacement, and service-management boundaries.
Solution design
0700; sensitive files use0600.umask 077before controller imports and service/process startup, and buffer startup warnings until the redacting console is installed.3cdd3a6402308c1d7a25816205cdedd7e73688f6and current main08bcba27f137f9c3d0206ea811d0aa7548a2dfa6.Acceptance criteria
Validation
2c38b8924d2a099c41efb83f81c90176c4b3786b; no P0/P1 blockers found.npm run check: passed in full, including contracts, repository structure, frontend quality/build, controller typechecks, lint, standards, dependency/duplication/dead-code audits, and the controller test suite.git diff --checkpassed; the tracked worktree was clean before publication.npm run desktop:distpassed and produced the macOS distribution artifacts./Applications/Local Studio.appreported bundle IDorg.local.studio.desktop, version2.1.0, launched successfully, and returned HTTP 200 with{"ok":true}from/api/desktop-health.The repository does not define
npm --prefix frontend run testor rootnpm run test:integration; those unavailable commands are not represented as passing.UI changes
No intentional UI change. Frontend files are present only through the exact #244 dependency included in this branch.
Risks and rollout notes