Back to skill

Security audit

Bytesagain Code Reviewer Cn

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a local code-review helper, but several advertised security and checklist features are broken enough that users could get false confidence from it.

Install only if you treat it as a lightweight local review aid and verify failures manually. Do not rely on its security, checklist, or complexity commands as release gates until those bugs are fixed and tested.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
" && exit 1 [ ! -f "$file" ] && echo "File not found: $file" && exit 1 CR_FILE="$file" CR_LANG="$lang" python3 << 'PYEOF' import re with open("$file") as f: content = f.read() ``` The same defects occur in the complexity command: ```bash cmd_complexity() { local file="${1:-}" [ -z "$file" ] && echo "Usage: complexity <file>" && exit 1 [ ! -f "$file" ] && echo "File not found: $file" && exit 1 CR_FILE="$file" CR_LANG="$lang" python3 << 'PYEOF' import re, os with open("$file" ...[truncated 2404 chars]:257
Finding

Security and Complexity Commands Fail Before Analyzing the Requested File

Content
View full analysis
" && exit 1 [ ! -f "$file" ] && echo "File not found: $file" && exit 1 CR_FILE="$file" CR_LANG="$lang" python3 << 'PYEOF' import re with open("$file") as f: content = f.read() ``` The same defects occur in the complexity command: ```bash cmd_complexity() { local file="${1:-}" [ -z "$file" ] && echo "Usage: complexity " && exit 1 [ ! -f "$file" ] && echo "File not found: $file" && exit 1 CR_FILE="$file" CR_LANG="$lang" python3 << 'PYEOF' import re, os with open("$file") as f: lines = f.readlines() ``` ### Technical Analysis The script enables strict undefined-variable handling through `set -euo pipefail`. Neither `cmd_security` nor `cmd_complexity` initializes a shell variable named `lang`, but both evaluate `CR_LANG="$lang"` while constructing the Python process environment. Consequently, Bash terminates the command with an unbound-variable error before Python can perform any analysis. There is a second independent defect. The Python source is supplied using a single-quoted heredoc delimiter: ```bash << 'PYEOF' ``` This intentionally disables shell expansion inside the heredoc. Therefore, `open("$file")` does not reference the validated shell argument; Python attempts to open a literal path named `$file`. The shell correctly exports the requested path through `CR_FILE`, but the embedded Python ignores that environment variable. This breaks the advertised security control and may cause users or automation to proceed without a completed scan. ### Attack Path 1. A user or automated pipeline invokes `security target.py` or `complexity targ ...[truncated 1184 chars]
Remediation
View remediation
"; return 1; } [ ! -f "$file" ] && { echo "File not found: $file"; return 1; } CR_FILE="$file" python3 <<'PYEOF' import os import re filepath = os.environ["CR_FILE"] with open(filepath, encoding="utf-8") as f: content = f.read() lines = content.splitlines() PYEOF } ``` Apply the same design to `cmd_complexity`. Remove `CR_LANG="$lang"` unless the function initializes and uses `lang`. Additional hardening should include: 1. Add automated tests for valid files, missing files, filenames containing spaces, and filenames beginning with a dash. 2. Assert that each command returns a nonzero exit status when analysis fails. 3. Ensure calling automation treats any nonzero status as a failed scan rather than a clean result. 4. Print scan results using the resolved `filepath` value so output accurately identifies the analyzed target. ]]>

T09 · Insecure Skill Coding Practices

Note
Location
scripts/script.sh:136
Finding

Checklist Command Is Unconditionally Broken by an Undefined Variable and Missing Import

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The documented purpose does not fully match the described behavior: the skill includes undeclared file comparison, references unsupported or inconsistent languages, and appears to have broken or unreliable command behavior. This mismatch is security-relevant because users and orchestrators may grant trust or permissions based on the stated purpose, while the actual behavior expands capability and makes safe review harder.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
100% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/script.sh (reported line 86)May include surrounding context.

sh
warnings.append('Unquoted variables found — use "$VAR" to prevent word splitting')
    if "set -e" not in content:
        suggestions.append("Consider adding 'set -e' for fail-fast behavior")
    if re.search(r'rm -rf /', content):
        issues.append("DANGEROUS: rm -rf with root path detected!")

elif lang == "go":

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/script.sh (reported line 86)May include surrounding context.

sh
warnings.append('Unquoted variables found — use "$VAR" to prevent word splitting')
    if "set -e" not in content:
        suggestions.append("Consider adding 'set -e' for fail-fast behavior")
    if re.search(r'rm -rf /', content):
        issues.append("DANGEROUS: rm -rf with root path detected!")

elif lang == "go":

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The security subcommand claims to scan the user-supplied file, but the embedded Python heredoc is single-quoted and uses open("$file"), so Python opens a literal file named $file instead of the validated shell argument. This breaks the trust boundary between user input validation and the scanner logic, causing the tool to scan the wrong file or fail unpredictably; in a review/security skill, false negatives are especially dangerous because users may rely on incorrect clean results.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The complexity subcommand has the same literal-string bug: the Python code opens "$file" rather than the validated shell variable, so it analyzes the wrong file or crashes. In this skill context, that undermines audit reliability and can conceal complexity hotspots or produce misleading reports that downstream users may trust during code review.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
83% confidence
Finding

The skill advertises operational capabilities that imply shell, environment, and possibly network access, but it does not declare any explicit tool scope or permission boundaries. In an agent ecosystem, missing scope declarations increase the chance that the skill runs with broader privileges than users expect, enabling unintended file access, command execution, or data exposure if the implementation is invoked unsafely.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill is named bytesagain-code-reviewer-cn, which implies a China/Chinese locale constraint, but the documentation does not explain why this locale restriction exists or offer the user a language/locale choice. This can violate language/locale policy expectations when a skill appears to enforce a specific locale without explicit opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script identifies itself as "bytesagain-code-reviewer-cn" and presents all functionality under that locale-specific name, but there is no natural-language explanation that the skill is China/Chinese-specific or any option for the user to choose another language/locale. This can violate the language/locale policy because the locale constraint is imposed implicitly rather than offered as a choice or documented as region-specific.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The help text says the supported languages are "python js go java bash", which communicates that checklist functionality covers Java as well. In cmd_checklist, the Python snippet only defines checklists for python, js, go, and generic, so requesting Java falls back to the generic checklist instead of Java-specific guidance.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.dynamic_code_execution

Dynamic code execution detected.

Critical
Code
suspicious.dynamic_code_execution
Location
scripts/script.sh:67