fix(skills): resolve skills info name mismatches#38713
Conversation
Greptile SummaryThis PR fixes a real-world UX bug (#38546) where skills visible in Key changes:
The implementation is clean, Confidence Score: 5/5
Last reviewed commit: 1bc7808 |
f2aa660 to
749928c
Compare
749928c to
1dbe490
Compare
🔒 Aisle Security AnalysisWe found 2 potential security issue(s) in this PR:
1. 🟡 Ambiguous case-insensitive skill name resolution can select wrong skill and misattribute API-key/config guidance
Description
Security impact depends on whether the skill catalog can include attacker-controlled entries (e.g., skills installed into the workspace/managed skills directory from external sources such as a registry):
Unlike the normalized-match branch, this case-insensitive branch does not check for multiple matches and therefore can silently pick an unintended skill. RecommendationTreat case-insensitive matches the same way as normalized matches: collect all matches and require exactly one match. Example fix: const lower = raw.toLowerCase();
const ciMatches = report.skills.filter(
(s) => s.name.toLowerCase() === lower || s.skillKey.toLowerCase() === lower,
);
if (ciMatches.length === 1) return ciMatches[0];
if (ciMatches.length > 1) return null; // or surface an explicit "ambiguous" error listing candidatesAdditionally, consider surfacing an "ambiguous skill" error that lists the colliding skill names/keys so the user can disambiguate by using the exact 2. 🔵 Prototype manipulation via __proto__/constructor keys in sanitizeJsonValue Object.fromEntries
Description
Impact in this CLI context:
Vulnerable code: return Object.fromEntries(
Object.entries(value).map(([key, entryValue]) => [key, sanitizeJsonValue(entryValue)]),
);While this may not pollute RecommendationAvoid Example fix: const DANGEROUS_KEYS = new Set(["__proto__", "prototype", "constructor"]);
function sanitizeJsonValue(value: unknown): unknown {
if (typeof value === "string") return sanitizeJsonString(value);
if (Array.isArray(value)) return value.map(sanitizeJsonValue);
if (value && typeof value === "object") {
const out: Record<string, unknown> = Object.create(null);
for (const [key, entryValue] of Object.entries(value)) {
if (DANGEROUS_KEYS.has(key)) continue; // or out[`_${key}`] = ...
out[key] = sanitizeJsonValue(entryValue);
}
return out;
}
return value;
}If keys can be user-controlled, consider sanitizing keys as well (e.g., stripping control chars) to prevent downstream confusion. Analyzed PR: #38713 at commit Last updated on: 2026-04-14T02:58:54Z |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 132de0eff6
ℹ️ 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".
|
This pull request has been automatically marked as stale due to inactivity. |
|
Keeping this PR active.\n\nCurrent head status:\n- Existing CI suite on the PR head commit is green\n- Mergeable: yes\n- The only currently pending check is the new auto-response workflow that started after the stale marker\n\nIf you want this refreshed further (rebase/split/follow-up changes), I can do that next. |
|
Codex review: passed. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
Summary Reproducibility: yes. by source inspection. The documented PR rating What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. PR egg Rarity: 🥚 common. What is this egg doing here?
Real behavior proof Next step before merge Security Review detailsBest possible solution: Land the focused formatter and regression-test fix; treat the broader agent activation symptom from the linked report as a separate follow-up only if it still reproduces after this lookup fix. Do we have a high-confidence way to reproduce the issue? Yes, by source inspection. The documented Is this the best way to solve the issue? Yes. The PR keeps exact matches authoritative and only accepts non-exact fallback matches when they are unique, which is narrower and safer than broad fuzzy matching or a new config surface. Label justifications:
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 1fbb4e4e6a9e. |
|
Thanks, re-verified against current main and this PR head before acting:
|
|
Re-verified this against the current refs before acting:
So I have not pushed yet, because I do not want to claim a clean branch gate when the current tree is red for unrelated reasons. Keeping this PR open. |
|
Rechecked this after the latest clawsweeper follow-up.
So I have not pushed yet. Keeping this PR open as the focused fix, with the ambiguity follow-up ready once the broader gate noise is out of the way. |
|
Addressed the requested PR-branch repair in What changed:
Verification:
I also reran the local quality gate in a clean worktree. |
502a8e1 to
c2345f0
Compare
|
Rebased onto current Local verification on the rebased branch:
GitHub now shows the PR as mergeable again, and fresh CI has started on |
|
Rechecked the current PR head (
So there is no additional changelog-placement follow-up left for me to push on top of this head. Keeping the PR ready for merge. |
|
Added the requested real behavior proof to the PR body. What changed:
Verification:
No code changes were needed for this follow-up; this was the missing proof artifact requested by ClawSweeper. |
c2345f0 to
7bf36e0
Compare
|
Re-verified after the 03:32 UTC ClawSweeper/Codex refresh. No code changes were needed on the branch. Verification:
This remains ready for maintainer review. |
|
Re-verified after the 05:19 UTC ClawSweeper/Codex refresh. No code or PR-body change was needed on the branch. Verification:
This remains ready for maintainer review. |
|
Re-verified after the latest ClawSweeper/Codex refresh. No code or PR-body change was needed on the branch. Verification:
This remains ready from the contributor side for maintainer review. |
|
Re-verified after the 15:10 UTC ClawSweeper/Codex refresh. No code or PR-body change was needed on the branch. Verification:
This remains ready from the contributor side for maintainer review. |
|
Thanks for the verification. I re-checked the current PR state and there is nothing to change from my side right now: head I will avoid branch churn unless a maintainer with merge permissions asks for a specific change. |
|
@clawsweeper automerge |
|
🦞✅ Source: What merged:
Automerge notes:
The automerge loop is complete. Automerge progress:
|
Summary: - The PR updates the skills CLI formatter, tests, and changelog so `skills info` resolves case-insensitive and ... ator-normalized skill name variants only when non-exact matches are unique, and sanitizes not-found output. - Reproducibility: yes. by source inspection. The documented `openclaw skills info <name>` command passes the ... ormatter lookup on current main, while skill status entries can have distinct `name` and `skillKey` values. Automerge notes: - PR branch already contained follow-up commit before automerge: test(skills): exercise case-insensitive lookup branch - PR branch already contained follow-up commit before automerge: style(skills): format lookup resolver signature - PR branch already contained follow-up commit before automerge: fix(skills): sanitize not-found output and avoid ambiguous lookup mat… - PR branch already contained follow-up commit before automerge: fix(skills): require unique case-insensitive info matches Validation: - ClawSweeper review passed for head 01f3e2d4680ff4baaef9d780bc900ef12d01e338. - Required merge gates passed before the squash merge. Prepared head SHA: 01f3e2d4680ff4baaef9d780bc900ef12d01e338 Review: openclaw/openclaw#38713 (comment) Co-authored-by: NewdlDewdl <rohin.agrawal@gmail.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Summary: - The PR updates the skills CLI formatter, tests, and changelog so `skills info` resolves case-insensitive and ... ator-normalized skill name variants only when non-exact matches are unique, and sanitizes not-found output. - Reproducibility: yes. by source inspection. The documented `openclaw skills info <name>` command passes the ... ormatter lookup on current main, while skill status entries can have distinct `name` and `skillKey` values. Automerge notes: - PR branch already contained follow-up commit before automerge: test(skills): exercise case-insensitive lookup branch - PR branch already contained follow-up commit before automerge: style(skills): format lookup resolver signature - PR branch already contained follow-up commit before automerge: fix(skills): sanitize not-found output and avoid ambiguous lookup mat… - PR branch already contained follow-up commit before automerge: fix(skills): require unique case-insensitive info matches Validation: - ClawSweeper review passed for head 01f3e2d4680ff4baaef9d780bc900ef12d01e338. - Required merge gates passed before the squash merge. Prepared head SHA: 01f3e2d4680ff4baaef9d780bc900ef12d01e338 Review: openclaw/openclaw#38713 (comment) Co-authored-by: NewdlDewdl <rohin.agrawal@gmail.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Summary: - The PR updates the skills CLI formatter, tests, and changelog so `skills info` resolves case-insensitive and ... ator-normalized skill name variants only when non-exact matches are unique, and sanitizes not-found output. - Reproducibility: yes. by source inspection. The documented `openclaw skills info <name>` command passes the ... ormatter lookup on current main, while skill status entries can have distinct `name` and `skillKey` values. Automerge notes: - PR branch already contained follow-up commit before automerge: test(skills): exercise case-insensitive lookup branch - PR branch already contained follow-up commit before automerge: style(skills): format lookup resolver signature - PR branch already contained follow-up commit before automerge: fix(skills): sanitize not-found output and avoid ambiguous lookup mat… - PR branch already contained follow-up commit before automerge: fix(skills): require unique case-insensitive info matches Validation: - ClawSweeper review passed for head 01f3e2d. - Required merge gates passed before the squash merge. Prepared head SHA: 01f3e2d Review: openclaw#38713 (comment) Co-authored-by: NewdlDewdl <rohin.agrawal@gmail.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Summary: - The PR updates the skills CLI formatter, tests, and changelog so `skills info` resolves case-insensitive and ... ator-normalized skill name variants only when non-exact matches are unique, and sanitizes not-found output. - Reproducibility: yes. by source inspection. The documented `openclaw skills info <name>` command passes the ... ormatter lookup on current main, while skill status entries can have distinct `name` and `skillKey` values. Automerge notes: - PR branch already contained follow-up commit before automerge: test(skills): exercise case-insensitive lookup branch - PR branch already contained follow-up commit before automerge: style(skills): format lookup resolver signature - PR branch already contained follow-up commit before automerge: fix(skills): sanitize not-found output and avoid ambiguous lookup mat… - PR branch already contained follow-up commit before automerge: fix(skills): require unique case-insensitive info matches Validation: - ClawSweeper review passed for head 01f3e2d. - Required merge gates passed before the squash merge. Prepared head SHA: 01f3e2d Review: openclaw#38713 (comment) Co-authored-by: NewdlDewdl <rohin.agrawal@gmail.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Summary: - The PR updates the skills CLI formatter, tests, and changelog so `skills info` resolves case-insensitive and ... ator-normalized skill name variants only when non-exact matches are unique, and sanitizes not-found output. - Reproducibility: yes. by source inspection. The documented `openclaw skills info <name>` command passes the ... ormatter lookup on current main, while skill status entries can have distinct `name` and `skillKey` values. Automerge notes: - PR branch already contained follow-up commit before automerge: test(skills): exercise case-insensitive lookup branch - PR branch already contained follow-up commit before automerge: style(skills): format lookup resolver signature - PR branch already contained follow-up commit before automerge: fix(skills): sanitize not-found output and avoid ambiguous lookup mat… - PR branch already contained follow-up commit before automerge: fix(skills): require unique case-insensitive info matches Validation: - ClawSweeper review passed for head 01f3e2d. - Required merge gates passed before the squash merge. Prepared head SHA: 01f3e2d Review: openclaw#38713 (comment) Co-authored-by: NewdlDewdl <rohin.agrawal@gmail.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Summary: - The PR updates the skills CLI formatter, tests, and changelog so `skills info` resolves case-insensitive and ... ator-normalized skill name variants only when non-exact matches are unique, and sanitizes not-found output. - Reproducibility: yes. by source inspection. The documented `openclaw skills info <name>` command passes the ... ormatter lookup on current main, while skill status entries can have distinct `name` and `skillKey` values. Automerge notes: - PR branch already contained follow-up commit before automerge: test(skills): exercise case-insensitive lookup branch - PR branch already contained follow-up commit before automerge: style(skills): format lookup resolver signature - PR branch already contained follow-up commit before automerge: fix(skills): sanitize not-found output and avoid ambiguous lookup mat… - PR branch already contained follow-up commit before automerge: fix(skills): require unique case-insensitive info matches Validation: - ClawSweeper review passed for head 01f3e2d. - Required merge gates passed before the squash merge. Prepared head SHA: 01f3e2d Review: openclaw#38713 (comment) Co-authored-by: NewdlDewdl <rohin.agrawal@gmail.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Summary: - The PR updates the skills CLI formatter, tests, and changelog so `skills info` resolves case-insensitive and ... ator-normalized skill name variants only when non-exact matches are unique, and sanitizes not-found output. - Reproducibility: yes. by source inspection. The documented `openclaw skills info <name>` command passes the ... ormatter lookup on current main, while skill status entries can have distinct `name` and `skillKey` values. Automerge notes: - PR branch already contained follow-up commit before automerge: test(skills): exercise case-insensitive lookup branch - PR branch already contained follow-up commit before automerge: style(skills): format lookup resolver signature - PR branch already contained follow-up commit before automerge: fix(skills): sanitize not-found output and avoid ambiguous lookup mat… - PR branch already contained follow-up commit before automerge: fix(skills): require unique case-insensitive info matches Validation: - ClawSweeper review passed for head 01f3e2d. - Required merge gates passed before the squash merge. Prepared head SHA: 01f3e2d Review: openclaw#38713 (comment) Co-authored-by: NewdlDewdl <rohin.agrawal@gmail.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Summary: - The PR updates the skills CLI formatter, tests, and changelog so `skills info` resolves case-insensitive and ... ator-normalized skill name variants only when non-exact matches are unique, and sanitizes not-found output. - Reproducibility: yes. by source inspection. The documented `openclaw skills info <name>` command passes the ... ormatter lookup on current main, while skill status entries can have distinct `name` and `skillKey` values. Automerge notes: - PR branch already contained follow-up commit before automerge: test(skills): exercise case-insensitive lookup branch - PR branch already contained follow-up commit before automerge: style(skills): format lookup resolver signature - PR branch already contained follow-up commit before automerge: fix(skills): sanitize not-found output and avoid ambiguous lookup mat… - PR branch already contained follow-up commit before automerge: fix(skills): require unique case-insensitive info matches Validation: - ClawSweeper review passed for head 01f3e2d. - Required merge gates passed before the squash merge. Prepared head SHA: 01f3e2d Review: openclaw#38713 (comment) Co-authored-by: NewdlDewdl <rohin.agrawal@gmail.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Summary: - The PR updates the skills CLI formatter, tests, and changelog so `skills info` resolves case-insensitive and ... ator-normalized skill name variants only when non-exact matches are unique, and sanitizes not-found output. - Reproducibility: yes. by source inspection. The documented `openclaw skills info <name>` command passes the ... ormatter lookup on current main, while skill status entries can have distinct `name` and `skillKey` values. Automerge notes: - PR branch already contained follow-up commit before automerge: test(skills): exercise case-insensitive lookup branch - PR branch already contained follow-up commit before automerge: style(skills): format lookup resolver signature - PR branch already contained follow-up commit before automerge: fix(skills): sanitize not-found output and avoid ambiguous lookup mat… - PR branch already contained follow-up commit before automerge: fix(skills): require unique case-insensitive info matches Validation: - ClawSweeper review passed for head 01f3e2d. - Required merge gates passed before the squash merge. Prepared head SHA: 01f3e2d Review: openclaw#38713 (comment) Co-authored-by: NewdlDewdl <rohin.agrawal@gmail.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Summary: - The PR updates the skills CLI formatter, tests, and changelog so `skills info` resolves case-insensitive and ... ator-normalized skill name variants only when non-exact matches are unique, and sanitizes not-found output. - Reproducibility: yes. by source inspection. The documented `openclaw skills info <name>` command passes the ... ormatter lookup on current main, while skill status entries can have distinct `name` and `skillKey` values. Automerge notes: - PR branch already contained follow-up commit before automerge: test(skills): exercise case-insensitive lookup branch - PR branch already contained follow-up commit before automerge: style(skills): format lookup resolver signature - PR branch already contained follow-up commit before automerge: fix(skills): sanitize not-found output and avoid ambiguous lookup mat… - PR branch already contained follow-up commit before automerge: fix(skills): require unique case-insensitive info matches Validation: - ClawSweeper review passed for head 01f3e2d. - Required merge gates passed before the squash merge. Prepared head SHA: 01f3e2d Review: openclaw#38713 (comment) Co-authored-by: NewdlDewdl <rohin.agrawal@gmail.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Summary: - The PR updates the skills CLI formatter, tests, and changelog so `skills info` resolves case-insensitive and ... ator-normalized skill name variants only when non-exact matches are unique, and sanitizes not-found output. - Reproducibility: yes. by source inspection. The documented `openclaw skills info <name>` command passes the ... ormatter lookup on current main, while skill status entries can have distinct `name` and `skillKey` values. Automerge notes: - PR branch already contained follow-up commit before automerge: test(skills): exercise case-insensitive lookup branch - PR branch already contained follow-up commit before automerge: style(skills): format lookup resolver signature - PR branch already contained follow-up commit before automerge: fix(skills): sanitize not-found output and avoid ambiguous lookup mat… - PR branch already contained follow-up commit before automerge: fix(skills): require unique case-insensitive info matches Validation: - ClawSweeper review passed for head 01f3e2d. - Required merge gates passed before the squash merge. Prepared head SHA: 01f3e2d Review: openclaw#38713 (comment) Co-authored-by: NewdlDewdl <rohin.agrawal@gmail.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Summary: - The PR updates the skills CLI formatter, tests, and changelog so `skills info` resolves case-insensitive and ... ator-normalized skill name variants only when non-exact matches are unique, and sanitizes not-found output. - Reproducibility: yes. by source inspection. The documented `openclaw skills info <name>` command passes the ... ormatter lookup on current main, while skill status entries can have distinct `name` and `skillKey` values. Automerge notes: - PR branch already contained follow-up commit before automerge: test(skills): exercise case-insensitive lookup branch - PR branch already contained follow-up commit before automerge: style(skills): format lookup resolver signature - PR branch already contained follow-up commit before automerge: fix(skills): sanitize not-found output and avoid ambiguous lookup mat… - PR branch already contained follow-up commit before automerge: fix(skills): require unique case-insensitive info matches Validation: - ClawSweeper review passed for head 01f3e2d. - Required merge gates passed before the squash merge. Prepared head SHA: 01f3e2d Review: openclaw#38713 (comment) Co-authored-by: NewdlDewdl <rohin.agrawal@gmail.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Summary: - The PR updates the skills CLI formatter, tests, and changelog so `skills info` resolves case-insensitive and ... ator-normalized skill name variants only when non-exact matches are unique, and sanitizes not-found output. - Reproducibility: yes. by source inspection. The documented `openclaw skills info <name>` command passes the ... ormatter lookup on current main, while skill status entries can have distinct `name` and `skillKey` values. Automerge notes: - PR branch already contained follow-up commit before automerge: test(skills): exercise case-insensitive lookup branch - PR branch already contained follow-up commit before automerge: style(skills): format lookup resolver signature - PR branch already contained follow-up commit before automerge: fix(skills): sanitize not-found output and avoid ambiguous lookup mat… - PR branch already contained follow-up commit before automerge: fix(skills): require unique case-insensitive info matches Validation: - ClawSweeper review passed for head 01f3e2d. - Required merge gates passed before the squash merge. Prepared head SHA: 01f3e2d Review: openclaw#38713 (comment) Co-authored-by: NewdlDewdl <rohin.agrawal@gmail.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Summary
openclaw skills info <name>resolve skills using exact, case-insensitive, and separator-normalized matchingWhy
Fixes #38546 where skills can show as ready in
skills listbut fail lookup inskills infodue strict identifier matching.Supersedes #38701, which was auto-closed by queue-limit automation while active PR count was over threshold.
Real behavior proof
openclaw skills info <name>now resolves list-visible skills when the requested token differs only by case or common separators, while ambiguous fallback matches return not-found rather than choosing the wrong skill.skills infocommand path through a temporary local behavior-proof harness withpnpm test src/cli/skills-cli.behavior-proof.temp.test.ts --reporter=verbose, which invokedopenclaw skills info excel-xlsxagainst redacted fixture variants.Testing
pnpm buildpnpm test src/cli/skills-cli.test.tspnpm exec oxlint src/cli/skills-cli.format.ts src/cli/skills-cli.test.tsAI-assisted disclosure