Back to skill

Security audit

Flow Hugo Publisher

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Hugo publishing helper, but it needs review because its automated Git workflow can stage and push more files than the user likely intended.

Install only if you are comfortable with an agent managing a Hugo Git repository and publishing to GitHub Pages. Before allowing commits or pushes, review the exact staged files and avoid `git add .`; check for `.env`, private drafts, credentials, local config, and unrelated files. Treat the state file as persistent local metadata, and review generated GitHub Actions dependencies before use.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
references/workflow.md:185
Finding

Shell Injection Through Interpolated User-Controlled Values

Content
View full analysis
" ``` ```bash git -C "" add . git -C "" commit -m "" git -C "" rev-parse --short HEAD ``` ```bash printf '%s\n' "" > "/static/CNAME" git -C "" add hugo.toml git -C "" add static/CNAME git -C "" commit -m "chore(hugo): configure custom domain" git -C "" push origin "" ``` ### Technical Analysis The workflow inserts values derived from users or repository state—including workspace paths, commit messages, custom domains, and branch names—directly into shell command templates. Double quotation marks prevent ordinary argument splitting but do not make an interpolated shell command safe. If the implementation replaces placeholders and then evaluates the completed command through a shell, shell constructs such as command substitution remain active. For example, a commit message containing `$(malicious-command)` could be evaluated before being passed to Git. The issue applies particularly to: - User-provided commit messages. - User-selected workspace paths. - User-provided custom domains. - Branch names read from repositories that may be attacker-controlled. - Theme names or paths if they are handled using the same substitution model. Whether exploitation succeeds depends on the execution layer. The vulnerability is exploitable when these templates are rendered into command strings and passed to a shell rather than invoked through a structured argument-array API. ### Attack Path 1. An attacker sup ...[truncated 1196 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
references/workflow.md:307
Finding

Overbroad Git Staging Can Publish Sensitive Workspace Files

Content
View full analysis
" add . git -C "" commit -m "" ``` The daily publishing path also stages the entire workspace after initially staging content: ```bash git -C "" add content git -C "" add . git -C "" commit -m "" git -C "" push origin "" ``` ### Technical Analysis The declared daily workflow focuses on publishing Hugo content, and its detection step is limited to changes under `content/`. However, the subsequent `git add .` stages every eligible changed or untracked file in the repository. This exceeds the minimum scope necessary for routine article publication. Files unrelated to the requested operation can be included without a file-by-file review. Potential examples include: - `.env` and local credential files. - Private drafts outside the expected content path. - Local configuration containing tokens or service URLs. - Generated artifacts and logs. - Editor backups or temporary files. - Unrelated source-code or configuration changes. The later `git push` sends the resulting commit to the configured remote. If the repository or GitHub Pages site is public, accidentally staged data may become publicly accessible and remain recoverable from Git history even after a later deletion. ### Attack Path 1. A sensitive or unrelated file exists inside the Hugo Git working tree and is not excluded by `.gitignore`. 2. The user requests routine article publication. 3. The workflow detects expected changes under `content/`. 4. The workflow executes `git add .`, staging both the expected article changes and the unrelated file. 5. The workfl ...[truncated 1104 chars]
Remediation
View remediation
" diff --cached --name-status ``` 4. Require explicit user confirmation of the staged file list before both commit and push. 5. Check for sensitive filenames and patterns, including `.env`, private keys, credential files, token-bearing configuration, archives, and editor backups. 6. Generate or verify a Hugo-appropriate `.gitignore` before the first commit. 7. Abort publication when suspicious files are staged unless the user explicitly approves each file after a warning. 8. Consider running a secret scanner against the staged diff before remote publication. 9. Use `git add -- ` so leading-hyphen filenames cannot be interpreted as options. ]]>

T08 · Insecure Dependencies

Warning
Location
references/github-actions.md:44
Finding

GitHub Actions Dependencies Are Referenced by Mutable Version Tags

