Back to skill

Security audit

Auto Research Pipeline

Security checks for vulnerabilities and agentic risk

Overview

This automated research skill is coherent, but it can run AI-generated experiment code and send or store research data with weak boundaries, so it should be reviewed before installation.

Install only if you are comfortable with an autonomous research workflow that writes persistent run artifacts, uses external paper-search services, sends phase summaries through Feishu, stores lessons for future runs, and executes generated Python. Run it in a disposable, network-restricted sandbox with no secrets or private files available, and review generated experiment code before allowing Phase E to run.

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 (1)

T09 · Insecure Skill Coding Practices

Error
Location
references/phase-e-execution.md:11
Finding

LLM-Generated Experiment Code Is Executed Without an Enforced Sandbox

Content
View full analysis
&1 ``` 3. Capture JSON metrics from stdout. 4. Write stdout, stderr, exit code, and duration to `stage-12/runs/run-1.json`. 5. Record errors if execution fails or times out. 6. Push a summary describing whether execution succeeded. ### Timeout and Security - Maximum execution time: 300 seconds. - Network access is not allowed. - Writing outside the experiment directory is not allowed. ``` The preceding generation phase validates only Python syntax: ```markdown ### Code Validation Loop After generating code: 1. Run `python3 -c "import ast; ast.parse(open('experiment.py').read())"` to check syntax. 2. If syntax errors occur, send the error to the LLM for repair, for at most three rounds. 3. Optionally perform a 30-second trial run in the sandbox. ``` ### Technical Analysis The generated `experiment.py` and associated Python files are untrusted executable content. They are produced by an LLM from research plans derived from user input and externally retrieved literature. The documented validation uses `ast.parse`, which only establishes that a file is syntactically valid Python. It does not ...[truncated 3090 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (45)

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

This stage explicitly executes Python code produced earlier in the pipeline, which creates a direct path from model-generated or user-influenced content to code execution. In a research pipeline, that means untrusted code can perform filesystem abuse, resource exhaustion, sandbox escape attempts, or other harmful actions even if network access is intended to be blocked.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The iterative refinement loop is more dangerous than one-time execution because it lets an LLM repeatedly generate and rerun modified code based on prior outputs. That creates an autonomous self-modifying execution chain that can amplify unsafe behavior, evade simple checks, and repeatedly probe the execution environment until something succeeds.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill orchestrates broad capabilities including filesystem reads/writes, environment access, and networked literature search, but declares no explicit tool scope or permission boundaries. In a multi-stage, sub-agent pipeline this increases the chance of over-privileged execution, unintended data access, and silent expansion of what the skill can do beyond user expectations.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger phrases are broad enough to match ordinary requests like literature review or writing help, which can activate a heavyweight autonomous pipeline unexpectedly. In this skill, accidental activation is more dangerous because it can spawn sub-agents, write persistent files, perform network searches, and potentially reach later execution stages without the user intending that level of automation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill performs external literature search and possibly web queries, but does not warn users that research topics and derived search terms may be transmitted to third-party services. For sensitive or confidential topics, this can leak strategic interests, unpublished ideas, or internal project details outside the local environment.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill persistently writes numerous artifacts, checkpoints, and logs to a workspace path, but the description does not warn users that their prompts, derived content, and run history will be stored across many stages. This can expose sensitive research topics, proprietary ideas, or personal data to later access, reuse, or unintended retention.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill instructs sub-agents to execute experiment code generated earlier in the pipeline, effectively turning a research-writing workflow into arbitrary code execution. Because earlier stages can synthesize that code from model output and external inputs, this creates a strong path to unsafe commands, data destruction, secret exposure, or unauthorized network activity.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The notification template explicitly requires a “300-500字中文摘要,” which imposes Chinese output on users regardless of their preferred language. The file does not provide an opt-in choice or explain a justified region-specific requirement, so this is a language-policy issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The comments and review preference guidance are written in Chinese and instruct agent behavior, but the file does not indicate that Chinese is optional or that the skill is intended only for a Chinese-speaking or region-specific context. This creates a natural-language locale policy issue because the skill effectively fixes a language without user opt-in.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The phase explicitly writes user-derived research content to disk and sends a Chinese summary to Feishu, but the skill description provides no user-facing notice, consent step, or data-handling boundaries. Because research topics, goals, and constraints may contain sensitive project plans or proprietary ideas, silent persistence and external transmission create a real confidentiality and privacy risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The second stage repeats the same pattern: it writes decomposed research plans to the filesystem and pushes a summary to Feishu without warning or consent. This broadens exposure because later-stage outputs can contain more structured strategic information, dependencies, and risks that may be even more sensitive than the original topic.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The instruction to '推送中文摘要' imposes a specific output language. The file does not offer the user a language choice or explain a justified locale restriction, which violates the language/locale policy for natural-language behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This stage explicitly instructs the agent to send research queries to external web/API services and a Python script without any user-facing notice, consent gate, or data-handling constraint. Research topics, problem trees, or query expansions may contain sensitive proprietary, personal, or embargoed information, so silent transmission to third parties creates a real confidentiality and compliance risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This step mandates a Chinese summary for stage S4 output. There is no user opt-in or documented reason for enforcing Chinese, so it constitutes a locale policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The stage S5 workflow again requires a Chinese summary regardless of user preference. Because no language choice or justification is provided, this is a natural-language policy issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The final stage instructs the skill to push a Chinese summary. This enforces a locale-specific behavior without opt-in or documented necessity.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The instruction to '推送中文摘要' requires Chinese output for the summary, regardless of user preference. This is a locale/language constraint expressed in natural language, and the file does not indicate user opt-in or a documented justification for enforcing Chinese.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This step mandates a Chinese summary for the final output, which imposes a specific language without user opt-in. Under the policy, language constraints should either be optional, user-selected, or clearly justified as region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The execution step explicitly requires pushing a Chinese summary, which imposes a specific language on the user-facing output. The file does not indicate any user choice, opt-in, or region-specific justification for this language constraint.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The design explicitly runs LLM-generated Python for syntax validation and optionally performs a trial execution, which introduces code-execution capability on untrusted, model-authored content. In this research pipeline context, prompts and upstream artifacts can influence generated code, so this can be abused for arbitrary command execution, file access, data exfiltration, or resource abuse if isolation is weak or absent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This step requires a Chinese summary for the code-generation stage, creating a language policy issue because it mandates a specific locale for output. No opt-in mechanism or documented justification is provided in the file.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The resource-planning stage also mandates a Chinese summary, which is a natural-language policy violation under the stated rules when no user language choice is offered. The requirement appears unconditional rather than context-limited.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The document states writes are restricted to the experiment directory, but the execution example uses a general temporary path and does not describe an enforcement mechanism. This mismatch suggests the restriction may be aspirational rather than technically enforced, increasing the risk that executed code writes outside intended boundaries, overwrites files, or accesses sensitive local data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This stage sends stdout/stderr and the full original code to an LLM for debugging without any user-facing disclosure or consent step. Experiment code and outputs may contain proprietary algorithms, embedded secrets, local paths, or sensitive data, so forwarding them to an LLM can create an unintended data exfiltration channel.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The execution step explicitly requires pushing a Chinese summary, which imposes a specific language choice rather than offering the user a locale option. This is a natural-language policy issue because the file otherwise mixes English and Chinese and does not document any user opt-in or region-specific justification for Chinese-only output.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.