Back to skill

Security audit

Code Reviewer

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent code-review automation guide, but it recommends persistent repository access and automated PR approvals that can bypass human review.

Review this carefully before installing. Limit the GitHub App to selected repositories, avoid letting bot approvals satisfy required human or code-owner review, disable or heavily restrict auto-approve, and confirm what repository and PR data is sent to ClawHub or Slack before using it on private or sensitive codebases.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
SKILL.md:249
Finding
Excessive External Repository Access Through Organization-Wide GitHub App Installation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 249–264 **Vulnerability Type**: Excessive repository permissions and external disclosure risk **Risk Level**: High ### Vulnerable Code ```bash # Create GitHub App (one time) clawhub code-reviewer create-app \ --name "Code Reviewer" \ --webhook-url "https://api.clawhub.com/webhooks/github" \ --permissions "contents=read, pull_requests=write" # Install on repositories clawhub code-reviewer install \ --app-id 12345 \ --repo github.com/yourorg/yourrepo # Or install on all org repos clawhub code-reviewer install-org \ --org yourorg \ --app-id 12345 ``` ### Technical Analysis The documented setup sends GitHub webhook events to an external Clawhub endpoint and grants the associated GitHub App `contents=read` and `pull_requests=write` permissions. Read access to repository contents is relevant to code review, while pull-request write access is needed to publish review results. However, the organization-wide installation option expands those privileges to every repository available through the installation rather than limiting access to repositories that require automated review. The documentation also advertises support for private repositories but does not describe repository allowlisting, webhook payload minimization, source-code retention, encryption, deletion procedures, access logging, or tenant-isolation controls. Consequently, users are instructed to establish a broad trust relationship with an external service without corresponding data-handling safeguards. This is a least-privilege violation when organization-wide installation is used unnecessarily. The risk arises from the combination of sensitive source-code access, pull-request modification privileges, an external network destination, and a potentially organization-wide scope. ### Attack Path 1. An administrator follows the documented setup and creates the GitHub App. 2. The administrator configures `https://api. ...[truncated 1340 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Make selected-repository installation the default and remove organization-wide installation from the quick-start path. - Require explicit administrator confirmation before enabling access to all organization repositories or any private repository. - Separate analysis from mutation privileges where possible. Use a read-only app for analysis and request pull-request write access only when review publication is enabled. - Apply the narrowest available GitHub permissions and document why each permission is necessary. - Document exactly which webhook events and fields are transmitted to the external service. - Minimize webhook payloads and avoid transmitting full file contents unless analysis explicitly requires them. - Publish source-code retention, encryption, tenant-isolation, access-control, deletion, incident-response, and audit-log policies. - Support customer-controlled or on-premises processing for sensitive repositories. - Provide repository allowlists and prevent automatic expansion of access when new organization repositories are created. - Recommend periodic review and revocation of inactive app installations and credentials. ]]>

T05 · Unauthorized Access and Privilege Escalation

