Back to skill

Security audit

Rust Rebuilder

Security checks for vulnerabilities and agentic risk

Overview

This Rust rewrite skill is mostly coherent, but it pushes users toward mandatory, unpinned third-party skill/MCP dependencies that can persistently change the agent environment.

Install only if you trust the referenced helper projects and are willing to let them persist in your Codex environment. Prefer pinned, reviewed revisions for grok-search and github-helper, review any MCP permissions before enabling them, and expect this skill to inspect local Codex config and run Git/GitHub sync commands on repositories you point it at.

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
SKILL.md:20
Finding

Mandatory installation guidance uses unpinned third-party Skill and MCP repositories

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (12)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description promises a broad Rust migration/orchestration capability, including project rewrite planning, parity verification, idiomatic guidance, latest Rust feature checks, and GitHub upstream synchronization. The supplied code does none of those things. It simply checks for the presence of certain locally installed skills/MCP configuration entries and prints a readiness report with repository links for missing dependencies. While dependency preflight checks are mentioned in the description, this code is only that small supporting piece and does not substantiate the much broader declared primary purpose. Therefore the description materially overstates what this code chunk actually does.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The code’s actual behavior is narrowly focused on Git repository synchronization reporting. It runs git commands to validate a repo, ensure upstream and origin remotes exist, fetch updates, count ahead/behind commits between upstream/<branch> and origin/<branch>, and list recent upstream-only commits. While the declared description mentions GitHub upstream synchronization as one component, the overall declared purpose is primarily a Rust porting/rewrite assistant with multiple migration-related capabilities that are entirely absent here. Therefore the description materially overstates and misrepresents what this code chunk actually does.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill instructs the agent to read local files and execute shell commands (python3 scripts/check_dependencies.py, other referenced scripts) but does not declare an explicit tool scope such as permissions or allowed-tools. In an agent ecosystem, undeclared capabilities reduce reviewability and can cause an agent to perform filesystem or command execution beyond what a user or platform expects.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill instructions are written as direct operational guidance in Chinese and the trigger example also requires Chinese phrasing, but there is no statement that the user may choose another language. This creates a natural-language locale constraint without opt-in, which matches the policy violation category for language or locale restrictions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file contains the operational instructions entirely in Chinese, which effectively forces a specific language for users of the skill. The policy allows locale constraints only when they are documented and justified or when the user is given a language/locale choice, neither of which appears here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The guideline explicitly mandates a specific language/locale ('在重写后端 Rust 代码时,严格遵循本规范'), which can cause the agent to respond in Chinese regardless of the user's preferred language. In a code-rewrite skill, this can degrade usability, create misunderstandings in technical migration guidance, and conflict with user or system language expectations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This markdown file contains user-facing natural-language instructions exclusively in Chinese, which effectively forces a specific language/locale without any opt-in or documented regional justification. Under the policy, language constraints are only acceptable when the skill offers a choice or clearly documents why the locale restriction is necessary.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script blocks the Rust rewrite workflow unless unrelated external components are installed: a grok-search skill or MCP entry, and a github-helper skill. This creates unjustified dependency coupling to third-party repositories outside the skill’s stated purpose, expanding the trust boundary and pressuring users to install additional code that may have broad access to local files, repositories, or network resources.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code emits install guidance strings only in Chinese, which imposes a specific language on users without opt-in. The file does not indicate that the skill is region-specific or provide any mechanism to select another language.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/upstream_sync_report.py (reported line 31)May include surrounding context.

python
def run_git(repo_path: Path, args: list[str]) -> str:
    command = ["git", *args]
    result = subprocess.run(
        command,
        cwd=repo_path,
        check=False,

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This Python file contains multiple user-facing messages and CLI help text in Chinese, including error messages and argument descriptions. Because the skill does not offer a language/locale option or document that it is intentionally region-specific, it appears to force a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

This markdown file is primarily written in Chinese and does not indicate that users may choose another language or locale. Under the policy criteria, forcing a specific language without user opt-in can be considered a natural-language policy violation.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.