Back to skill

Security audit

assist-skills

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed project setup helper, but it should go to Review because one Windows vendoring option can write outside the selected project and the docs encourage automatic deployment from broad prompts.

Before installing, review the project files this skill will add, run a dry run first, give an explicit target directory, and avoid custom VendorDir values containing parent-directory segments or absolute paths. Do not use Force unless you intend to overwrite existing files, and treat the installed AGENTS.md, CLAUDE.md, .trae, and .codebuddy files as persistent project instructions that can affect future agent behavior.

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

Warning
Location
scripts/deploy.ps1:360
Finding
Unrestricted VendorDir Allows Filesystem Writes Outside the Target Project## Vulnerability Details **File Location**: `scripts/deploy.ps1:74` and `scripts/deploy.ps1:360-370` **Vulnerability Type**: Path traversal resulting in deployment outside the intended directory **Risk Level**: Medium ### Vulnerable Code ```powershell [string]$VendorDir = 'tools\assist-skills', ``` ```powershell $vendorRoot = (Get-AbsolutePath (Join-Path $targetRoot $VendorDir)).TrimEnd('\', '/') if ([string]::Equals($vendorRoot, $skillRoot, $pathCompare)) { Write-Host " [skip] The vendor location is the skill package itself: $vendorRoot" } else { $copiedBefore = $script:copiedCount $skippedBefore = $script:skippedCount Copy-OneTree -SourceDir $skillRoot -DestinationDir $vendorRoot ` -ExcludeTopLevel @('_meta.json', '.clawhubignore', '.clawhub', '.git', 'node_modules') ``` ### Technical Analysis The `VendorDir` parameter is documented as a path relative to the target project, but the script does not enforce that requirement. It combines attacker- or user-controlled `$VendorDir` with `$targetRoot`, canonicalizes the result, and immediately uses the resulting path as the destination for recursively copying the Skill package. No validation confirms that the canonical `$vendorRoot` remains inside `$targetRoot`. A value containing parent-directory components, such as `..\outside`, therefore resolves outside the selected project. The script also does not explicitly reject rooted paths. The existing equality check only prevents vendoring directly onto `$skillRoot`. It does not protect the intended target-project boundary. ### Attack Path 1. An attacker, unsafe wrapper, or untrusted automation influences the arguments passed to the deployment script. 2. The script is invoked with vendoring enabled and a traversal path, for example: ```powershell .\deploy.cmd -Target C:\work\project -Vendor -VendorDir ..\outside ``` 3. `Join-Path` produces a path equivalent to `C:\work ...[truncated 910 chars]
Remediation
## Remediation Suggestions Enforce that `VendorDir` is a relative path and that its canonical destination remains strictly beneath the target project: ```powershell if ([string]::IsNullOrWhiteSpace($VendorDir)) { throw 'VendorDir must not be empty.' } if ([System.IO.Path]::IsPathRooted($VendorDir)) { throw 'VendorDir must be relative to the target project.' } $vendorRoot = [System.IO.Path]::GetFullPath( (Join-Path $targetRoot $VendorDir) ).TrimEnd('\', '/') if (-not $vendorRoot.StartsWith($targetRoot + $sep, $pathCompare)) { throw 'VendorDir must remain inside the target project.' } ``` Additionally: 1. Reject a destination equal to the target root, preventing the package from being spread directly across the project. 2. Preserve the existing check that prevents copying onto the Skill source directory. 3. Before writing, resolve and validate existing parent directories to account for directory junctions or symbolic links that may redirect writes outside the project. 4. Add automated tests for `..\outside`, nested traversal, rooted paths, UNC paths, mixed separators, case variations, and valid nested paths. 5. Require explicit confirmation when `-Force` and `-Vendor` are used together, because that combination can overwrite files recursively.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (46)

Ae1

High
Category
analysis-evasion
Content
| `-IncludeSkillFiles` / `--include-skill-files` | 额外复制 `README.md`、`README.en.md`、`SKILL.md`、`scripts/` |
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Credential Access

High
Category
Privilege Escalation
Content
# AI 研发规范包安全 gitignore 模板

# 环境变量与密钥
.env
.env.*
*.pem
*.key
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
# 云厂商与工具凭据
.aws/
.azure/
.gcloud/
.kube/
.npmrc
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
.azure/
.gcloud/
.kube/
.npmrc
.pypirc

# 本地配置与临时文件
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Hidden Instructions

High
Category
Prompt Injection
Content
<#
.SYNOPSIS
  assist-skills 参考资料包一键部署脚本(Windows / PowerShell)。
Confidence
60% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Natural-Language Policy Violations

Medium
Confidence
97% confidence
Finding
The instruction '所有输出建议使用中文' imposes a language preference across the skill without an explicit opt-in or alternative language path. Under the policy, forcing a specific language without user choice is a natural-language policy violation unless it is clearly justified as region-specific or optional.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The trigger examples include very broad everyday phrases such as task-starting and task-ending expressions that are likely to appear in normal conversation. In an agent skill, this can cause unintended invocation of workflows, leading the assistant to create files, scan the repository, or alter project artifacts when the user did not explicitly intend to activate the skill.

Vague Triggers

Medium
Confidence
94% confidence
Finding
The optional capability triggers use generic phrases like 'design', 'review', 'summary', or 'write tests' without strong activation boundaries. These words are common in ordinary developer discussion, so the skill may activate the wrong workflow and perform unintended reads, writes, or analysis on the codebase based on incidental language.

Vague Triggers

