Back to skill

Security audit

Argument Selfloop

Security checks for vulnerabilities and agentic risk

Overview

The skill is mainly a writing self-check, but it includes under-disclosed broad pipeline tooling and unsafe output handling that can write reports outside the chosen workspace.

Review this before installing in a real project. It should be limited to workspace-local section files and the three documented report outputs, and the output path handling should be fixed before use. Do not rely on its PASS result as a real quality gate until the documented ledger schema is enforced and an `argument-selfloop` validator exists. Also check whether your OpenClaw environment activates bundled pipeline files, because this package contains several unrelated workflows with broad routing hints.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/run.py:75
Finding

Workspace Path Escape Allows Writes Outside the Authorized Workspace

Content
View full analysis
None: path.mkdir(parents=True, exist_ok=True) def atomic_write_text(path: Path, content: str) -> None: ensure_dir(path.parent) fd, tmp_path = tempfile.mkstemp(prefix=path.name, dir=str(path.parent)) try: with os.fdopen(fd, "w", encoding="utf-8") as handle: handle.write(content) os.replace(tmp_path, path) except Exception: try: os.unlink(tmp_path) except OSError: pass ...[truncated 2720 chars]
Remediation
View remediation
Path: candidate = Path(rel) if candidate.is_absolute() or ".." in candidate.parts: raise ValueError(f"Unsafe workspace-relative path: {rel}") root = workspace.resolve() destination = (root / candidate).resolve(strict=False) if not destination.is_relative_to(root): raise ValueError(f"Path escapes workspace: {rel}") return destination ``` 3. Use a fixed mapping of artifact names to fixed workspace-relative paths instead of accepting arbitrary output destinations when customization is unnecessary. 4. Reject symlinked parent directories or securely traverse directories using descriptor-relative APIs where the workspace may be writable by an attacker. 5. Perform containment validation immediately before the final replacement to reduce time-of-check/time-of-use exposure. 6. Add tests for: - Absolute paths. - `../` traversal. - Nested traversal after normalization. - Symlinked parent directories. - Valid workspace-local paths. 7. Apply the same containment policy to all caller-controlled input and output paths throughout the pipeline tooling. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/run.py:150
Finding

Fail-Open Validation Produces Misleading PASS Results for Invalid Argument Ledgers

Content
View full analysis
list[QualityIssue]: if skill == "idea-brief": return _check_idea_brief(workspace, outputs) if skill == "literature-engineer": return _check_literature_engineer(workspace, outputs) # Numerous other explicit skill handlers are checked here. # No handler exists for "argument-selfloop". if skill == "deliverable-selfloop": ret ...[truncated 2634 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
Findings (39)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

A skill advertised as logical-coherence checking reportedly performs broad citation audits, document-structure enforcement, LaTeX/build/PDF QA, and validation of many external artifacts. This creates a substantial trust-boundary violation: callers may invoke it expecting section-level prose analysis, but it can affect build gating and inspect a much wider corpus of files than necessary.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

A skill advertised as logical-coherence checking reportedly performs broad citation audits, document-structure enforcement, LaTeX/build/PDF QA, and validation of many external artifacts. This creates a substantial trust-boundary violation: callers may invoke it expecting section-level prose analysis, but it can affect build gating and inspect a much wider corpus of files than necessary.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

A skill advertised as logical-coherence checking reportedly performs broad citation audits, document-structure enforcement, LaTeX/build/PDF QA, and validation of many external artifacts. This creates a substantial trust-boundary violation: callers may invoke it expecting section-level prose analysis, but it can affect build gating and inspect a much wider corpus of files than necessary.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

A skill advertised as logical-coherence checking reportedly performs broad citation audits, document-structure enforcement, LaTeX/build/PDF QA, and validation of many external artifacts. This creates a substantial trust-boundary violation: callers may invoke it expecting section-level prose analysis, but it can affect build gating and inspect a much wider corpus of files than necessary.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

A skill advertised as logical-coherence checking reportedly performs broad citation audits, document-structure enforcement, LaTeX/build/PDF QA, and validation of many external artifacts. This creates a substantial trust-boundary violation: callers may invoke it expecting section-level prose analysis, but it can affect build gating and inspect a much wider corpus of files than necessary.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

A skill advertised as logical-coherence checking reportedly performs broad citation audits, document-structure enforcement, LaTeX/build/PDF QA, and validation of many external artifacts. This creates a substantial trust-boundary violation: callers may invoke it expecting section-level prose analysis, but it can affect build gating and inspect a much wider corpus of files than necessary.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

A skill advertised as logical-coherence checking reportedly performs broad citation audits, document-structure enforcement, LaTeX/build/PDF QA, and validation of many external artifacts. This creates a substantial trust-boundary violation: callers may invoke it expecting section-level prose analysis, but it can affect build gating and inspect a much wider corpus of files than necessary.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

A skill advertised as logical-coherence checking reportedly performs broad citation audits, document-structure enforcement, LaTeX/build/PDF QA, and validation of many external artifacts. This creates a substantial trust-boundary violation: callers may invoke it expecting section-level prose analysis, but it can affect build gating and inspect a much wider corpus of files than necessary.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest context describes a skill named 'argument-selfloop' for maintaining an argument ledger and premise consistency report on drafted sections. However, the analyzed file declares 'name: peer-review' and defines a multi-stage referee-report pipeline producing review artifacts such as output/REVIEW.md, output/NOVELTY_MATRIX.md, and output/MISSING_EVIDENCE.md, which is materially different from the stated skill purpose.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

This module performs broad workflow orchestration, state mutation, approval handling, checkpoint advancement, downstream invalidation, and script execution, which is far beyond the declared purpose of an argument-ledger/self-consistency skill. In the skill context, that mismatch is dangerous because a seemingly low-risk writing helper is actually able to control pipeline execution and modify project governance state, increasing the chance of unauthorized actions being smuggled in under an innocuous label.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The code can launch arbitrary pipeline units by invoking the shared runner with attacker-influenced workspace state (UNITS.csv rows determine unit_id, inputs, outputs, and indirectly what work is run). For an argument consistency skill with declared network-none/self-check semantics, embedding execution authority is unjustified and materially expands the blast radius from document review to arbitrary repository-side automation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

This file implements an ideation/brainstorming pipeline that generates research direction pools, shortlists, reports, and appendices, which is materially different from the declared skill purpose of maintaining an argument ledger and premise-consistency report for drafted sections. In an agent skill system, this kind of capability mismatch is dangerous because invocation by the documented trigger phrases could cause the agent to produce unrelated prose artifacts, overwrite expected outputs, or bypass the intended guardrails against inserting intermediate reasoning artifacts into the paper.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The manifest describes a narrowly scoped prose-checking self-loop for argument consistency on drafted sections, with no mention of acting as a general validator for retrieval, citations, outlines, ideation, LaTeX, PDFs, or pipeline completion. This file instead dispatches checks for dozens of unrelated skills and artifacts across the whole workspace, making its behavior far broader than the claimed skill purpose.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill declares no explicit tool scope or permissions despite requiring Python and describing behavior that reads, writes, and invokes scripts. In an agent framework, missing tool constraints can allow broader-than-expected filesystem and shell access, increasing the risk of unintended or unsafe actions during execution.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The pipeline is marked as routing_default: true with broad multilingual routing hints such as survey, review, and literature review, which can cause this high-privilege workflow to activate in many generic conversations. Because the pipeline orchestrates a large number of downstream skills and artifacts, accidental activation can misroute tasks, trigger unintended workflow steps, and expand the attack surface for prompt/skill injection through irrelevant contexts.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The document repeatedly defines the pipeline as specifically for producing a Chinese thesis, including the title and core goal of delivering a '中文毕业论文'. Because this is a natural-language instruction artifact and does not offer any language choice or opt-in, it creates a locale/language policy concern under the rule for forced language constraints.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest-style routing hints include "peer review" and especially "review report," which are broad phrases that can overlap with common requests in many contexts. The file does not provide narrowing constraints, exclusion conditions, or negative examples to clarify when this pipeline should or should not activate.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The manifest-style routing hints include broad terms like "systematic" and "systematic review" without additional scope constraints or negative examples. This can cause unintended invocation because these phrases may appear in ordinary discussion rather than an explicit request for this pipeline.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest-style routing hint lists "tutorial" and "教程" as activation terms. These are generic, high-frequency words that can appear in ordinary user requests, and the file does not provide narrowing context, explicit trigger constraints, or negative examples to distinguish when this pipeline should or should not activate.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
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.

Content

Scanner excerpt · tooling/executor.py (reported line 105)May include surrounding context.

python
workspace: Path,
    repo_root: Path,
    strict: bool = False,
    auto_approve: set[str] | None = None,
) -> RunResult:
    units_path = workspace / "UNITS.csv"
    status_path = workspace / "STATUS.md"

Autonomous Decision Making

Medium
Category
Excessive Agency
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.

Content

Scanner excerpt · tooling/executor.py (reported line 126)May include surrounding context.

python
workspace: Path,
    repo_root: Path,
    strict: bool = False,
    auto_approve: set[str] | None = None,
) -> RunResult:
    units_path = workspace / "UNITS.csv"
    status_path = workspace / "STATUS.md"

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
95% confidence
Finding

At this line, the executor uses auto_approve_set to treat a HUMAN checkpoint as approved and then mutates DECISIONS.md plus unit status. That is autonomous governance action, and within the context of a purported argument self-check skill it is an unjustified privilege escalation that can bypass intended human review controls.

Content

Scanner excerpt · tooling/executor.py (reported line 137)May include surrounding context.

python
_refresh_status_checkpoint(status_path, table)
            return RunResult(unit_id=unit_id, status="DONE", message=f"HUMAN approved {checkpoint}")

        if checkpoint and checkpoint.upper() in auto_approve_set:
            set_decisions_approval(workspace / "DECISIONS.md", checkpoint, approved=True)
            row["status"] = "DONE"
            table.save(units_path)

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The auto-approval path can mark HUMAN checkpoints approved and transition units to DONE without an actual human decision, based solely on membership in auto_approve_set. In this skill context, that is especially risky because a self-checking writing aid should not possess authority to override approval gates, weakening process integrity and enabling unauthorized progression through the pipeline.

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 · tooling/executor.py (reported line 199)May include surrounding context.

python
log_path = workspace / log_rel

    try:
        completed = subprocess.run(cmd, check=False, capture_output=True, text=True)
        if completed.stdout or completed.stderr or completed.returncode != 0:
            ensure_dir(log_path.parent)
            body = [

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The contract parsing, variable names, and error strings explicitly refer to an ideation pipeline, confirming that the implementation semantics do not match the advertised argument-selfloop function. This increases the likelihood of misrouting and unsafe automation behavior because operators and upstream agents may trust the metadata and triggers while the code enforces a different workflow and different output expectations.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.