Skip to content

organic-os v0.4.4 - completing the token-sanitization fix

Choose a tag to compare

@shalintripathi shalintripathi released this 22 Jul 18:39
· 44 commits to main since this release

Follow-up to #13, which closed a real token-leak path (27 leaking cases reduced to 1 pre-existing and unreachable, verified by a 67-probe battery against real urllib). The security fix was sound and merged; these are the four defects that review surfaced around it.

  • A test that passed for the wrong reason. A local variable named http shadowed the http module, so http.client.InvalidURL raised AttributeError instead and the handler swallowed it - the test went green without ever exercising the path it named. Renamed the local; reverting the source now fails it with the real InvalidURL.
  • A vacuous assertion whose right-hand operand was always true, so it could never fail. Replaced with three independent assertions, demonstrated against a partial-leak message that the old form accepted.
  • The sanitizer wiring was unpinned. Stripping sanitize_bot_token from all three call sites left the suite fully green; six new parametrized tests now fail if any call site drops it.
  • Sanitized errors now name the failure class. Collapsing a malformed response, a caller bug, and a bad URL into one opaque string protected the token but cost real debuggability. The message now carries the exception class name, which can never contain a token, while the URL and original message stay suppressed.

Credit to kevinnft for #13, the third merged contribution today, and for a fix that only became possible because of the previous one.

313 tests, 9 audit checks, 8 gate probes, CI green.