Skip to content

[WRONG BRANCH] fix(lab): redact bare connect-to failure destinations - #248

Draft
luvs01 wants to merge 1 commit into
mainfrom
codex/propose-fix-for-connect-to-vulnerability
Draft

[WRONG BRANCH] fix(lab): redact bare connect-to failure destinations#248
luvs01 wants to merge 1 commit into
mainfrom
codex/propose-fix-for-connect-to-vulnerability

Conversation

@luvs01

@luvs01 luvs01 commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Provider-controlled assertion summaries can persist diagnostic text into durable Lab artifacts, and a recent change demoted connect to such that bare single-label destinations like connect to gateway failed could be stored unredacted.
  • The intent of this change is to preserve natural-language prose while closing the narrow leakage case where an immediately following network-failure term makes a bare name unambiguous as a destination.

Description

  • Update src/lab/artifacts/sanitize.ts to detect when a connect to / connecting to marker is immediately followed by a failure term (e.g. failed, timed out, refused) and redact the bare target token as [host] while leaving ordinary connective prose intact.
  • Add and adjust regression tests in tests/lab-evidence-sanitization.test.ts to assert that connect to gateway failed and connecting to redis timed out are redacted, while Unable to connect to your account and other prose remain unchanged.
  • Update structure/09_compatibility-lab.md to document the adjusted behavior in the Known limits section and describe the refined connect to handling.
  • Commit message: fix(lab): redact bare connect-to failure destinations.

Testing

  • bun run typecheck completed successfully.
  • bun run privacy:scan completed successfully.
  • git diff --check produced no problems.
  • OCX_TEST_NO_QUEUE=1 bun run test -- tests/lab-evidence-sanitization.test.ts passed, including the new regression cases verifying connect-to failure redaction and prose preservation.
  • bun run test (full suite) was run and progressed, but reported two failing tests unrelated to the sanitizer changes (live-result trusted-receipt assertions and a root-owned EACCES assertion that is environment-specific), so the full-suite run did not finish green in this environment.

Codex Task

@github-actions

Copy link
Copy Markdown

Deterministic PR hygiene checks passed.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@luvs01, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 32 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 09a23258-f15c-4c59-b114-3b8e19ba9e0f

📥 Commits

Reviewing files that changed from the base of the PR and between 6d881db and c01625d.

📒 Files selected for processing (3)
  • src/lab/artifacts/sanitize.ts
  • structure/09_compatibility-lab.md
  • tests/lab-evidence-sanitization.test.ts

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the bug Something isn't working label Aug 11, 2026
@github-actions github-actions Bot changed the title fix(lab): redact bare connect-to failure destinations [WRONG BRANCH] fix(lab): redact bare connect-to failure destinations Aug 11, 2026
@github-actions

Copy link
Copy Markdown

⏳ DRAFT

  • wrong target branch (main); retarget to dev.

What to do

  • Retarget this PR to dev — all contributions go to dev.

Its title has been prefixed with [WRONG BRANCH].
This pull request is being kept as a draft automatically. Once every issue above is resolved, it will be marked ready for review again.

@github-actions
github-actions Bot marked this pull request as draft August 11, 2026 00:51

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c01625daa6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

? tail.match(/^([A-Za-z][A-Za-z0-9]{0,254})\s+(?:failed|refused|unreachable|reset|timed\s+out)\b/i)
: null;
if (failedConnectTarget?.[1]) {
return m.replace(failedConnectTarget[1], "[host]");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Replace the destination occurrence within the captured tail

For a valid bare destination whose label also occurs earlier in the marker—for example, connect to connect failed or connect to con failedString.replace rewrites the first occurrence in all of m, producing output such as [host] to connect failed and leaving the actual destination in the durable Lab text. Replace at the captured tail's offset, and add a repeated-label regression case, so the destination occurrence itself is always redacted.

Useful? React with 👍 / 👎.

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

Labels

aardvark bug Something isn't working codex

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant