Repository navigation
fix: follow-ups from the v2.4.0 release review - #352
Conversation
Qodo review of #351: - Plugin agents keep skills that were installed under a prefix after a name clash (they referenced the old id and dropped the skill). - A plugin that fails part-way releases the skill names it claimed, so a later plugin keeps the plain name. - A lockfile pin must be a hex commit SHA (7 to 40 characters); a branch or tag there would float. - A legacy plaintext secret that merely starts with enc:v1: is encrypted on open; only a well-formed envelope is treated as ciphertext and left untouched when it doesn't decrypt. - Search explains a missing tool name with the server's expose policy, sharing exposurePolicyReason with the unknown-tool error. - MCP env redaction also blanks token-only URL userinfo, credential parameters in query and connection strings, and base64-style secrets with / or +.
PR Summary by QodoFix v2.4.0 plugin, security, and MCP review findings
AI Description
Diagram
High-Level Assessment
Files changed (11)
|
Code Review by Qodo
1.
|
Qodo review of #352: - An encrypted empty secret is only IV + tag (28 bytes); requiring 29 made the migration encrypt it again and reads return ciphertext. - Redaction: URL userinfo is a credential only as user:pass@ or a long mixed token (so ssh://git@github.com stays visible), and a base64-style value needs + or = or the 40 characters of an AWS secret key (so relative paths stay visible). - A failed plugin restores the skill-claim snapshot taken before it instead of deleting claims by install id, which another entry may share. - Sub-agent search judges "callable elsewhere" by the tools the caller can see. - buildSearchPayload takes hidden and note separately instead of checking a message prefix. - Doc comments sit above their own functions again.
Token-only URL userinfo counts at 16+ characters, letters only included. Base64-style values are told apart from relative paths by Shannon entropy instead of requiring + / = or exactly 40 characters.
The entropy check alone let low-entropy AWS-style keys through. The fixtures named *_TOKEN / *_SECRET were blanked by name before the value rules ran, so the tests did not cover them.
Redaction: keep the 40-character key rule, test value rules directly
Redaction: letter-only URL tokens and unpadded base64 secrets
fix: second round of v2.4.0 release review follow-ups
Summary
Follow-ups to Qodo's review of the v2.4.0 release PR (#351). All six comments were checked against the code. Five are fixed as suggested; the sixth (redaction) is fixed in a narrower way that keeps #349's behavior.
What changed
Plugin agents keep renamed skills (
plugin-install.ts): when a skill is installed under a prefix after a name clash, the plugin's sub-agents that use it now reference the new id (paad-handoff) instead of silently dropping it.A failed plugin releases its skill names (
plugin-install.ts): the per-plugin rollback removes that plugin's claims, so a later plugin with the same skill keeps the plain name.Lockfile pins must be commit SHAs (
mirror.ts): a pin fromcapabilities.lockthat isn't a hex SHA (7 to 40 characters) fails with an error naming the fix. A branch or tag there would otherwise float. Abbreviated SHAs from a hand-edited lockfile still work, as an existing test requires.Legacy plaintext that looks like ciphertext is encrypted (
secret-crypto.ts): a value starting withenc:v1:is only treated as ciphertext when the rest is valid base64, long enough for the IV, auth tag and data. Anything else is legacy plaintext and is encrypted on the next database open. Well-formed ciphertext that doesn't decrypt is still left untouched (Secret migration re-encrypts values it can't decrypt, turning a wrong master key into permanent loss #305).Search says why a named tool is missing (
mcp-handler.ts,mcp-tool-defaults.ts): theexposepolicy check from the unknown-tool error is now a sharedexposurePolicyReason.expose: exceptlist gets the same explanation in search as incall_tool.exactlyornone, search adds the policy as a note.MCP env redaction catches more credential shapes (
secret-redaction.ts, from fix: show MCP env placeholders and plain literals in the project API #350):https://TOKEN@host);password=,pwd=,token=,sig=, ...);/or+, such as AWS secret keys.Paths and ordinary URLs (
?region=eu) still show. Qodo also suggested hiding every literal by default; that would undo [Bug] Project API/UI shows empty MCP server env strings while secrets resolve at spawn #349, which asked for plain config values likeREA_ANALYSIS_PROVIDER: ghidrato be visible, so literals are still shown unless their name or value reads as a credential.Test plan
skills: [handoff]in the second plugin ends up withpaad-handoff.resolveRefrejects pinsmainandv1.0.0; the existing short-SHA test still passes.enc:v1:not-really-ciphertextvalue is encrypted on open and still reads back unchanged; the wrong-key test still keeps values byte-identical.except-hidden name gets theexceptexplanation, anexactlyserver adds its note, and an unknown name keeps the plain message.password=, token userinfo, ADO-stylePwd=, and an AWS-style secret are blanked; a URL with?region=euand anode_modulespath are shown.bunx tsc --noEmit; CLI, DB, server and shared suites have no assertion failures (Windows EBUSY cleanup and symlink EPERM only).Checklist
bunx tsc --noEmitpasses🤖 Generated with Claude Code