Repository navigation
fix(sdk): keep credentials private in storage and logs - #4318
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
The Please review and fix the vulnerabilities. You can try running: pnpm audit --fix --prodAudit output |
Preview this PR's installerThe hermetic install E2E suite passed for this commit. These commands run the PR's installer scripts against the latest published CLI release — they preview installer behavior, not unreleased binaries. curl -fsSL "https://raw.githubusercontent.com/ComposioHQ/composio/99cd71903e08def1714bec6d2cf13cce2fea484f/install.sh" | sh
curl -fsSL "https://raw.githubusercontent.com/ComposioHQ/composio/99cd71903e08def1714bec6d2cf13cce2fea484f/install.sh" | COMPOSIO_INSTALL_SHELL=none shThe first command is the default flow: it installs the CLI and configures your shell automatically. The second installs only, without touching shell startup files. Shell-specific setup routes (the override points the variant at this PR's base installer): curl -fsSL "https://raw.githubusercontent.com/ComposioHQ/composio/99cd71903e08def1714bec6d2cf13cce2fea484f/install/bash.sh" | COMPOSIO_INSTALL_SCRIPT_URL="https://raw.githubusercontent.com/ComposioHQ/composio/99cd71903e08def1714bec6d2cf13cce2fea484f/install.sh" sh
curl -fsSL "https://raw.githubusercontent.com/ComposioHQ/composio/99cd71903e08def1714bec6d2cf13cce2fea484f/install/zsh.sh" | COMPOSIO_INSTALL_SCRIPT_URL="https://raw.githubusercontent.com/ComposioHQ/composio/99cd71903e08def1714bec6d2cf13cce2fea484f/install.sh" sh
curl -fsSL "https://raw.githubusercontent.com/ComposioHQ/composio/99cd71903e08def1714bec6d2cf13cce2fea484f/install/fish.sh" | COMPOSIO_INSTALL_SCRIPT_URL="https://raw.githubusercontent.com/ComposioHQ/composio/99cd71903e08def1714bec6d2cf13cce2fea484f/install.sh" sh |
3b3a9d3 to
9e12619
Compare
9e12619 to
581d4f8
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 7c23bc4. Configure here.
Make legacy permission repair best-effort and cover chmod failures with a filesystem fixture. Refs #4318
Create random staging files exclusively, retry collisions without touching pre-existing paths, and cover the collision path with a filesystem fixture. Refs #4318
Redact Python logging metadata, retain sanitized exception records, align the auth alias, and cover quoted multiword secrets in both SDKs. Refs #4318
Handle cyclic, deeply nested, and oversized logging metadata without recursion failures or unbounded traversal. Refs #4318
BaseException.add_note only exists on Python 3.11+, so the redaction test failed on the 3.10 CI matrix. Assign __notes__ directly, which is what the traceback module reads on every supported version. Claude-Session: https://claude.ai/code/session_01Y7Ni3QEBDGShSrEtwQS5bA

Summary
0600helper0644credential files created by older CLI versions before reading themauthresponses and exception tracebacksLocal reproduction
Under the normal
022umask,nextcreated a plaintext credential file with mode0644. The pre-fix CLI user-context and TypeScript SDK debug paths also emitted sentinel credentials. The private atomic writer changes an existing0644target to0600, and the upgrade tests now prove all three legacy credential files are tightened without changing their contents.Verification
git diff --checkpassedThe focused CLI runner needed a temporary local alias for the pre-existing missing
#ssrf_guardmapping in the CLI Vitest config. The alias was removed after verification and is not part of this PR.Contributor context
Credit to Syed Anas Mohiuddin, independent security researcher, for reporting the legacy CLI credential-file permission issue.
Supersedes #4300 · Glen review. The implementation also covers agent credentials, retains atomic writes, and applies redaction at the shared SDK logging boundary.