Back to skill

Security audit

Svn Tool

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent SVN helper, but it includes under-warned commands that can delete local work or cached SVN credentials and an unsafe certificate-trust bypass example.

Review before installing or using this skill in an agent that can run commands automatically. Require explicit approval before commits, deletes, recursive reverts, cleanup operations, or auth-cache changes, and avoid `--trust-server-cert` unless the certificate has been verified through a trusted channel.

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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
examples/README.md:191
Finding
Unsafe SVN Server Certificate Trust Bypass<![CDATA[ ## Vulnerability Details **File Location**: `examples/README.md:191` and `SKILL.md:54` **Vulnerability Type**: TLS certificate validation bypass **Risk Level**: Medium ### Vulnerable Code ```bash svn checkout --trust-server-cert https://svn.example.com/repo ``` The same unsafe option is also presented in `SKILL.md:54`: ```text --trust-server-cert ``` ### Technical Analysis The documentation recommends `--trust-server-cert` as a normal checkout option without requiring certificate fingerprint verification or restricting its use to a specific, previously verified certificate. Trusting an unverified server certificate weakens the authentication guarantees provided by TLS. If an Agent follows this guidance in an environment affected by DNS spoofing, network interception, a compromised proxy, or an incorrectly configured repository URL, it may accept a certificate presented by an attacker-controlled SVN endpoint. This can allow the endpoint to impersonate the intended repository server. The option does not independently create a network interception condition, but it removes an important protection that would otherwise warn the user or stop the connection. ### Attack Path 1. A user asks the Agent to check out an SVN repository. 2. The attacker gains a network interception position, compromises DNS resolution, controls a proxy, or persuades the user to use an attacker-controlled repository endpoint. 3. The malicious endpoint presents an untrusted or mismatched TLS certificate. 4. The Agent follows the documented example and invokes `svn checkout` with `--trust-server-cert`. 5. Certificate validation warnings are bypassed or accepted. 6. The Agent communicates with the impersonated SVN server. 7. Depending on the SVN authentication workflow, repository credentials, authentication tokens, checked-out source content, or future committed content may be exposed to the attacker. ### Impact Assessment Successful exploitation may compromise the confide ...[truncated 632 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove `--trust-server-cert` from routine checkout examples. 2. Require normal CA and hostname validation for all HTTPS SVN connections. 3. For private certificate authorities, install the organization’s CA certificate into the appropriate trusted certificate store instead of bypassing validation. 4. If a self-signed certificate is unavoidable, obtain its fingerprint through a separate trusted channel and verify it before accepting the certificate. 5. Require explicit user approval before changing certificate trust behavior. 6. Document the expected repository hostname and certificate identity. 7. Prefer a scoped, one-time exception only after verification rather than permanently caching unverified trust. 8. Add a warning explaining that certificate trust bypasses must never be used merely to suppress unexpected TLS errors. ]]>

T09 · Insecure Skill Coding Practices

Note
Location
examples/README.md:206
Finding
Overbroad Recursive Deletion of SVN Authentication Cache<![CDATA[ ## Vulnerability Details **File Location**: `examples/README.md:206` **Vulnerability Type**: Destructive and insufficiently scoped credential-cache cleanup **Risk Level**: Low ### Vulnerable Code ```bash rm -rf ~/.subversion/auth/* ``` ### Technical Analysis The troubleshooting instructions recursively delete every entry under the current user’s SVN authentication cache. The command is not scoped to the repository or authentication realm experiencing the problem and does not include a confirmation, backup, inspection, or recovery step. Although the path is statically written and does not exhibit command injection, `rm -rf` performs irreversible recursive deletion. Following this advice for one failed repository login can remove valid authentication state associated with unrelated SVN repositories. The primary security concern is insecure operational guidance and loss of credential availability. The command does not expose credential contents to an attacker and does not elevate privileges. ### Attack Path 1. An SVN authentication failure occurs, or an attacker induces a misleading authentication error. 2. The user asks the Agent to troubleshoot the failure. 3. The Agent follows the documented remediation and executes `rm -rf ~/.subversion/auth/*`. 4. All cached SVN authentication entries owned by the current user are deleted, including entries unrelated to the affected repository. 5. Subsequent SVN operations require reauthentication and may interrupt automated workflows. 6. The user may need to re-enter credentials across multiple repositories, increasing operational disruption and the possibility of credentials being entered into an unintended endpoint if the original connection problem was caused by spoofing. ### Impact Assessment The direct scope is limited to files within the current user’s `~/.subversion/auth/` directory. Potential effects include: - Loss of all cached SVN authentication state for the current user. - Authentication fa ...[truncated 411 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Do not recommend deleting the entire authentication cache as the first troubleshooting step. 2. Inspect the cache and identify the entry corresponding to the affected authentication realm. 3. Remove or quarantine only the relevant realm entry. 4. Back up the authentication directory before modifying it: ```bash cp -a ~/.subversion/auth ~/.subversion/auth.backup ``` 5. Require explicit user confirmation before deleting any cached authentication data. 6. Diagnose certificate, repository URL, username, permissions, and server availability issues before clearing credentials. 7. Prefer moving a targeted cache entry to a temporary backup location instead of permanently deleting it. 8. Warn users that clearing cached credentials can disrupt access to every SVN repository configured for the current account. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (12)

Missing User Warnings

High
Confidence
97% confidence
Finding
The skill includes `svn revert --recursive .` and `svn cleanup --remove-unversioned`, which can silently discard local changes or delete unversioned files without prominent warnings. In an agent-driven workflow, these commands are especially risky because they can cause immediate, unrecoverable data loss if run on the wrong path or without user awareness.

Credential Access

High
Category
Privilege Escalation
Content
*.o
*.pyc
__pycache__/
.env
.env.local
```
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
*.pyc
__pycache__/
.env
.env.local
```

### 2. 提交模板 (commit-template.txt)
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
# 设置忽略规则
echo "*.log" > .svnignore
echo "node_modules/" >> .svnignore
echo ".env.local" >> .svnignore

# 应用忽略规则
svn propset svn:ignore -F .svnignore .
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
```bash
# 清除缓存的认证信息
rm -rf ~/.subversion/auth/*

# 重新认证
svn update
Confidence
90% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
```bash
# 清除缓存的认证信息
rm -rf ~/.subversion/auth/*

# 重新认证
svn update
Confidence
90% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Missing User Warnings

Medium
Confidence
93% confidence
Finding
This section documents destructive SVN operations such as delete, move, and branch-copy actions that can alter repository contents or history-adjacent structure, but it does not clearly warn about irreversible consequences once committed. In an agent skill context, users may invoke these commands through automation, increasing the chance of accidental deletion or unintended repository modifications.

Intent-Code Divergence

Medium
Confidence
96% confidence
Finding
The README labels a section as '安全操作' yet includes `svn checkout --trust-server-cert`, which disables or weakens certificate-validation safeguards during first connection. This can normalize unsafe behavior and expose users to man-in-the-middle attacks against SVN credentials and code provenance.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
Recommending trust of the server certificate without a warning about TLS-validation risk teaches users to bypass transport security checks. In the context of a version-control tool, that can enable interception of credentials or tampering with repository content during checkout or update.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The command `rm -rf ~/.subversion/auth/*` irreversibly deletes cached authentication material, but the example provides no warning about losing stored credentials or affecting all SVN profiles on the machine. While not an exploit by itself, it encourages a destructive recovery step without safety context and can cause credential loss or operational disruption.

Natural-Language Policy Violations

Low
Confidence
94% confidence
Finding
The manifest description is written only in Chinese ("代码版本控制工具"), which indicates a language-specific presentation without any visible user choice or opt-in. The policy requires avoiding forced language or locale constraints unless the skill explicitly offers a language choice or documents a justified regional scope.

Natural-Language Policy Violations

Low
Confidence
84% confidence
Finding
All user-facing instructional content in this file is Chinese, and there is no indication that the skill supports multiple languages or that Chinese is a justified region-specific requirement. Per the policy, forcing a specific language without user opt-in is a natural-language policy concern.

Static analysis

No suspicious patterns detected.