Skip to content

SEC: Git delivery: host errors carry registered credentials into worker logs and request history (Codex F1) #444

Closed

Description

@ephico2real2

Part of #286. Found by Codex (another model family) reviewing the Git delivery layer on main b8ee59e (PRs #288, #299), 2026-11-19. Severity per Codex: High.

Location: cmapi/src/cmapi/core/git/base.py:136, :142; core/git/github.py:182; worker.py:133, :153, :173.

A host response or HTTP transport error echoes the API token. Op sanitizes its own event, but the raised GitUnavailable/PlatformRefused still holds the raw message. Worker exception logging and error events then persist it. A transport exception is also chained with its raw message. Tests on main show the synthetic token in the exception for 403, 502 and transport failures; the worker sinks are established by the cited source, not by a database run.

Full fix: sanitize the GitUnavailable exception boundary and PlatformRefused.host_message; suppress the raw HTTP exception chain. Host response bodies remain unmodified for control-flow classification. Appendix C: core/git/base.py.

Tests: test_host_error_never_contains_registered_token[403], [502], test_http_transport_error_never_contains_registered_token: 3 fail on main; 3 pass fixed.

Evidence: workbench/cmapi/review-288b/codex-report.md (F1) and its regression test in codex-fixes.patch; Codex ran it failing on main and passing with its fix. Reviewer 2 (OB3) checks the fix and runs the PostgreSQL and SSH checks the sandbox could not, before it is applied.

Activity

  1. added
    bug
    status:open
    sev:high
    Backlog
    on Nov 19, 2026
  2. added
    Done
    and removed
    Backlog
    on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Donebugsev:highstatus:open

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions