Back to skill

Security audit

CodeBuddy Coding

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a real CodeBuddy coding wrapper, but it needs Review because it defaults to bypassing permission checks and runs user-supplied tasks through shell-backed CLI execution.

Review carefully before installing. Use only in a disposable or version-controlled workspace, avoid bypassPermissions by default, disable shell-backed execution, require explicit approval for file changes and commands, constrain cwd to the intended project, and avoid detached background runs unless they are tracked and cancellable.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
cli-wrapper.js:60
Finding

Shell Command Injection Through Shell-Backed CLI Execution

Content
View full analysis
{ const proc = spawn(this.codebuddyPath, ['--version'], { shell: true, stdio: 'pipe' }); ``` ```javascript async execute(task, options = {}) { const startTime = Date.now(); // Build command arguments const args = [ '-p', task.prompt || task.task || task, '--output-format', options.outputFormat || this.outputFormat, '--permission-mode', options.permissionMode || this.permissionMode ]; // CodeBuddy CLI does not support the --workspace argument. // The working directory is selected through the spawn cwd option. if (this.debug) { console.log('[CodeBuddy CLI] Executing:', this.codebuddyPath, args.join(' ')); console.log('[CodeBuddy CLI] Working Directory:', options.cwd || process.cwd()); } return new Promise((resolve, reject) => { const proc = spawn(this.codebuddyPath, args, { shell: true, cwd: options.cwd || process.cwd(), stdio: 'pipe' }); ``` ```javascript executeBackground(task, options = {}) { const args = [ '-p', task.prompt || task, '--output-format', options.outputFormat || this.outputFormat, '--permission-mode', options.permissionMode || this.permissionMode ]; if (this.debug) { console.log('[CodeBuddy CLI] Background task:', this.codebuddyPath, args.join(' ')); } const proc = spawn(this.codebuddyPath, args, { shell: true, cwd: options.cwd || process.cwd(), stdio: 'pipe', detached: true }); ``` ### Technical Analysis The wrapper invokes `spawn` with `shell: true` while placing values derived from caller-controlled input into the command arguments. Relevant inputs include: - `this.codebuddyP ...[truncated 2638 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
cli-wrapper.js:10
Finding

CodeBuddy Permission Controls Are Bypassed by Default

Content
View full analysis
{ this.monitor.updateProgress(progress); } }); ``` ### Technical Analysis The wrapper constructor and the primary Skill execution path both select `bypassPermissions` whenever the caller does not explicitly provide a permission mode. This makes the most permissive execution mode the default rather than an exceptional, explicitly authorized choice. The Skill declares file operations and command execution as capabilities. Running an AI coding agent with permission checks bypassed allows generated operations to proceed without the normal approval boundary. A malformed prompt, prompt injection inherited from upstream content, model error, or compromised caller can therefore cause broader filesystem or command effects than a least-privileged configuration would permit. There is also a configuration inconsistency: the documentation commonly presents execution settings under a nested `options` object, while `skill.js` reads `task.permissionMode` directly. A caller following the documented nested structure may believe it selected `default`, while the implementation ignores that value and falls back to `bypassPermissions`. ### Attack Path 1. A caller invokes `codebuddy.execute` without a top-level `permissi ...[truncated 1451 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (19)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The quick-start example recommends permissionMode: 'bypassPermissions' without any warning, gating, or justification, normalizing elevated-privilege execution as a default usage pattern. For a coding skill that can write files and run commands, this materially increases the chance of unauthorized filesystem changes, dangerous command execution, and bypass of host safety controls if copied by integrators or invoked by other agents.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The document explicitly instructs users to run coding tasks that create or modify files, but it does not warn about workspace mutation, scope limitations, backups, or confirmation before changes. In an agent skill context, this can lead to unintended overwrites or edits when an operator assumes the skill is observational rather than mutating.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The README explicitly documents that the tool can modify project files and exposes a permission mode that includes 'bypassPermissions', but it does not warn users about the risk of unintended code changes, privilege escalation, or the need for review before execution. In an agent skill context, normalizing silent file modification increases the chance that downstream agents or users will run impactful actions without informed consent or guardrails.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The Architect Agent example promotes 'permissionMode: bypassPermissions' as a normal integration pattern without any caution, approval requirement, or explanation of security consequences. This is dangerous because it can encourage developers to embed elevated-permission execution into automated agents, increasing the risk of unauthorized or destructive repository changes.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
82% confidence
Finding

Most of the natural-language content, comments, and examples are presented in Chinese, which can effectively force a specific language on users. The policy allows this only when users are given a language/locale choice or when the restriction is clearly documented and justified, neither of which appears here.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill explicitly advertises file creation/modification/deletion and command execution as core capabilities, but the documentation provides no user-facing warning about destructive side effects, scope limits, or the need for confirmation before operating on user files or the host system. In an agent skill context, this increases the risk that downstream agents invoke powerful actions on sensitive paths or run impactful commands without the operator understanding the consequences.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The wrapper claims to only invoke and parse CodeBuddy CLI output, but it silently defaults to bypassPermissions for all tasks. This weakens or disables a safety boundary for downstream code execution and file-modifying operations, creating a risk of unintended destructive actions without explicit user approval.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The code launches the CLI without any warning or confirmation while also defaulting to a permissive bypassPermissions mode. In this context, silent execution increases the chance that a caller triggers filesystem changes, external tool use, or other sensitive actions without informed consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

Background execution is started detached and without any user-facing disclosure, which makes risky CLI activity harder to notice, interrupt, or attribute. Combined with permissive defaults, this can enable unattended file modifications or other side effects that continue after the initiating flow ends.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This JavaScript file contains user-facing natural-language output entirely in Chinese, including task labels and formatted progress reports. Because the skill does not offer any language selection or document a justified locale restriction, it violates the policy against forcing a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill invokes the underlying CLI with permissionMode defaulting to bypassPermissions, meaning tasks run with fewer safety checks unless the caller explicitly overrides it. In a coding/agent skill context that may execute file modifications or other CLI-driven actions from natural-language tasks, this materially increases the chance of unauthorized or destructive actions without user confirmation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The description 'Universal AI coding skill powered by CodeBuddy CLI' is extremely broad and does not constrain when the skill should be invoked or what tasks it is authorized to perform. In a skill that advertises command execution and file operations, vague scope increases the chance of over-invocation, misuse on sensitive tasks, or unsafe delegation beyond the user's intent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This JavaScript file includes natural-language strings and comments exclusively in Chinese, beginning with the file description. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is clearly justified, which is not present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The file presents all user-facing natural-language content in Chinese, including headings, instructions, examples, and status information. There is no indication that this language choice is optional, user-configurable, or justified as a region-specific skill, which may violate language or locale policy expectations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The natural-language documentation is entirely in Chinese, including headings, parameter explanations, examples, and user-facing output strings, with no indication that other languages are supported or that Chinese is a justified region-specific constraint. The stated policy flags language or locale restrictions when they are imposed without user opt-in or documented justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file is almost entirely presented in Chinese, including headings, test descriptions, and conclusions, but it does not state that the language was selected by the user or that the skill/report is intended only for a Chinese-language context. That can violate language/locale policy when a skill implicitly forces a specific language without opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The progress callback sets currentTask to the Chinese string 处理中 when no task text is provided. This imposes a specific language on users without opt-in, and the file does not document that the skill is intentionally limited to Chinese-speaking contexts.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The file contains user/developer-facing natural-language comments such as 主入口文件 and additional Chinese-only method comments throughout the file. This imposes a specific language context without any indication of user opt-in or locale justification, which can conflict with language/locale policy requirements.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

This JSON report contains multiple user-visible test names and status text in Chinese, such as at L11, L19, L27, and L54. Because the file provides no indication that Chinese was user-selected or that the skill is intentionally locale-specific, it may conflict with a language/locale policy requiring opt-in or documented scope.

Content

No source excerpt is available for this finding.