Tests: the proof that the api does not open the Feeder token file misses two ways to open it #36
Labels
No labels
boundary:crosses
bug
enhancement
epic
needs-info
needs-triage
ready-for-agent
ready-for-human
svd:go
svd:hold
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dev/messages-mind-mcp#36
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent: #6. Records: ADR 0006 (
docs/adr/0006-retention-deletion-and-forget.md),SECURITY.md, and the table "Which verb opens which secret file" inREADME.md.What happens
The test
test_the_api_does_not_open_the_feeder_token_fileintests/test_config_cli.pycame with #31. It proves less than its name says. A review made two changes to a copy of the code, and the full suite still passed after each one:start()read the Feeder token file withPath.read_text()under theapiverb. The test replaces onlyos.open, and the built-inopendoes not go through that name.cli._apiread the Feeder token file. The test replacescli._api, so no code afterstart()runs under the check.The shipped code does not open the file on either path. The fault is in the strength of the test.
Two statements in the documents are also incomplete:
README.mdsays thatapistarts when the Feeder token file is absent. It does not say thatapialso starts when the file is too short or readable by another user.checkandsyncstill refuse such a file.README.mdandSECURITY.mdsay that the api never opens the file. They do not say that the api process is still able to read it: it runs as the same service user, and the config names the path.What to build
sys.addaudithook, theopenevent) in place of theos.openreplacement._apiin that test, with onlyserver.servereplaced.#33 builds the same proof for every secret file. If #33 takes this method, close this issue with a reference to it.
Acceptance criteria
start()reads the Feeder token file with the built-inopenunder theapiverb._apireads the Feeder token file.README.mdstates whatapidoes with a Feeder token file that is absent, too short or readable by another user.README.mdandSECURITY.mdstate that "never opens" is a behaviour of the code, and that the file permissions do not separate the api from the file.Blocked by
Filed under: operator word "Grant" sha256:78b7d0379d5e
Done by PR #41 (
b5413cf, issue #33):openaudit events, so the built-inopen,io.openandos.openare all seen. The api tests run the real_api, with onlyserver.servestubbed. A self-test proves the recorder.apistarts when the Feeder token file is absent, too short or open to another user.SECURITY.mdstates that "never opens" describes the code, not a permission boundary.What remains (a positive control, path resolution, C-level opens) is in #42.
Filed under: operator word "Accept. Proceed" (2026-11-14)