Error
Location
SKILL.md:226
Finding
Automated Pull-Request Approval Can Bypass Required Human Review<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 226–231 **Vulnerability Type**: Review-control bypass through automated approval **Risk Level**: High ### Vulnerable Code ```yaml auto_approve: when: - "all_checks_pass == true" - "author in [maintainer_team]" - "changed_files < 5" # Skip required reviewers ``` ### Technical Analysis The skill explicitly proposes automatically approving pull requests and states that this can skip required reviewers. The listed conditions are insufficient security boundaries: - Passing automated checks does not prove that a change is safe. - Membership in a maintainer team does not protect against compromised maintainer accounts. - A limit of fewer than five changed files does not measure the security impact of a change. - Small changes to CI workflows, authentication logic, dependency manifests, access-control rules, or deployment configuration can have critical consequences. If the service's approval is accepted as a required review, the automation can weaken separation of duties and remove independent human verification. Incorrect rules, scanner false negatives, maliciously crafted changes, or compromise of the reviewing service could therefore turn its pull-request write privileges into a review-control bypass. The document contains configuration guidance rather than an implementation, so the vulnerability is conditional on a platform accepting the automated approval and the user enabling this policy. Nevertheless, the recommended configuration expressly seeks to bypass required reviewers and exceeds the minimum privileges necessary to provide review comments. ### Attack Path 1. A repository administrator enables the documented `auto_approve` configuration. 2. The bot is granted pull-request write or review privileges, and its approval is allowed to satisfy repository review requirements. 3. An authorized or compromised maintainer creates a pull request modifying fewer than five ...[truncated 1089 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Remove the recommendation to skip required reviewers. - Ensure automated approval can never satisfy mandatory human-review or code-owner requirements. - Default to posting non-binding review comments or status checks rather than formal approvals. - Require at least one independent human approval before merge, including for changes authored by maintainers. - Prohibit auto-approval for security-sensitive paths, including: - CI/CD and workflow definitions - Authentication and authorization code - Dependency and lock files - Infrastructure and deployment configuration - Secrets-management configuration - Branch-protection and repository-policy files - Executable scripts and build tooling - Evaluate semantic risk rather than relying on changed-file count. - Prevent self-approval and require the approving identity to be independent of the author. - Preserve branch-protection and code-owner controls as non-bypassable platform policies. - Record all automated decisions in immutable audit logs and provide an immediate revocation mechanism. - Fail closed when analysis is unavailable, incomplete, or returns an error. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (7)

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
---
name: code-reviewer
description: "Automated code review, quality gates, and PR analysis. Integrates with GitHub, GitLab, Bitbucket. Enforce style guides, detect bugs, security vulnerabilities, performance issues. Auto-approve safe PRs, flag dangerous changes. Save developers 5+ hours/week on manual reviews."
homepage: https://clawhub.com/skills/code-reviewer
metadata:
  openclaw:
Confidence
85% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
---
name: code-reviewer
description: "Automated code review, quality gates, and PR analysis. Integrates with GitHub, GitLab, Bitbucket. Enforce style guides, detect bugs, security vulnerabilities, performance issues. Auto-approve safe PRs, flag dangerous changes. Save developers 5+ hours/week on manual reviews."
homepage: https://clawhub.com/skills/code-reviewer
metadata:
  openclaw:
Confidence
85% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
---
name: code-reviewer
description: "Automated code review, quality gates, and PR analysis. Integrates with GitHub, GitLab, Bitbucket. Enforce style guides, detect bugs, security vulnerabilities, performance issues. Auto-approve safe PRs, flag dangerous changes. Save developers 5+ hours/week on manual reviews."
homepage: https://clawhub.com/skills/code-reviewer
metadata:
  openclaw:
Confidence
85% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
on_pr_update:
    - "review"  # Re-review

  auto_approve:
    when:
      - "all_checks_pass == true"
      - "author in [maintainer_team]"
Confidence
90% confidence
Finding
The skill provides a concrete auto_approve configuration and explicitly notes 'Skip required reviewers,' enabling the system to approve and accelerate merges based on automated checks and simple heuristics such as author membership and file count. In a code-review skill, this is more dangerous because attackers or insiders can craft small but impactful changes that satisfy the heuristic and bypass meaningful human review.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The skill documents installation on repositories and across an organization with pull request write access, but does not warn users about the breadth of access being granted or the consequences of automated review/comment actions. In a code-review automation context, broad installation can expose private source code and enable mass automated actions across many repos if the app is misconfigured or compromised.

External Transmission

Medium
Category
Data Exfiltration
Content
# Create GitHub App (one time)
clawhub code-reviewer create-app \
  --name "Code Reviewer" \
  --webhook-url "https://api.clawhub.com/webhooks/github" \
  --permissions "contents=read, pull_requests=write"

# Install on repositories
Confidence
88% confidence
Finding
The documented webhook configuration transmits repository event data to an external service endpoint at api.clawhub.com. In this skill's context, that likely includes pull request metadata and potentially private repository information, so the lack of a trust boundary warning creates real data exposure risk.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The Slack notification example sends PR titles, URLs, and review summaries to an external messaging service without any disclosure about data sharing. This can leak sensitive code-review metadata, security findings, or private repository context into third-party systems and broader internal channels.

Static analysis

No suspicious patterns detected.