Skip to content

fix(api): keep cookies out of process argv and redact logs contextually - #975

Open
saksim wants to merge 1 commit into
NanmiCoder:mainfrom
saksim:codex/upstream-cookie-transport
Open

fix(api): keep cookies out of process argv and redact logs contextually#975
saksim wants to merge 1 commit into
NanmiCoder:mainfrom
saksim:codex/upstream-cookie-transport

Conversation

@saksim

@saksim saksim commented Sep 9, 2026

Copy link
Copy Markdown

The WebUI places platform cookies in child-process argv and its startup log. Pass them through MEDIACRAWLER_COOKIES instead, hide the field from the request model repr, hide environment values in CLI help, and disable CLI exception-local display.

Redact Cookie headers and known cookie key/value representations rather than replacing arbitrary value substrings. This preserves page counts, flags, timezones, and identifiers when cookies contain common values such as 1, 0, or true.

Validation: the original implementation fails 7 of 8 new tests. The same tests also catch overbroad substring redaction. The isolated upstream branch passes all 104 tests (Python 3.11, Windows with PYTHONUTF8=1), covering argv/env transport, logs, repr, CLI help/argument precedence, cookie dictionaries/headers, and preservation of unrelated text. Popen is mocked and no account is started.

--cookies remains supported for compatibility. Environment variables are not encrypted storage against the same OS account or administrators. See docs/cookie-handling.md. Access control and JSONL are separate PRs.

Fork tracking and CI: PR #24. Related report: saksim#2.

@saksim
saksim requested a review from NanmiCoder as a code owner September 9, 2026 03:30
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant