Back to skill

Security audit

Harness Engineering

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent coding-workflow skill, but it can automatically commit and push repository changes without a clear user approval checkpoint.

Before installing, be prepared for the skill to create .harness workflow files and generate Chinese-language planning/review reports. Do not let it commit or push unless you have reviewed the staged diff, commit message, remote URL, branch, and any CI/CD or deployment effects.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:130
Finding

Automatic Git Push Without Explicit User Authorization

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 130–135 and 364–373
Vulnerability Type: Unauthorized remote repository modification
Risk Level: Medium

Vulnerable Code

markdown
### 阶段 5:交付(Delivery)

1. Evaluator 确认修复通过 → 状态改为 APPROVED
2. Generator 执行 git commit + push
3. 更新 `summary.md` 为 DELIVERED 状态
4. 向用户报告交付结果
markdown
### 完整任务(FULL)

1. 创建变更目录
2. Generator Agent: spec.md + tasks.md
3. Generator Agent: 编码 + coding_report.md + self_review.md
4. Evaluator Agent: code_review_v1.md
5. 如果有 MUST FIX → Generator Agent 修复 → revision_report.md
6. Evaluator Agent: 确认通过
7. git commit + push
8. 更新 summary.md

Technical Analysis

The FULL delivery workflow makes git commit + push a standard mandatory step after evaluator approval. It does not require separate user authorization before the remote write, nor does it require validation of the destination remote, branch, repository ownership, branch protection status, commit contents, or authentication context.

A Git push uses credentials already available to the Agent's execution environment. Consequently, the workflow may cross a least-privilege boundary: authorization to edit a local working tree is implicitly treated as authorization to publish those changes remotely. Evaluator approval is a code-quality gate, not evidence that the user authorized a remote repository operation.

Although the lightweight website workflow requires confirmation before implementation, the audited FULL workflow does not define an equivalent confirmation gate immediately before committing and pushing.

Attack Path

  1. A user requests a coding change sufficiently large to be classified as a FULL task.
  2. The Agent follows the Skill and modifies the local repository.
  3. The Generator and Evaluator complete the required review stages.
  4. The Evaluator marks the change as approved.
  5. The delivery instructions direct the Generator to execute git commit + push.
  6. Git uses credentials availab ...[truncated 987 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove automatic git push from the default delivery workflow.
  2. Require explicit, contemporaneous user approval immediately before any remote write.
  3. Before requesting approval, present:
    • The complete staged diff or a clear diff summary
    • The proposed commit message
    • The destination repository and remote URL
    • The target branch
    • Whether the branch is shared or protected
    • Any CI/CD or deployment actions expected from the push
  4. Separate local and remote operations:
    • Local edits should be allowed by default.
    • A local commit should occur only when requested or clearly authorized.
    • A push should require separate explicit authorization.
  5. Default to a new non-protected feature branch rather than the current branch.
  6. Prohibit force pushes, tag publication, release creation, and protected-branch writes unless each operation is specifically authorized.
  7. Validate the remote destination and upstream branch before execution.
  8. Stop and ask the user if credentials, repository ownership, branch destination, or deployment effects are ambiguous.
  9. Record the user's approval and the exact pushed commit hash in summary.md.
  10. Replace the affected workflow step with language such as:
markdown
7. Prepare the proposed commit and report the diff, commit message, remote, and branch.
8. Commit only if authorized by the user.
9. Push only after obtaining separate explicit user approval for the stated remote and branch.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (11)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly instructs the agent to perform git commit + push during delivery, which can transmit code and change history to a remote repository without an explicit confirmation step or user-facing warning. In an agentic workflow, this is dangerous because it turns a local coding task into an external side effect that may leak proprietary code, secrets, or incomplete changes if the remote is configured unexpectedly.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This markdown file is entirely written in Chinese and presents the coding rules template only in that language, with no indication that language selection is optional. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is clearly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The entire skill is written as a Chinese-only SOP, including required report labels and review outputs, with no indication that the user may choose another language. This is a natural-language locale policy concern because it implicitly constrains operation to a specific language without opt-in or justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This markdown template is written to produce a code review report in Chinese, beginning with a Chinese title and continuing with Chinese field labels. The file does not indicate that language selection is optional or that the skill is limited to a Chinese-language context, which creates a natural-language locale policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This markdown file is written entirely in Chinese and provides no indication that language selection is optional or that the skill is intentionally limited to a Chinese-speaking context. Under the language/locale policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

This markdown template is written entirely in Chinese and includes fixed Chinese section headings and field labels, which implies the generated revision report must be in Chinese. The policy allows locale constraints only when user choice is offered or the regional limitation is clearly documented and justified, neither of which appears here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This markdown template is entirely written in Chinese, including all section headings and placeholders, which implicitly requires users to author specifications in a specific language. The policy allows locale constraints only when they are optional or clearly justified, neither of which is present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This markdown template is written primarily in Chinese, including the title, field names, and workflow sections, which effectively imposes a specific language on generated artifacts. The file does not indicate that Chinese is optional, user-selected, or required for a region-specific purpose, so it conflicts with the policy against forcing a language without opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown template forces a specific language/locale for task descriptions and headings across the entire file. The policy allows locale constraints only when users are given a choice or the restriction is explicitly justified, neither of which appears here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The entire skill document is written in Chinese and provides no indication that users may choose another language or that the skill is intended only for a Chinese-speaking or region-specific context. Under the policy, a fixed language requirement without opt-in or clear justification is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

Even in the lightweight website workflow, instructing the agent to run git commit creates persistent repository-side effects without clearly warning the user that version history will be modified. While less severe than push, it can still record sensitive or unintended files, trigger local hooks, and make cleanup harder in automated environments.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.