Back to skill

Security audit

AI Code Reviewer

Security checks for vulnerabilities and agentic risk

Overview

This code-review skill has no executable payload, but its optional GitHub/API credential use and automatic fix/PR features are not scoped clearly enough for a low-friction install.

Install only if you are comfortable giving the skill access to code and, for PR automation, GitHub credentials. Prefer read-only review first, use least-privilege or short-lived tokens, review diffs before accepting fixes, and pin any copied GitHub Actions workflow to immutable commit SHAs with minimal permissions.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
README.md:226
Finding
Mutable Third-Party GitHub Action Receives an API Secret## Vulnerability Details **File Location**: `README.md`, lines 226–230 **Vulnerability Type**: Supply-chain risk from dependencies referenced by mutable tags **Risk Level**: Medium ### Vulnerable Code ```yaml - uses: actions/checkout@v3 - name: AI Code Review uses: clawhub/ai-code-reviewer@v1 with: api-key: ${{ secrets.OPENROUTER_API_KEY }} ``` ### Technical Analysis The documented GitHub Actions workflow references both `actions/checkout@v3` and `clawhub/ai-code-reviewer@v1` by mutable major-version tags rather than immutable, reviewed commit SHA values. The third-party `clawhub/ai-code-reviewer@v1` action is explicitly given the `OPENROUTER_API_KEY` secret. A mutable tag can be changed to identify different action code after the workflow has been reviewed. If the upstream repository, publisher account, release process, or tag is compromised, a subsequent workflow run could execute modified code with access to the supplied secret and the checked-out repository. This is a documented integration example rather than an active workflow in the audited package. Exploitation therefore requires a user to copy or otherwise deploy this example. ### Attack Path 1. A user adopts the workflow shown in `README.md`. 2. An attacker compromises the third-party action repository, publisher account, or mutable `v1` tag. 3. The attacker changes the tag to reference malicious action code. 4. GitHub Actions retrieves and executes that code during a later workflow run. 5. The malicious action reads the supplied `OPENROUTER_API_KEY`, repository files, and any other data available to the job. 6. The action exfiltrates the accessible data or abuses the API credential. ### Impact Assessment Successful exploitation could disclose the OpenRouter API key and source code available in the runner workspace. The stolen key could be used within its configured account limits, potentially causing unauthorized API usage and financial loss. The effective privileges are bounded by ...[truncated 299 chars]
Remediation
## Remediation Suggestions - Pin every GitHub Action to a reviewed, immutable full commit SHA rather than a mutable version tag. - Verify the action publisher, repository ownership, source code, release provenance, and referenced commit before adoption. - Use automated dependency monitoring to identify security advisories and intentionally update pinned SHAs. - Configure explicit least-privilege workflow permissions, starting with: ```yaml permissions: contents: read ``` - Grant additional permissions only to the specific job or step that requires them. - Do not pass API keys to third-party actions unless strictly necessary. Prefer a reviewed local action or a narrowly scoped integration. - Scope, rotate, and monitor the OpenRouter credential. Apply spending limits and other provider-side restrictions where supported. - Avoid exposing secrets to workflows triggered from untrusted pull requests or attacker-controlled code. - Document the action's required permissions, secret access, trust assumptions, and verified immutable version.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (8)

Missing User Warnings

High
Confidence
96% confidence
Finding
Describing automatic code fixing without warning about file integrity, destructive edits, or repository impact is dangerous because users may assume the action is harmless. In practice, automated modification can introduce regressions, overwrite intended logic, or alter sensitive project files if safeguards are absent.

Natural-Language Policy Violations

Medium
Confidence
91% confidence
Finding
The entire skill description, examples, prompts, and user-facing guidance are presented in Chinese, and no opt-in or language selection is offered despite the badge claiming support for multiple languages. This can constitute a language/locale policy issue when a skill effectively assumes a specific language without giving users a choice.

Vague Triggers

Medium
Confidence
94% confidence
Finding
The usage section lists generic trigger phrases such as “审查这段代码”, “为这个变更生成 PR 描述”, and “为这个函数生成单元测试” without defining activation boundaries, exclusions, or required context. These phrases are broad enough to match ordinary conversation about coding tasks, which can cause unintended skill invocation.

Vague Triggers

Medium
Confidence
91% confidence
Finding
The README advertises '审查并自动修复' without defining scope limits, confirmation requirements, or safe execution boundaries. In an agentic environment, this can lead users to trigger code modification on arbitrary files or repositories, increasing the risk of unintended or unsafe changes being applied automatically.

Missing User Warnings

Medium
Confidence
87% confidence
Finding
The README mentions a GitHub token for automatic PR-related functionality but does not explain token scope, repository permissions, or the consequences of automated remote actions. This can encourage overprivileged token use and unexpected writes to repositories through the skill.

Natural-Language Policy Violations

Medium
Confidence
86% confidence
Finding
The operational instructions, triggers, examples, and error descriptions are presented entirely in Chinese, which effectively imposes a language constraint on users. There is no explicit language choice, opt-in, or justification that this skill is intended only for a Chinese-language environment.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The trigger phrases are very broad and overlap with ordinary developer requests such as '代码审查', 'code review', and '代码分析'. This can cause the skill to activate unintentionally in unrelated conversations, expanding its scope and increasing the chance that repository-affecting or sensitive analysis behavior is invoked without clear user intent.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The skill documents use of a GitHub token and mentions automatic PR behavior, but it does not clearly state when repository-impacting actions may occur or require explicit user consent. In an agent setting, this can lead users to provide credentials and trigger write operations such as PR creation or repository changes without understanding the consequences.

Static analysis

No suspicious patterns detected.