fix: redact credentials in browser.cdpUrl config paths#67679
fix: redact credentials in browser.cdpUrl config paths#67679hxy91819 merged 12 commits intoopenclaw:mainfrom
Conversation
Greptile SummaryAdds Confidence Score: 5/5Safe to merge; the fix is minimal and well-tested with one minor style issue in CHANGELOG ordering. All findings are P2 (changelog placement); no logic, security, or correctness issues found in the implementation or tests. CHANGELOG.md (entry ordering only) Prompt To Fix All With AIThis is a comment left during a code review.
Path: CHANGELOG.md
Line: 13
Comment:
**Changelog entry placed at top of section**
Per the repo convention, new entries should be appended to the *end* of the target `### Fixes` section, not inserted at the top. All the existing lines below (Gateway/tools, Agents/replay, …) were already present before this PR. Move the new bullet to after the last existing entry in `### Fixes`.
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "docs: add CHANGELOG entry for cdpUrl con..." | Re-trigger Greptile |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b3104ed993
ℹ️ 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".
b3104ed to
bf82c72
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
Verified that
So credentials embedded in cdpUrl are transmitted on every connection attempt, making the redact fix genuinely necessary. |
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
c450c70 to
dc4e9ef
Compare
dc4e9ef to
26431df
Compare
Browser CDP URLs (browser.cdpUrl, browser.profiles.*.cdpUrl) can embed credentials via query tokens (?token=xxx) or HTTP Basic auth (user:pass@host). Add .cdpUrl suffix to isSensitiveUrlConfigPath() so these paths are correctly redacted in config.get responses. Refs openclaw#67656, openclaw#53433
Cover three scenarios: - browser.cdpUrl with query token and HTTP Basic auth credentials - browser.profiles.*.cdpUrl with per-profile credentials - bare cdpUrl addresses without credentials remain unchanged Refs openclaw#67656, openclaw#53433
6b75f91 to
a7ce1c3
Compare
|
Merged via squash.
Thanks @Ziy1-Tan! |
PR openclaw#67679 landed a duplicate line under ### Changes in the Unreleased block in addition to the detailed entry that was already present under ### Fixes. The short ### Changes line (auto-generated from the PR title during merge) is a duplicate of the same PR's ### Fixes line and also mis-categorizes a security redaction fix as a feature change. Remove the duplicate and keep the ### Fixes entry, which is the right section and carries the descriptive text.
PR #67679 landed a duplicate line under ### Changes in the Unreleased block in addition to the detailed entry that was already present under ### Fixes. The short ### Changes line (auto-generated from the PR title during merge) is a duplicate of the same PR's ### Fixes line and also mis-categorizes a security redaction fix as a feature change. Remove the duplicate and keep the ### Fixes entry, which is the right section and carries the descriptive text.
Two related gaps in the CHANGELOG write path both caused PRs to land in the wrong place: 1) `resolve_merge_changelog_section` only consulted the environment override and PR labels. If a PR was only tagged with something like `size: S` (no `bug`/`fix`/`feature` label), the default fell through to Changes even when the PR title made the category obvious (e.g. `fix(cron): clean up deleteAfterRun direct deliveries` on PR openclaw#67807). That Conventional-Commits prefix is the repo's actual classification signal for most PRs and was being ignored. Add a title-prefix fallback after the label check: a title starting with `fix`, `bugfix`, or `hotfix` (followed by `(`, `:`, `!`, or whitespace) routes to Fixes; `feat`, `feature`, `enhance` route to Changes. Labels still win when present. Deliberately strict so `fixup!`, `fixing ...`, `fixture updates`, `featured posts` are not misread as `fix:`/`feat:`. 2) `appendUnreleasedChangelogEntry` deduped only on full-text equivalence. When a PR had a detailed entry written during prepare and then the merge step called `ensure_pr_changelog_entry` again with the short PR-title form, the two text bodies differed and the same PR got a duplicate line — that is what happened to PR openclaw#67679, which ended up with lines under both `### Changes` and `### Fixes`. Add a stronger precheck: scan the `## Unreleased` block for any existing bullet whose first PR reference matches the new entry's PR number. If one exists anywhere in the block (any sub-section), skip insertion. Dedup is scoped to Unreleased so the same PR number in a released block does not suppress a new Unreleased entry, and uses integer-equality on the PR number so `openclaw#67` is not shadowed by `openclaw#6767`. Together these two changes cover both of the recently observed failure modes: - Missing section signal from labels (PR openclaw#67807) is now picked up from the title. - Second ensure at merge time (PR openclaw#67679) no longer plants a duplicate in a different sub-section. Covered by shell smoke (27 resolver scenarios) and vitest (12 cases incl. the openclaw#67679 cross-section regression, released-block false positive, and PR-number prefix collision).
PR openclaw#67679 landed a duplicate line under ### Changes in the Unreleased block in addition to the detailed entry that was already present under ### Fixes. The short ### Changes line (auto-generated from the PR title during merge) is a duplicate of the same PR's ### Fixes line and also mis-categorizes a security redaction fix as a feature change. Remove the duplicate and keep the ### Fixes entry, which is the right section and carries the descriptive text.
PR openclaw#67679 landed a duplicate line under ### Changes in the Unreleased block in addition to the detailed entry that was already present under ### Fixes. The short ### Changes line (auto-generated from the PR title during merge) is a duplicate of the same PR's ### Fixes line and also mis-categorizes a security redaction fix as a feature change. Remove the duplicate and keep the ### Fixes entry, which is the right section and carries the descriptive text.
PR openclaw#67679 landed a duplicate line under ### Changes in the Unreleased block in addition to the detailed entry that was already present under ### Fixes. The short ### Changes line (auto-generated from the PR title during merge) is a duplicate of the same PR's ### Fixes line and also mis-categorizes a security redaction fix as a feature change. Remove the duplicate and keep the ### Fixes entry, which is the right section and carries the descriptive text.
PR openclaw#67679 landed a duplicate line under ### Changes in the Unreleased block in addition to the detailed entry that was already present under ### Fixes. The short ### Changes line (auto-generated from the PR title during merge) is a duplicate of the same PR's ### Fixes line and also mis-categorizes a security redaction fix as a feature change. Remove the duplicate and keep the ### Fixes entry, which is the right section and carries the descriptive text.
PR openclaw#67679 landed a duplicate line under ### Changes in the Unreleased block in addition to the detailed entry that was already present under ### Fixes. The short ### Changes line (auto-generated from the PR title during merge) is a duplicate of the same PR's ### Fixes line and also mis-categorizes a security redaction fix as a feature change. Remove the duplicate and keep the ### Fixes entry, which is the right section and carries the descriptive text.
What
Add
browser.cdpUrlandbrowser.profiles.*.cdpUrlto the set of config paths recognized as sensitive URLs, so embedded credentials (query tokens like?token=xxxand HTTP Basic authuser:pass@host) are properly redacted inconfig.getAPI responses.Also regenerate the base schema artifact so shipped
uiHintsstay aligned with the updated sensitive-URL matcher and continue to expose the correcturl-secretmetadata for the newcdpUrlpaths.Why
Browser CDP URLs can embed authentication credentials in two documented formats:
https://chrome.browserless.io?token=<secret>https://user:pass@chrome.example.comThese paths bypassed all three redaction gates:
.register(sensitive)— not registered/token$/i,/api.?key$/i, …) —cdpUrldoes not match.baseUrl,.httpUrl,mcp.servers.*.url) —.cdpUrlwas not listedFixes #67656.
Changes
src/shared/net/redact-sensitive-url.ts— Add.cdpUrlsuffix check toisSensitiveUrlConfigPath()(3 lines)src/shared/net/redact-sensitive-url.test.ts— Unit tests forisSensitiveUrlConfigPath()with cdpUrl pathssrc/config/redact-snapshot.test.ts— Snapshot redact/restore round-trip tests covering:browser.cdpUrlwith query token + HTTP Basic authbrowser.profiles.*.cdpUrlwith per-profile credentialssrc/config/schema.base.generated.ts— Regenerated the base schema artifact so shippeduiHintsincludeurl-secretmetadata forbrowser.cdpUrlandbrowser.profiles.*.cdpUrlTesting
pnpm build✅pnpm check✅node --import tsx scripts/generate-base-config-schema.ts --check✅fully testedisSensitiveUrlConfigPath()recognizes.cdpUrlbrowser.cdpUrlcredentialsbrowser.profiles.*.cdpUrlcredentialsurl-secrettag on both cdpUrl paths--checkpasses after regenerationAI Disclosure
This PR was AI-assisted (CodeBuddy / Claude). All code has been reviewed and understood by the author. Tests were written in TDD style (failing test first, then minimal implementation).