Back to skill

Security audit

Can Bus Toolkit Free

Security checks for vulnerabilities and agentic risk

Overview

The skill is a local hash-log helper, but it overstates its audit/tamper-resistance guarantees and has inconsistent network-related instructions.

Review this carefully before installing if you need trustworthy audit or provenance guarantees. It is reasonable as a local convenience for hashing and recording user-selected data, but do not treat its can.log examples as tamper-proof evidence, and avoid using callback_url or any network behavior unless the publisher clarifies exactly when outbound communication occurs.

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

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:42
Finding

Weak Integrity Verification Misrepresented as Tamper-Resistant Logging

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 42–63 and 146–159
Vulnerability Type: Integrity verification weakness and insecure audit-log design
Risk Level: Medium

Vulnerable Code

text
CAN协议用最简单的三列模型解决这个问题:每条数据记录三个信息——它发生的时间(WHEN)、它内容的哈希(WHERE)、你给它起的名字(WHAT)。这三列完全由你控制,append-only追加写入,任何篡改都会导致哈希不匹配。
text
- 日志采用append-only设计,只增不删不改
- 任何对历史记录的修改都会导致哈希校验失败
bash
# 计算内容哈希
echo -n "your-data-content" | sha256sum

# 记录三列
echo "1742428800000 a7f3b2c1d4e5 客户名单-2024Q1" >> can.log
bash
# 重新计算当前内容的哈希
current_hash=$(echo -n "your-data-content" | sha256sum | cut -c1-12)

# 在日志中查找
grep "$current_hash" can.log
# 命中即表示内容与打戳时一致

Technical Analysis

The documented implementation does not provide an append-only or tamper-evident audit log. Shell redirection with >> appends a record during that operation, but it does not prevent a user or process with write permission from modifying, deleting, truncating, reordering, or replacing previous records. No hash chain, digital signature, HMAC, authenticated checkpoint, or separately protected integrity root binds the log history together.

The verification procedure also truncates SHA-256 to 12 hexadecimal characters, providing only 48 bits of hash space, and uses unstructured substring matching through grep. A match establishes only that the selected hash prefix occurs somewhere in the file. It does not establish that the hash belongs to the expected timestamp and name, that the corresponding record is unique, or that the log history is authentic.

The log contains the asserted digest but does not authenticate it. An attacker who can alter both protected data and can.log can calculate a digest for replacement content and update or append a corresponding record. The documented verification then reports a successful match.

Attack Path

  1. An attacker or compromised process obtains write access to the protected data and can.log.
  2. The attacker changes the protect ...[truncated 1336 chars]
Remediation
View remediation

Remediation Suggestions

  1. Use complete digests

    • Store and compare the full 256-bit SHA-256 digest.
    • Do not use a 12-character prefix for security-sensitive integrity decisions.
  2. Parse exact structured records

    • Use a well-defined format such as JSON Lines.
    • Compare the expected digest against the exact record and fields rather than using substring-based grep.
    • Validate timestamp, digest, name, field count, encoding, and record uniqueness.
  3. Cryptographically bind the history

    • Include the preceding record's full hash in every new record.
    • Compute each record hash over all canonicalized fields, including the preceding hash.
    • Verify the complete chain from a trusted root before accepting a record.
  4. Authenticate records or checkpoints

    • Protect records or periodic chain roots with an HMAC whose key is inaccessible to log writers, or with digital signatures.
    • Store authenticated roots in a separate, access-controlled location.
    • Use an external timestamp or transparency service where independent time assurance is required.
  5. Strengthen storage controls

    • Separate data-writing and audit-verification privileges.
    • Use operating-system append-only controls or a dedicated immutable/WORM log service where supported.
    • Treat read-only permissions and version control only as defense-in-depth, not as cryptographic tamper protection.
  6. Correct the security claims

    • Describe the current file as append-oriented rather than append-only or tamper-proof.
    • State explicitly that a plain hash log cannot detect alterations made by an actor who can update both the data and its recorded digest.
  7. Add adversarial tests

    • Test record deletion, truncation, reordering, duplicate digest prefixes, altered names and timestamps, and coordinated replacement of data and log entries.
    • Require verification to fail for every unauthorized history modification.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (6)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger condition is overly broad, effectively suggesting use whenever AI/agent orchestration is involved rather than only for narrow provenance tasks. In an agent ecosystem, broad activation criteria can cause the skill to be invoked in unrelated contexts where its exec and file-writing behaviors may be unsafe or unnecessary.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill repeatedly claims it is fully local and requires no network, yet its documented interface includes a callback_url parameter. That contradiction can mislead an agent or user into allowing outbound communication paths they did not expect, undermining trust assumptions and potentially enabling unreviewed data egress.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill documents append-only local log writes using shell redirection, but it does not clearly warn that using the skill will modify local files. In a skill with exec capability, insufficient disclosure around file-system side effects can lead to unintended writes, audit contamination, or accidental modification of sensitive paths if parameters are later generalized.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The section spanning the dependency and error-handling guidance contradicts itself about whether the skill ever uses a network. Contradictory operational claims are dangerous because they break policy enforcement and user expectations, especially for agents that rely on metadata to decide whether outbound access is allowed.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation says there are no external service calls and no network requirement, but later includes network troubleshooting advice such as ping and firewall/proxy checks. This inconsistency can cause operators to approve a supposedly local-only skill under false assumptions, which is a security-relevant integrity issue even if no exfiltration code is shown.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

该技能的展示名称、描述、说明和示例均以中文呈现,未见提供其他语言选项、用户语言选择机制或对中文限定的合理说明。按照语言/locale 政策要求,面向通用用户的技能若强制单一语言而无用户选择,属于自然语言层面的政策问题。

Content

No source excerpt is available for this finding.