Content
View full analysis
Remediation
View remediation
# v4.x.x ``` 2. Pin the third-party Hugo setup action to a verified commit and review its source and release provenance. 3. Prefer first-party or locally controlled setup mechanisms where practical. 4. Use Dependabot or another controlled update process to propose SHA updates through reviewed pull requests. 5. Retain version comments beside pinned SHAs to preserve maintainability. 6. Keep workflow permissions at the minimum required level and consider declaring permissions per job rather than globally. 7. Separate build and deployment privileges so the build job does not receive Pages write or OIDC permissions unless required. 8. Review transitive behavior, release provenance, and security advisories for each action before updating its pin. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (14)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger phrases are broad enough to overlap with normal conversation about Hugo, Git, directories, and publishing, which can cause the skill to activate when the user did not intend to start a stateful, command-oriented workflow. In this skill, unintended activation is more dangerous because the default mode is '全托管执行' and later steps include filesystem changes, Git initialization, commits, and deployment guidance.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill persists project metadata to ~/.openclaw/state/hugo-publisher-state.json but does not prominently disclose this host-level write behavior at trigger time or before first use. This can surprise users, leak sensitive local path and repository metadata, and create privacy or integrity issues if users did not consent to persistent storage in their home directory.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · SKILL.md (reported line 82)May include surrounding context.

若目录不存在,先提示并确认后创建:

bash
mkdir -p "<workspacePath>"

步骤 3:Hugo 模板初始化(仅首次)

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · SKILL.md (reported line 82)May include surrounding context.

若目录不存在,先提示并确认后创建:

bash
mkdir -p "<workspacePath>"

步骤 3:Hugo 模板初始化(仅首次)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The document provides ready-to-run shell templates that write files, stage changes, commit, and push to a remote repository, but it does not include an explicit warning that these actions will modify repository contents and publish changes externally. In the context of an agent skill that may execute or suggest commands on a user's behalf, this increases the risk of unintended remote publication or repository changes without sufficiently informed consent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The title and all required confirmation templates are written as mandatory Chinese interaction copy, and the file does not mention any option to adapt language to user preference. This can violate language/locale policy when a skill is expected to respect the user's chosen language unless a locale restriction is explicitly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

The entire skill reference is written only in Chinese and does not mention any option for users to choose another language or locale. Under the stated policy, forcing a specific language without user opt-in can be a natural-language policy violation unless the locale restriction is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/workflow.md (reported line 52)May include surrounding context.

安装引导(Ubuntu/Debian)

bash
sudo apt-get update
sudo apt-get install -y hugo git

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/workflow.md (reported line 53)May include surrounding context.

安装引导(Ubuntu/Debian)

bash
sudo apt-get update
sudo apt-get install -y hugo git

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The workflow explicitly writes repository files such as a GitHub Actions workflow and a deployment guide, which changes local project state and repository behavior. Although this is part of the skill's purpose, the instructions do not require a strong warning that these file writes will modify the user's repo configuration and may affect future deployments, so a user could authorize broader changes than intended.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The workflow instructs committing and pushing deployment-related files to the remote repository, which can immediately publish changes externally via GitHub Actions. Without an explicit warning that push will expose local changes to a public or shared remote, the skill could cause unintended publication or disclosure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The workflow modifies site-routing and deployment files, including baseURL and static/CNAME, which can redirect traffic or break site availability if misconfigured. Because these changes affect public resolution and deployment behavior, the absence of a clear warning and validation step creates avoidable risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The workflow uses broad staging commands like 'git add .' before commit and push, which can capture unintended files such as secrets, local configs, or unrelated changes. In a publishing skill that culminates in a remote push and automated deployment, this materially increases the chance of accidental exposure.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

The natural-language instructions are presented only in Chinese, which can amount to a language-policy issue when no user opt-in or locale justification is provided. SQP-3 applies to all file types and covers forced language or locale choices in natural-language content.

Content

No source excerpt is available for this finding.