cli
Audited by Socket on May 21, 2026
5 alerts found:
Anomalyx4SecurityThis module is best characterized as a high-impact supply-chain installer: it retrieves repository content using a caller-provided GitHub token and writes downloaded/cloned files directly into local Claude/agent configuration directories and then syncs symlinks. There is no integrity/pinning/signature verification shown before persistence, and it uses shell-based exec for git operations with a token embedded in a command string, increasing credential-exposure risk. No explicit malicious payload behavior (e.g., exfiltration/backdoor) is evident in the fragment, but the lack of supply-chain integrity controls and the installation of unverified remote content elevates security risk. Review for: replacing exec with spawn/args, adding token-safe handling, enforcing path sanitization for remote names, and verifying commit hashes/signatures/hashes before writing to disk.
No direct evidence of intentional malware (e.g., backdoor logic, credential theft, eval-based execution, or explicit exfiltration endpoints) is visible in this module. However, it is a high-impact installer that clones a remote repository and installs its scripts/commands/agents/skills into user configuration directories, then runs dependency installation and emits telemetry. The dominant risk is supply-chain compromise or unsafe behavior inside the helper modules (cloneRepository, dependency installers, telemetry, and shell/symlink setup), rather than malicious code being present directly in this snippet.
This module is primarily a local script runner: it checks for Bun, reads `<claudeDir>/scripts/package.json`, validates that a requested script key exists, and then executes it via `bun run <scriptName>`. There is no direct evidence of malware, obfuscation, or network exfiltration in this fragment. The key security concern is execution delegation: if the scripts directory or its package.json can be tampered with, this becomes an attacker-controlled code execution vector. Additionally, it passes the full parent environment to the child process and uses inherited stdio, increasing the chance of sensitive data exposure through executed scripts/logs.
No explicit malware/backdoor behaviors are visible in this fragment (no eval/new Function, no hardcoded credentials, no direct exfiltration code). However, the command performs high-impact supply-chain operations through unseen helpers: it uses a runtime GitHub token for analysis/sync, writes backups, modifies/removes/migrates local files, and—critically—optionally installs dependencies for synced scripts, which can execute lifecycle code. Telemetry is also emitted on success/failure. Due to missing implementations of getToken/analyzeSyncChanges/syncSelectedItems/installScriptsDependencies/telemetry, the presence of malicious intent cannot be confirmed, but the security risk is meaningfully elevated.
This module functions as a GitHub-backed remote file synchronizer that can download arbitrary repository files (using a provided token) and write/overwrite them into local claude/agents directories, including deletion and migration of local paths. While there is no overt backdoor or exfiltration logic in the shown fragment, the supply-chain impact is high: the remote content and (potentially) remote/caller-derived paths drive fs.writeFile/fs.remove/fs.move. The absence of explicit path sanitization/normalization prior to filesystem operations is a key risk area to review, along with the behavior of imported helpers (notably transformFileContent and syncCategorySymlinks).