GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — mcpx(logging): PR #1737's Redact mangles URL values under a sensitive keyword — port printed as an elided password, rest of URL dropped · Issue #2463 · developing-today/code

mcpx(logging): PR #1737's Redact mangles URL values under a sensitive keyword — port printed as an elided password, rest of URL dropped #2463

New issue
Copy link
New issue
Copy link
Closed
#2833
Closed
mcpx(logging): PR #1737's Redact mangles URL values under a sensitive keyword — port printed as an elided password, rest of URL dropped#2463
#2833
Copy link
Assignees
dezren39
Labels
app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)effort/sSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/pr-diff-reviewFiled by the pr-diff-review jobtask/triageQueue packet kind: verify, reproduce, and route this item

Description

@dezren39
dezren39
opened on Oct 29, 2026
Issue body actions

mcpx(logging): PR #1737's Redact mangles URL values under a sensitive keyword — a port is printed as an elided password and the rest of the URL is dropped

Finding

PR #1737 (merged, fixes #1710) taught Redact to elide URL userinfo passwords. Its replacement function (pkgs/mcpx/internal/logging/trace.go:214 on current main 5a34fa70) decides "this match is a URL userinfo match" purely from strings.Index(m, "://") — but the KEY=VALUE alternative of sensitiveValue (trace.go:189) comes first in the alternation and consumes a whole URL as its \S+ value whenever the pair's name contains a sensitive keyword (auth, token, key, …). For such a match the function:

  • mistakes the URL's port colon (or the userinfo colon) for the marker it wants, and
  • reconstructs only prefix + user + ":" + "<elided>@", silently discarding the remainder of the match — host, port and path for a userinfo URL; the path (plus a fabricated @) for a credential-free URL.

The PR's own keep-case — a bare userinfo URL keeps scheme, user, host, port and path — only holds when the URL alternative is the one that matched.

