Back to skill

Security audit

Volcengine Tosutil

Security checks for vulnerabilities and agentic risk

Overview

This TOS helper is mostly purpose-aligned, but it can expose cloud credentials in process arguments and has a destructive-delete confirmation bypass.

Install only after reviewing the risks. Use a verified, version-pinned tosutil binary and avoid sudo/system-wide installation unless necessary. Prefer restricted config/profile credentials or temporary credentials rather than command-line AK/SK/token values. For deletion, list the exact target first and avoid --force unless backups, retention, or recovery controls are in place.

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)

T08 · Insecure Dependencies

Error
Location
SKILL.md:65
Finding

Executable Installation Without Artifact Integrity Verification

Content
View full analysis
Remediation
View remediation
-O tosutil wget -O tosutil.sha256 sha256sum -c tosutil.sha256 chmod a+x tosutil sudo mv tosutil /usr/local/bin/ ``` On macOS, use `shasum -a 256 -c` if `sha256sum` is unavailable. The expected checksum file must itself come from a trusted and authenticated source. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
scripts/tosutil_service.py:313
Finding

TOS Credentials Exposed Through Process Command-Line Arguments

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/tosutil_service.py:242
Finding

Deletion Confirmation Bypassed by the Force Option

Content
View full analysis
CommandSpec: cloud_url = ensure_required(request.cloud_url, "cloud_url") _ensure_tos_resource(cloud_url, "rm") argv = [request.common_options.tosutil_binary, "rm", cloud_url] append_flag(argv, "-r", request.recursive) append_flag(argv, "-f", request.force or request.assume_yes) append_option(argv, "-j", request.jobs) _append_common_options(argv, request.common_options) return CommandSpec( command="rm", argv=argv, risk_level=RiskLevel.DESTRUCTIVE, summary="删除桶、对象或对象前缀", requires_confirmation=not (request.force or request.assume_yes), hints=hints + _build_rm_hints(request), ) ``` The execution layer only blocks the operation when `requires_confirmation` remains true: ```python assume_yes = getattr(args, "yes", False) or getattr(args, "assume_yes", False) if spec.requires_confirmation and not assume_yes: _emit_json( ok=False, code="E_CONFIRM_REQUIRED", message="该操作为高风险/破坏性操作,默认不执行。请确认影响范围后重试。", data={ "preview": preview, "next_actions": [ "先用 `ls` 验证影响范围。", "确认无误后,重新执行并加 `--yes`(或 legacy 模式下加 `--assume-yes`)。", ], }, started_at=started_at, ) return 3 ``` ### Technical Analysis The wrapper describes `--yes` or legacy `--assume-yes` as the explicit authorization required to run destructive commands. However, `_build_rm` treats `request.force` as equival ...[truncated 2136 chars]
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (12)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
89% confidence
Finding

The skill includes a concrete example endorsing non-interactive recursive forced deletion: tosutil rm tos://bucket/prefix/ -r -f. Even though the surrounding text discusses confirmations and constrained prefixes, this pattern can normalize dangerous parameter combinations in an agent context where path construction errors, prompt ambiguity, or malicious user input could trigger irreversible bulk deletion.

Content

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

md
- 对批量上传、下载、复制任务,先确认并发和分片阈值,再执行。
- 对删除类任务,默认给出预检查步骤和回滚提示,不直接跳过确认。
- 遇到高级命令且参数未完全确认时,优先结合 `tosutil help <command>` 校验,不臆造参数。
- 非交互删除使用 `-f`,不是 `-y`。清理部署产物时优先删除受限前缀,例如 `tosutil rm tos://bucket/prefix/ -r -f`,避免漏删测试 artifact 或误删无关对象。

## 标准流程

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% 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).

Content

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

tosutil mb tos://bucketname tosutil cp /local/file.txt tos://bucketname/file.txt tosutil cp tos://bucketname/file.txt /local/file.txt tosutil rm tos://bucketname/file.txt tosutil du tos://bucketname tosutil setmeta tos://bucketname/object.png -meta aaa:bbb#ccc:ddd

text

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill clearly instructs use of shell commands and even references python3 scripts/main.py, wget, and tosutil, but it declares no explicit tool scope such as allowed-tools or permissions. That mismatch can cause an agent runtime to grant broader shell access than users expect, increasing the risk of unintended command execution in a skill that performs filesystem, network, and potentially destructive storage operations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The document presents the skill entirely as a Chinese-language skill and frames its behavior/output in Chinese without offering the user a language or locale choice. Under the policy, forcing a specific language without opt-in is a natural-language policy violation unless the locale constraint is clearly 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 · SKILL.md (reported line 73)May include surrounding context.

bash
wget https://m645b3e1bb36e-mrap.mrap.accesspoint.tos-global.volces.com/linux/amd64/tosutil
chmod a+x tosutil
sudo mv tosutil /usr/local/bin

macOS Intel:

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 · SKILL.md (reported line 81)May include surrounding context.

bash
wget https://m645b3e1bb36e-mrap.mrap.accesspoint.tos-global.volces.com/linux/amd64/tosutil
chmod a+x tosutil
sudo mv tosutil /usr/local/bin

macOS Intel:

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 · SKILL.md (reported line 89)May include surrounding context.

bash
wget https://m645b3e1bb36e-mrap.mrap.accesspoint.tos-global.volces.com/linux/amd64/tosutil
chmod a+x tosutil
sudo mv tosutil /usr/local/bin

macOS Intel:

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This code defines user-facing help text and operational messages entirely in Chinese, which imposes a specific language on all users. The file does not provide any opt-in, fallback, or documented justification for a Chinese-only locale, which matches the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This Python file contains multiple user-visible error and guidance strings in Chinese, starting with the first ErrorAdvice message block. A hard-coded single-language response can violate language/locale policy when the skill does not offer the user a choice or document a justified locale constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This code contains natural-language descriptions and many user-facing error/details strings exclusively in Chinese, which imposes a specific language on outputs without any opt-in or alternative locale handling. Under the policy, forcing a language without user choice is a natural-language policy violation unless the region-specific constraint is explicitly documented and justified.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/tosutil_service.py (reported line 388)May include surrounding context.

python
def _run_once(self, spec: CommandSpec) -> ExecutionResult:
        started_at = time.perf_counter()
        try:
            completed = subprocess.run(
                spec.argv,
                capture_output=True,
                text=True,

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

This code includes a natural-language comment only in Chinese: '某些超时或底层调用场景仍可能返回 bytes,这里统一兼容处理。' The file provides no indication that the skill is intentionally Chinese-only or that users can choose a language, which may violate the language/locale policy for broadly usable skills.

Content

No source excerpt is available for this finding.