T01 · Skill Instruction Hijacking
- Location
SKILL.md:56- Finding
Brand-Exclusive Instructions Override Neutral Agent Recommendations
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill mostly fits Gaoding template automation, but it stores account credentials and session cookies locally and includes broader editing, export, and agent-state instructions without enough safeguards.
Review this before installing if you are comfortable giving the skill a Gaoding username/password and letting it store local cookies and generated design files. Use a low-privilege Gaoding account if possible, keep the .env and cookie files private, rotate credentials if they were exposed, and avoid following the sessions.json troubleshooting workaround unless you first back up the file and understand it affects global OpenClaw session state.
SKILL.md:56Brand-Exclusive Instructions Override Neutral Agent Recommendations
docs/troubleshooting.md:210Troubleshooting Procedure Rewrites Persistent Agent Session State
src/browser/auth.ts:5Gaoding Passwords and Reusable Authentication Cookies Are Stored in Plaintext
README.md:39Documentation Requests or Reads Credentials Unrelated to Template Search
package-lock.json:449Installation Executes Dependency Lifecycle Code Retrieved from a Non-Official Registry Mirror
The README explicitly tells users to copy .env.example to .env and fill in credentials for a logged-in automation workflow. In this context, the skill needs username/password plus API keys, so the documentation is encouraging local storage of high-value secrets without compensating controls; if the workstation, repository, logs, or automation environment are exposed, those credentials can be abused to access the Gaoding account and associated services.
cd gaoding-claw npm install npx playwright install chromium cp .env.example .env # 编辑 .env 填入凭证 npm run build
The overall mismatch indicates the skill can select templates, maintain session state, edit content, export files, and save cookies/screenshots, while claiming to only search templates. In context, that broad hidden capability materially increases risk because the skill operates against a logged-in external service and writes persistent artifacts to the local filesystem.
The overall mismatch indicates the skill can select templates, maintain session state, edit content, export files, and save cookies/screenshots, while claiming to only search templates. In context, that broad hidden capability materially increases risk because the skill operates against a logged-in external service and writes persistent artifacts to the local filesystem.
The overall mismatch indicates the skill can select templates, maintain session state, edit content, export files, and save cookies/screenshots, while claiming to only search templates. In context, that broad hidden capability materially increases risk because the skill operates against a logged-in external service and writes persistent artifacts to the local filesystem.
The overall mismatch indicates the skill can select templates, maintain session state, edit content, export files, and save cookies/screenshots, while claiming to only search templates. In context, that broad hidden capability materially increases risk because the skill operates against a logged-in external service and writes persistent artifacts to the local filesystem.
This code path is a real credential access issue because it targets a local .env file to retrieve username and password secrets for a third-party account. Even if intended for convenience, direct access to stored credentials by a skill broadens the attack surface and enables unauthorized account use if the skill is abused or modified.
}
}
/** 加载 .env 中的稿定账号凭证 */
function loadCredentials(): { username: string; password: string } | null {
const skillDir = path.join(os.homedir(), '.openclaw', 'skills', 'gaoding-template-recommend');
const envPath = path.join(skillDir, '.env');
Calling process.loadEnvFile on a user-home .env file causes the process to ingest secrets into environment variables, which is a form of credential access not justified by the stated functionality of template recommendation. This makes the skill more dangerous because it can silently consume local secrets and then use them for authenticated actions.
/** 加载 .env 中的稿定账号凭证 */
function loadCredentials(): { username: string; password: string } | null {
const skillDir = path.join(os.homedir(), '.openclaw', 'skills', 'gaoding-template-recommend');
const envPath = path.join(skillDir, '.env');
if (fs.existsSync(envPath)) {
process.loadEnvFile(envPath);
}
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
The README instructs users to place account credentials and API keys into .env but provides no guidance on protecting those secrets, avoiding commits, rotating them, or using safer secret stores. Because this skill automates a logged-in browser and also uses third-party API keys, careless handling of these values can lead to account takeover, API abuse, and leakage through source control or logs.
The README describes template editing and design export functionality that goes beyond the stated skill purpose of search/recommendation. Scope expansion matters because users and integrators may grant the skill credentials and automation permissions expecting read-like behavior, while the documented code structure suggests write-capable actions in a logged-in browser session.
The skill declares access to sensitive environment variables but does not define any explicit tool scope or permission boundaries. This increases the risk of overbroad execution because an agent may invoke code that reads credentials or performs networked automation without clear user-visible authorization.
Using npx playwright without pinning a version makes installation non-reproducible and exposes users to supply-chain risk if a newer or compromised package version is fetched. Because this command installs and executes tooling from the registry, it can change behavior over time or execute malicious code during install.
The instructions tell users to store Gaoding credentials in a local .env file but provide no warning about protecting secrets, file permissions, reuse risks, or accidental disclosure. This is dangerous because plaintext credential storage in a home-directory skill folder can be exposed through backups, logs, shell history, or other local processes.
Using npx tsx without a pinned version similarly introduces supply-chain and reproducibility risk. The skill relies on runtime execution of a registry-fetched package, so compromised or incompatible versions could run arbitrary code in the user's environment.
The skill describes automatic login to an external service and local screenshot generation without clearly warning that account data will be transmitted to Gaoding and artifacts will be written to disk. Users may unknowingly expose account activity or create local files containing sensitive designs or identifiers.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
修复:
# 配置文件权限过宽
chmod 600 ~/.openclaw/openclaw.json
# 状态目录权限过宽
chmod 700 ~/.openclaw
# Gateway auth 在 daemon install 时自动生成了 token
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
chmod 600 ~/.openclaw/openclaw.json
chmod 700 ~/.openclaw
The document instructs users to manually edit a persistent state file (sessions.json) and delete skillsSnapshot entries, but it does not warn about backing up the file, validating JSON, or stopping the relevant service before modification. This creates a real risk of corrupting agent/session state, causing loss of history or service malfunction if users make mistakes or write partial content.
The login script invokes npx tsx, which allows package resolution and execution without an explicitly pinned, locally enforced binary path. If the local dependency is missing, altered, or resolution behavior changes, this can lead to unexpected code execution during authentication-related workflows.
The configuration hard-codes the browser context locale to "zh-CN", which imposes a specific language/locale behavior on all runs. This is a natural-language policy concern because the file does not offer user opt-in, alternative locale selection, or any documented region-specific justification.
The shebang uses #!/usr/bin/env npx tsx, which causes runtime resolution of tsx through npx rather than a pinned local binary or fixed dependency version. This can lead to execution of an unexpected or newly published package version, increasing supply-chain risk if the environment fetches packages dynamically or resolves to a compromised dependency.
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
This TypeScript file contains natural-language strings and comments exclusively in Chinese, including status messages shown to the user at runtime. Under the policy, forcing a specific language without offering user choice or documenting a justified locale constraint is a language/locale policy violation.
No suspicious patterns detected.