Back to skill

Security audit

Code Review Assistant

Security checks for vulnerabilities and agentic risk

Overview

The skill does not appear to steal data or persist on the system, but its advertised code review and security scan are largely canned outputs that could mislead users.

Do not rely on this skill as a real security scanner, PR gate, or CI quality check unless it is changed to analyze actual files and diffs. It appears low-risk from a system-access perspective, but its current output can create false confidence or false findings.

Vulnerability Patterns
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • 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 (1)

T07 · Tool Hijacking and Spoofing

Error
Location
code-review-assistant.sh:19
Finding

Fabricated Code Review and Security Scan Results

Content
View full analysis

Vulnerability Details

File Location: code-review-assistant.sh:19-74 and code-review-assistant.sh:77-104
Vulnerability Type: Tool output spoofing
Risk Level: High

Vulnerable Code

bash
review)
    if [ -z "$TARGET" ]; then
        echo -e "${YELLOW}Usage: code-review-assistant review <file-or-directory>${NC}"
        exit 1
    fi
    
    echo "📁 Reviewing: $TARGET"
    echo ""
    
    cat << 'REPORT'
### Code Review Report

#### ⚠️ Issues Found

##### High Priority

1. **Security: Potential SQL Injection**
   - File: example.js
   - Line: 45
   ```javascript
   const query = `SELECT * FROM users WHERE id = ${userId}`;

Recommendation: Use parameterized queries

Medium Priority
  1. Error Handling: Missing try-catch

    • File: example.js
    • Line: 23
    javascript
    const data = JSON.parse(response);
    

    Recommendation: Add error handling

  2. Best Practice: Hardcoded Secret

    • File: example.js
    • Line: 67
    javascript
    const API_KEY = "sk-1234567890";
    

    Recommendation: Use environment variables

Low Priority
  1. Style: Use const instead of let
  2. Style: Add JSDoc comments
  3. Performance: Consider caching

Summary

TypeCount
Security1
Error Handling1
Best Practices2
Style2

Recommendation

Fix high priority issues before merging. Consider addressing medium priority items in next iteration.


REPORT

text
echo -e "${GREEN}✅ Review complete!${NC}"
;;
text

The corresponding `diff` implementation similarly combines a real command with a fabricated analysis:

```bash
diff)
    echo "📊 Analyzing git diff..."
    echo ""
    
    if command -v git &> /dev/null; then
        git diff --stat 2>/dev/null || echo "Not a git repository"
    fi
    
    cat << 'DIFF_REPORT'
### Changes Summary

| File | Additions | Deletions |
|------|-----------|-----------|
| src/utils.js | +15 | -3 |
| s
...[truncated 2485 chars]
Remediation
View remediation

Remediation Suggestions

  1. Replace all static findings with results derived from actual inspection of the requested file, directory, or Git diff.
  2. Validate that the target exists, is readable, and is of a supported type before beginning analysis.
  3. Generate each finding from a concrete rule match and include the real relative file path, line range, relevant source excerpt, and rule identifier.
  4. Ensure diff summaries and issue counts are computed exclusively from the current repository and selected revision range.
  5. Return a nonzero exit status when analysis cannot be performed, the target is invalid, or an internal analyzer fails. Do not print “Review complete” after a failed or skipped analysis.
  6. Clearly mark any demonstration or placeholder output as synthetic and disable it in production and CI execution paths.
  7. Add regression tests using clean and deliberately vulnerable fixtures to verify that results change with source content and that clean inputs do not receive fabricated findings.
  8. Until real analysis is implemented, remove or revise the documentation claims that the tool performs automatic bug detection, security scanning, and complexity analysis.
Vulnerability Patterns
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (6)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill advertises automated PR review, code quality analysis, bug detection, and security scanning, but the finding indicates those capabilities are not actually implemented and outputs are largely fixed templates. This is dangerous because users may rely on the tool as a security control and merge vulnerable code under a false sense of assurance, especially in CI/CD or PR-gating workflows.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The file contains user-facing instructions and descriptions in Chinese throughout, but does not state that the skill is region-specific or provide any language/locale opt-in. This can violate language/locale policy by effectively forcing a specific language on users without choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest description is written entirely in Chinese and provides no indication that language selection is optional or configurable. For a general code review assistant, this can constitute a locale/language policy violation because it implies a fixed language experience without user opt-in or region-specific justification.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The review command advertises automated code review and security scanning but only emits a static, hardcoded report unrelated to the supplied target. This is dangerous because users may rely on the output as if a real review occurred, causing real vulnerabilities or defects to be missed and unsafe code to be merged.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The diff command claims to analyze changes but only displays git diff --stat plus a canned issue summary, without inspecting diff content for quality or security problems. In a code-review assistant context, this creates a false sense of assurance that can allow vulnerable changes to pass through review unnoticed.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill metadata promises PR review support, but the pr command is only a placeholder that reports missing GitHub integration. While it does not perform unsafe actions directly, the mismatch can mislead users into thinking PR review exists, reducing scrutiny or causing skipped security checks in deployment workflows.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.