Repository navigation
security show no longer says no environment variable set a removed key (BACKLOG #3350) - #2436
Conversation
…nt variable set it (BACKLOG #3350) security show builds [security] straight from the file's table, so for require_sign_in or handles_real_patient_data in the file it printed the direct-build refusal: "The key was passed straight to the section, so no environment variable set it." The service's environment may still set the same key. The refusal now only says to remove the key from the arguments or the file table. Set in the environment, security show already printed the loader's refusal, which names the MEFOR_ variable. Tests run security show with each [security] removed key in the file and the environment (no "environment" in the output), with an env-only control. Proposed PR title: security show no longer says no environment variable set a removed key (BACKLOG #3350) Proposed vault banner: CLOSED by engine PR <N>. The direct-build refusal security show prints for a removed [security] key in the file no longer claims that no environment variable set it; tests run security show with the key in the file and the environment.
…oved-key refusal tests (BACKLOG #3350) Code review round one. The tests now assert that the removal step follows the reason directly, so a reworded provenance claim fails too, and that security show prints the same refusal with and without the variable set. The docstring and changelog name security set beside security show, as a floor. The earlier commit message's "Set in the environment, security show already printed the loader's refusal" holds only when the environment is the sole source: with the key in the file too, security show prints only the direct-build refusal. Proposed PR title: security show no longer says no environment variable set a removed key (BACKLOG #3350) Proposed vault banner: CLOSED by engine PR <N>. The direct-build refusal for a removed key, which security show and security set print for a [security] key in the file, no longer claims that no environment variable set it; tests run security show with the key in the file, with and without the variable, and with the variable alone.
…aims (BACKLOG #3350) Code review round two. The security show test pins the full removal step, so a provenance claim before, inside or after it fails, and both needles are case-insensitive. The docstring no longer says a direct build reads neither source while listing the file table as one. The changelog uses the conditional, and the test comments drop two false premises. Shipped open: security show and security set could render the loader's conditional wording (or the partial reason they already compute) instead of the direct-build refusal; that is a __main__.py change this item's brief steered away from. No test runs security set with a removed key. Proposed PR title: security show no longer says no environment variable set a removed key (BACKLOG #3350) Proposed vault banner: CLOSED by engine PR <N>. The direct-build refusal for a removed key, which security show and security set print for a [security] key in the file, no longer claims that no environment variable set it; tests run security show with the key in the file, with and without the variable, and with the variable alone.
|
QA line, BUILDER.md step 11, posted by the Manager from the Builder's report as given (BACKLOG #3350, head I ran the Applied: positional and whole-step pins in place of the single phrase check, and case-insensitive needles; a same-output check between the file-only and file-plus-environment runs; an assert that the key list is not empty, and separate asserts in place of one joined assert; the docstring names Shipped open: the four items under "Shipped open" in the PR body. |
|
Lander: enqueued at cf962a3, pinned. The QA line names this head (code-review at xhigh, twice). The four shipped-open findings are filed as vault #3885 in open vault PR 2543. Graded non-blocking: three are pre-existing or a test gap, and item 1 waits on engine PR 2387. None changes behaviour against main or weakens a control. That grade is a Lander decision under the owner's Driver delegation, not an owner ruling. All 9 live required contexts are SUCCESS on this head. |
|
CI failed in Its own head can still be green: the queue revalidates the merge, and the path gates that skip on a pull request run there. Read the run before retrying. https://github.com/MEFORORG/MessageFoundry/actions/runs/39328582619 |
|
Manager triage of the merge-queue ejection, run 39328582619 (
|
|
Lander: re-enqueued at cf962a3, the same pinned head, as the one rerun the flake policy allows. The eviction (run 39328582619) was test_ui_dr_outlive::test_a_console_release_cut_off_by_the_deadline_still_completes on web console windows-2025, 1 failed / 1095 passed. That is the deadline race filed as vault #3871, which hit engine PR 2387 on ubuntu today. This PR touches no DR or web console code. If it evicts again on the same test, it is routed as a real failure. |
Batch 294 (auth), item #3350. A separate PR from batch 294's #3339/#3282 PR, because that one carries a security-control change and gets its own.
Merge danger -- #3350
Reversible: yes -- a revert on
mainundoes all of it.Blast radius: the text of the direct-build removed-key refusal (
_removed_key_messageinmessagefoundry/config/settings.py), whichsecurity showandsecurity setprint when a removed[security]key is set in the file. No other behaviour changes; the refusal still refuses.Evidence -- #3350
main6d6986fdd,security showwith[security].handles_real_patient_dataor[security].require_sign_inset in the file exits 1 and prints "The key was passed straight to the section, so no environment variable set it." That holds even when the service environment also sets the key, so the claim can be false.<key>from the arguments or the file table the section was built from" and makes no claim about the environment.tests/test_security_cli.pyrunssecurity showfor each removed[security]key with the key in the file, then with the matching variable set as well, and asserts: rc=1 and identical output in both runs, the removal step directly follows the reason, and no "environment variable" in any case. A second test sets the variable alone and checks the partial reason namesMEFOR_SECURITY_<KEY>. Mutation checks: the old wording, a reworded claim before the removal step, and a claim after it each fail 8 tests.Source branch
b294-3350, headcf962a3b9a1ce0e2a2cd1178caa67b894a9547b1, onmain6d6986fdd. Commits977d66d31,70c1e9d80(corrects a false statement in the round-1 commit message),cf962a3b9.git merge-treeagainst PR 2387's head and against batch 294's other branch both exit 0.Builder report (summarised by the Manager)
Closing step 1, the trace (
security show --json, for each removed key, in the file and in the environment):[security].handles_real_patient_dataor[security].require_sign_inset in the file (rc=1,invalid [security] in <path>: ...).showbuildsSecuritySettingsstraight from the file's[security]table, and that is the direct-build refusal.MEFOR_SECURITY_<KEY>.[ai].data_class,[api].serve_ui_explicit,[auth].enabled,[pipeline].require_rcsi_for_pooled), in the file or in the environment: rc=0, with the loader's text naming both. No false claim.security setgives the same direct-build refusal through its precheck.Checks:
changelog.d/3350.fixed.md.Shipped open (code review, for rows)
security showandsecurity setalready compute the loader's refusal, which names the variable, in the same run, and throw it away on the removed-key error path. The fix would be in__main__.pyaround lines 10606-10612 and 10643: print the loader's_removed_key_message(section, key, reason)form, or emit_loosenings_partial_reasonbeside the error. Not done here, because the brief preferred removing the false claim and kept hunks out of__main__.py, where PR 2387 is active. Closing step 2 allows either route.showuser._refuse_removed_keysdocstring (settings.py around line 433) advises removing the key withsecurity setand a null value. Measured: when the shell environment also sets the key, that edit is refused and the file keeps the line.security setwith a removed key in the file.Claim on #3350 is still held by the Builder's worktree (it left it for open finding 1).
Proposed vault banner (the Lander's to flip)