Medium
Confidence
92% confidence
Finding
The trigger phrases are broad, natural-language workflow commands such as '开始任务' and '开始编码', which can plausibly appear in ordinary conversation or project coordination. In an agent skill, ambiguous activation language can cause unintended instruction execution, context loading, or workflow transitions without explicit user intent, which is a prompt-safety and control-boundary issue.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The README encourages one-click deployment that copies and renames files directly into a target project, including hidden tool-rule locations, but it does not prominently warn users to verify the destination, review overwritten/added files, back up work, or understand trust implications before running. In a skill intended for broad team distribution and double-click execution, this omission increases the chance of accidental modification of repositories, configuration poisoning, or propagation of unreviewed assistant rules across projects.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The skill advertises a very broad natural-language trigger such as deploying or initializing AI workflow from a casual request, which can cause the agent to perform file-copying and script-execution actions without sufficiently explicit user authorization. In this skill, those actions modify the target project and may vendor in additional files, so ambiguous invocation increases the chance of unintended state-changing operations.

Vague Triggers

Medium
Confidence
97% confidence
Finding
The embedded agent instructions tell the AI to act autonomously on broad phrases like '部署 AI 开发助手', '接入 AI 开发流程', and '初始化 AI 开发流程', and explicitly say not to ask the user to run commands manually. This encourages automatic execution of deployment scripts and project modification based on ambiguous language, creating a prompt-to-action path that could be triggered unintentionally or through conversational manipulation.

Natural-Language Policy Violations

Medium
Confidence
91% confidence
Finding
This markdown file appears to require Chinese for all user-facing guidance, and it does not offer an opt-in language choice or explain that the skill is intentionally limited to a Chinese-speaking audience. Under the policy rule for language or locale constraints, forcing a specific language without user choice can be a natural-language policy violation.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
This markdown file explains that deployment scripts will copy the entire skill package into the target project's root and place rule files in hidden tool-specific directories. Although options like dry-run and force are mentioned, there is no prominent user warning about the fact that project files and directories will be created or modified, which could affect the user's workspace.

Natural-Language Policy Violations

Medium
Confidence
90% confidence
Finding
The title and the entire document are written in Chinese, and the guidance is presented as the required operating format without any indication that users may choose another language. Under the policy criteria, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified.

Vague Triggers

Medium
Confidence
91% confidence
Finding
The trigger phrase "完成任务" is very broad and resembles ordinary project conversation, so it can be activated unintentionally during normal discussion rather than through a clearly scoped command channel. In this skill, activation can lead to file updates and project record generation, which raises the risk of unintended workflow actions or state changes.

Vague Triggers

Medium
Confidence
90% confidence
Finding
The phrase "开始编码" is ambiguous and likely to appear in normal collaboration, making accidental invocation plausible if the agent listens for natural-language triggers. In this skill context, that could initiate code generation or modification without sufficiently deliberate user intent, especially because the skill is designed to operate directly on project tasks.

Vague Triggers

Medium
Confidence
89% confidence
Finding
The trigger phrase "执行测试" is too generic and can easily overlap with routine discussion about testing, which creates a risk of unintended test execution. In this skill, running tests may consume resources, alter local state, or generate artifacts/logs, so accidental activation is more dangerous than a read-only action.

Natural-Language Policy Violations

Medium
Confidence
90% confidence
Finding
The entire template, including headings and field labels, is written only in Chinese, which imposes a specific language on users. The file does not indicate that Chinese is optional, configurable, or required for a documented region-specific purpose, so it creates a natural-language locale policy concern.

Vague Triggers

Medium
Confidence
92% confidence
Finding
The trigger phrase "设置项目" is very generic and can easily match ordinary user requests that are not intended to invoke this initialization workflow. In a skill that can scan project directories and update AGENTS.md, overly broad activation increases the chance of accidental execution and unintended file modifications, even though the workflow itself is not overtly malicious.

Vague Triggers

Medium
Confidence
91% confidence
Finding
The trigger list includes very generic activation terms such as “启动任务”, which can match ordinary conversation and cause the workflow to fire unintentionally. In a skill that creates directories and generates project files, accidental activation can lead to unapproved filesystem changes, noisy repository artifacts, and workflow execution outside the user’s intent.

Vague Triggers

Medium
Confidence
91% confidence
Finding
Line L03 includes the trigger phrase “帮我理需求”, which is broad natural language that could plausibly appear in ordinary conversation rather than a narrowly scoped workflow invocation. The file does not provide exclusion conditions or negative examples to clarify when this phrase should or should not activate the skill.

Natural-Language Policy Violations

Medium
Confidence
89% confidence
Finding
The workflow content is written entirely in Chinese and defines trigger phrases only in Chinese, with no indication that users may interact in other languages or choose a preferred locale. This creates a natural-language policy concern because the skill appears to enforce a specific language without explicit opt-in or documented region-specific justification.

Vague Triggers

Medium
Confidence
87% confidence
Finding
This markdown file defines activation phrases, so vague-trigger review applies. While several triggers are specific, "验证测试" is comparatively broad natural language that could match general user intent to verify something, without clearly limiting scope to this workflow or providing exclusion examples.

Vague Triggers

Medium
Confidence
92% confidence
Finding
The trigger list includes the everyday phrase “收工”, which is broad and conversational enough to be invoked unintentionally in normal chat. Because this workflow then proceeds to inspect task directories and generate or update `ai-usage-record.md`, accidental activation could cause unintended file scanning and writes without a clearly scoped confirmation step.

Static analysis

No suspicious patterns detected.