Evidence

  • PR: mcpx(logging): fix Redact leaks — full JWT elision, reconciled KEY=VALUE keywords, URL userinfo passwords (#1710) #1737 — merge ee07ac6cad82ec5ee0484d8545b15a76a71791ee, commit 2d5da5a7.
  • Current main 5a34fa70: sensitiveValue at pkgs/mcpx/internal/logging/trace.go:189-200 (pair alternative before the userinfo alternative); Redact's URL branch at trace.go:214-220.
  • Probe (verbatim regex + Redact copied from current main, run on the laptop: ~/git/fleet/probe-2026-10-29-laneB-redact/main.go):
    • Redact("MCPX_SCRIPT_ENV", "AUTH_URL=https://auth.example.com:8443/callback") → "AUTH_URL=https://auth.example.com:<elided>@" — no credential anywhere in the input, yet the output presents the port 8443 as an elided password, invents a @, and drops /callback.
    • Redact("MCPX_SCRIPT_ENV", "TOKEN_URL=https://deploy:[email protected]:8443/path") → "TOKEN_URL=https://deploy:<elided>@" — password elided, but host, port and path are lost (the bare-URL control below keeps all of them).
    • Controls behave: bare https://deploy:[email protected]:8443/path → https://deploy:<elided>@example.com:8443/path; SESSION=abc123sessionvalue → SESSION=<elided>; AUTH_URL=https://auth.example.com/callback (no port) → AUTH_URL=<elided>.

Why it matters

Redact is the logging safety boundary for mcpx: its outputs are what operators read when diagnosing from traces. A redactor that fabricates credential-looking output (host:<elided>@) for a credential-free URL sends diagnosis in the wrong direction, and one that silently truncates the non-secret remainder of a value destroys exactly the context the per-match (rather than whole-value) design exists to preserve. Any *_URL/AUTH_*/TOKEN_* pair carried inside MCPX_SCRIPT_ENV-style values — the PR's own motivating case — with a port or userinfo hits this.

Acceptance criteria

  • Regression tests in redact_test.go: a sensitive-keyword pair whose value is a URL with a port and no userinfo keeps the URL readable with only the genuinely sensitive part elided (no fabricated <elided>@, no dropped path); a keyword pair whose value is a userinfo URL elides only the password and keeps scheme, user, host, port and path — matching the bare-URL keep-case from PR mcpx(logging): fix Redact leaks — full JWT elision, reconciled KEY=VALUE keywords, URL userinfo passwords (#1710) #1737.
  • The URL-userinfo reconstruction is applied only when the match actually came from the userinfo alternative (or the pair case is handled before the URL check), not on any match containing ://.
  • All PR mcpx(logging): fix Redact leaks — full JWT elision, reconciled KEY=VALUE keywords, URL userinfo passwords (#1710) #1737 regression tests (full JWT, reconciled keywords, bare userinfo, credential-free URLs) still pass, in CI.

Found by pr-diff-review lane B reviewing PR #1737. Not a leak — nothing sensitive is exposed; the flaw is corruption/fabrication of the redacted output. #1710 (closed) covered the leak direction only.

Activity

Next
  1. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/triageQueue packet kind: verify, reproduce, and route this item
    status/needs-triageNot yet triaged; needs a first look
    source/pr-diff-reviewFiled by the pr-diff-review job
    priority/normalOrdinary priority (the default)
    on Oct 29, 2026
  2. developing-today commented on Oct 29, 2026

    @developing-today
    developing-todayBot
    on Oct 29, 2026 – with developing.today
    Contributor
    More actions

    CODE-1260

  3. dezren39
    added
    queue/queuedHas a queued queue task
    app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)
    effort/sSmall: expected under 2 hours of work
    on Oct 29, 2026
  4. dezren39 commented on Oct 29, 2026

    @dezren39
    dezren39
    on Oct 29, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed

    • Agent: pr-diff-review-b
    • Session / ID: pr-diff-review-b cron run 2026-10-29 18:18 CDT
    • Found via: PR mcpx(logging): fix Redact leaks — full JWT elision, reconciled KEY=VALUE keywords, URL userinfo passwords (#1710) #1737 diff review (lane B, developing-today/code)
    • Task: Filed the Redact URL-mangling flaw: the replacement func treats any match containing "://" as a userinfo match, but the KEY=VALUE alternative matches first for keyword pairs, so a ported credential-free URL under an AUTH_/TOKEN_ name is printed as host:@ with its path dropped, and a userinfo URL under a keyword loses host/port/path. Verified with a verbatim probe of main's regex+func on the laptop (probe-2026-10-29-laneB-redact/).
    • Expectation: effort s; done when the userinfo reconstruction applies only to userinfo-alternative matches, with redact_test.go pins for keyword-pair URL values (port, userinfo) and all mcpx(logging): fix Redact leaks — full JWT elision, reconciled KEY=VALUE keywords, URL userinfo passwords (#1710) #1737 keep-cases still green.
    • Links: mcpx(logging): PR #1737's Redact mangles URL values under a sensitive keyword — port printed as an elided password, rest of URL dropped #2463 mcpx(logging): PR #1737's Redact mangles URL values under a sensitive keyword — port printed as an elided password, rest of URL dropped #2463 · PR mcpx(logging): fix Redact leaks — full JWT elision, reconciled KEY=VALUE keywords, URL userinfo passwords (#1710) #1737 mcpx(logging): fix Redact leaks — full JWT elision, reconciled KEY=VALUE keywords, URL userinfo passwords (#1710) #1737 · mcpx(logging): Redact leaks credential fragments — a JWT's signature segment survives, and SESSION=/COOKIE=/PRIVATE= pairs inside MCPX_SCRIPT_ENV and URL userinfo passwords pass through verbatim #1710 (leak direction, closed)
  5. github-actions
    assigned
    dezren39
    on Oct 30, 2026
  6. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Oct 30, 2026
  7. 4 remaining items

  8. dezren39
    added
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    on Oct 30, 2026
  9. dezren39
    added a commit that references this issue on Oct 30, 2026

    mcpx(logging): elide credentials nested in keyword-pair URLs (#2463)

    84be0e3
  10. dezren39
    added
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Oct 30, 2026
  11. dezren39 commented on Oct 30, 2026

    @dezren39
    dezren39
    on Oct 30, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: OpenChamber scheduled lane (repo-worker-code)
    • Session / ID: queue task 3683 (resumed from pr_opened checkpoint)
    • Found via: queue claim (repo-health-code-pilot), revalidated against fresh GitHub state
    • Task: Resumed PR mcpx(logging): keep keyword-pair URL values readable in Redact (#2463) #2833. CI on the previous head 0fa59dfb was green, but Codex left an unresolved P1: preserving keyword-pair URLs verbatim meant a credential nested in the URL (?token=abc123) was recorded verbatim, where the old code returned <elided>. Fixed in 84be0e32: the credential shapes are now spelled once as constants and composed into sensitiveValue, credentialInURL (bearer + token literals, applied to path) and credentialInQuery (KEY=VALUE pairs, applied only from ?/# so a hostname like auth.example.com:8443 is not mistaken for one). Nested credentials are elided while the URL context survives.
    • Expectation: done = PR mcpx(logging): keep keyword-pair URL values readable in Redact (#2463) #2833 green with the Codex permutation pinned; then merge and complete task 3683.
    • Links: PR mcpx(logging): keep keyword-pair URL values readable in Redact (#2463) #2833 mcpx(logging): keep keyword-pair URL values readable in Redact (#2463) #2833 · head 84be0e32 · issue mcpx(logging): PR #1737's Redact mangles URL values under a sensitive keyword — port printed as an elided password, rest of URL dropped #2463
  12. dezren39
    added a commit that references this issue on Oct 30, 2026

    mcpx(logging): keep keyword-pair URL values readable in Redact (#2463)

    8808dfa
  13. dezren39
    closed this as completedin #2833on Oct 30, 2026
  14. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Oct 30, 2026
  15. dezren39 commented on Oct 30, 2026

    @dezren39
    dezren39
    on Oct 30, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done

    • Agent: OpenChamber scheduled lane (repo-worker-code)
    • Session / ID: queue task 3683
    • Found via: queue claim (repo-health-code-pilot), resumed from pr_opened
    • Task: Merged PR mcpx(logging): keep keyword-pair URL values readable in Redact (#2463) #2833 as 8808dfad. Redact now decides URL-containing matches by shape: a keyword-pair URL that carries no credential stays readable with no fabricated <elided>@ and no dropped path; a userinfo URL under a keyword elides only the password, keeping scheme/user/host/port/path. Codex's P1 (nested credential inside a preserved URL) is fixed in 84be0e32: nested bearer tokens, token literals in the path, and KEY=VALUE pairs in the query are elided while the URL context survives, and the credential shapes are spelled once so the matchers cannot drift. TestRedactKeywordPairURLValues pins all eight shapes.
    • Verification: go test ./internal/logging/ -count=1 and -race -shuffle=on -count=5 pass on the laptop; CI green on 84be0e32 (build, stress on changed tests, time budget); all PR mcpx(logging): fix Redact leaks — full JWT elision, reconciled KEY=VALUE keywords, URL userinfo passwords (#1710) #1737 regressions still pass.
    • Links: PR mcpx(logging): keep keyword-pair URL values readable in Redact (#2463) #2833 mcpx(logging): keep keyword-pair URL values readable in Redact (#2463) #2833 · merge 8808dfad · issue mcpx(logging): PR #1737's Redact mangles URL values under a sensitive keyword — port printed as an elided password, rest of URL dropped #2463 (auto-closed by the PR)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)effort/sSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/pr-diff-reviewFiled by the pr-diff-review jobtask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.