Back to skill

Security audit

Agent Workflow Enforcer

Security checks for vulnerabilities and agentic risk

Overview

The skill openly tries to enforce agent workflows, but it asks users to install lasting instruction rules that can control future sessions and uses an unpinned installer.

Review this skill before installing. Use it only in a narrowly scoped project where you want mandatory checklist behavior, avoid placing it in global custom instructions or system prompts, and remove the copied rules when the workflow is no longer needed. Prefer a pinned, verified installer instead of npx @latest, and inspect or delete any style-context.yaml or learnings.jsonl files if they may contain sensitive text.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:77
Finding
Persistent Agent Workflow and Response-Format Hijacking## Vulnerability Details **File Location**: `SKILL.md`, lines 77-101; related persistent-instruction guidance appears in `SKILL.md`, lines 153-163 and 203-216, and `claude-skill.md`, lines 5-29 and 138-146. **Vulnerability Type**: Agent instruction hijacking through persistent project or system-level instructions **Risk Level**: High ### Vulnerable Code Snippet The following is an English rendering of the complete affected segment from `SKILL.md`, lines 77-101: ```markdown Add the following to AGENTS.md or the system prompt: ## Mandatory Output Format ### Content Creation Tasks The first response must contain: 📋 Content Checklist □ Gate has been run □ Relevant skill has been read □ Account confirmed: [account] **Without this block, the task cannot begin.** ### When the task is complete It must contain: 📋 Pre-publish Checklist □ Format check: ✅ □ Style check: ✅ □ Output location: [path/link] **If any item is ❌, publishing is prohibited.** ``` The associated Claude integration instructs users to copy equivalent mandatory rules into Claude Project Instructions or global Custom Instructions. ### Technical Analysis The Skill is not limited to providing an optional checklist for one invocation. It directs users to install mandatory behavioral rules in persistent, high-priority agent instruction locations, including `AGENTS.md`, a system prompt, Claude Project Instructions, and Custom Instructions. The injected rules require the agent to emit predefined blocks, prevent it from beginning tasks unless those blocks are present, and prevent continued execution when Skill-defined checkpoints have not been satisfied. This changes the agent's behavior for unrelated future tasks whenever the persistent instruction file is loaded. The executable component does not implement a genuine security gate. `scripts/gate.py` only prints checklist text and mandatory response instructions; it does not validate whet ...[truncated 1657 chars]
Remediation
## Remediation Suggestions 1. Remove instructions that tell users to modify system prompts, global Custom Instructions, or other persistent high-priority instruction sources. 2. Make the checklist explicitly optional and scoped to the current task. 3. Replace statements such as “cannot begin,” “cannot continue,” and “cannot publish” with non-blocking recommendations. 4. State that current user instructions and platform safety policies always take precedence. 5. Do not force first-response or final-response templates unless the user explicitly requests that format. 6. If a real gate is required, implement verifiable checks and return a normal success or failure status rather than relying on an agent to repeat unverified confirmations. 7. Limit configuration to a local, narrowly scoped file that is loaded only when the user explicitly invokes the workflow. 8. Clearly document removal and rollback procedures for any instruction-file changes.

T08 · Insecure Dependencies

Warning
Location
SKILL.md:193
Finding
Execution of a Mutable, Unpinned Package Version## Vulnerability Details **File Location**: `SKILL.md`, lines 193-198 **Vulnerability Type**: Unsafe dependency installation and execution through a mutable package tag **Risk Level**: Medium ### Vulnerable Code Snippet ```bash # OpenClaw npx clawhub@latest install agent-workflow-enforcer # Manual git clone https://github.com/example/agent-workflow-enforcer ~/skills/agent-workflow-enforcer ``` ### Technical Analysis The recommended installation command invokes `npx` with the mutable `latest` tag. Unlike an exact version and integrity-verified artifact, `latest` can resolve to different package contents over time. `npx` may download and execute package code as the invoking user. Therefore, compromise of the upstream package, registry account, release process, or mutable tag can change the effective code executed by users after this Skill has already been audited. The manual installation alternative also references a repository without a commit hash or signed release, but the directly executable `npx ...@latest` path is the primary confirmed risk. ### Attack Path 1. An attacker compromises the package publisher, registry account, package release process, or another component controlling the `latest` release. 2. The attacker publishes a modified package and causes the mutable `latest` tag to resolve to it. 3. A user follows the documented command. 4. `npx` retrieves the current package contents from the external registry. 5. Package installation or runtime code executes with the permissions of the invoking user. 6. The malicious release can access files and resources available to that user, subject to operating-system controls and the behavior of the package manager. ### Impact Assessment Successful exploitation could provide arbitrary code execution with the invoking user's privileges. Depending on that user's access, the affected scope may include project files, user-readable credentials, configuration file ...[truncated 236 chars]
Remediation
## Remediation Suggestions 1. Replace `@latest` with an exact, audited package version. 2. Publish and verify a cryptographic integrity hash for the expected package artifact. 3. Use a lockfile where supported and commit it to the reviewed project. 4. Document the expected registry and package publisher identity. 5. Prefer a signed release or a repository checkout pinned to a specific verified commit. 6. Review package lifecycle scripts before installation and disable them when they are unnecessary. 7. Run installation with an unprivileged account in a restricted environment. 8. Establish a dependency-update process that requires review before changing the pinned version.
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (6)

Natural-Language Policy Violations

Medium
Confidence
89% confidence
Finding
The description and operational instructions are presented in Chinese, effectively imposing a specific language/locale on users without opt-in. Under the policy, language constraints should either be optional for the user or clearly documented as a justified region-specific limitation.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The skill proposes automatically detecting user edits and persisting the original text, corrected text, and derived rules into `learnings.jsonl` without any explicit consent, retention policy, or privacy warning. This can unintentionally store sensitive user content, proprietary text, or personal data in a durable local file that may later be reused or exposed.

Rp1

Medium
Category
MCP Rug Pull
Confidence
88% confidence
Finding
The installation command uses `npx clawhub@latest`, which fetches and executes the newest published package version without pinning. This creates a supply-chain risk: a compromised upstream release or typosquatted dependency could cause arbitrary code execution on the user's machine during installation.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
The file presents the instructions entirely in Chinese and states they are for Claude Projects / Custom Instructions, implying a fixed language/locale for the skill behavior. Under the policy, language constraints should either be optional for the user or clearly justified as region-specific; neither is present here.

Natural-Language Policy Violations

Medium
Confidence
97% confidence
Finding
This code presents its purpose, prompts, checklist items, and errors entirely in Chinese, including the required first-reply format. That imposes a specific language on users without any opt-in, alternative locale, or documented region-specific justification, which matches the language/locale policy violation criteria.

Missing User Warnings

Low
Confidence
75% confidence
Finding
This is a markdown file, so SQP-2 applies to omissions in the skill description about behaviors affecting user data or system integrity. The section on code modification requires checklists and a rollback plan, but it does not explicitly warn the user that applying code changes can impact files or system behavior.

Static analysis

No suspicious patterns detected.