Back to skill

Security audit

Embedded C/C++ Code Reviewer

Security checks for vulnerabilities and agentic risk

Overview

ClawScan rates this skill benign with medium confidence: its three flagged items are considered expected for its stated code-review purpose, though one referenced local path was missing and the scan is incomplete.

Consider whether you are comfortable with a skill that reads and writes files without declaring a tool scope and that specifies Chinese-only HTML reports. The verdict is benign, but confidence is medium and coverage is partial: a local path-like reference in SKILL.md did not match a bundled artifact, so the evidence is incomplete.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (10)

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: file_read, file_write.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

HTML review reports are specified as Chinese-only without user language selection or opt-in.

Medium
Category
Output Handling
Confidence
88% confidence
Finding

The descriptions specify generation of a Chinese HTML review report, but provide no language choice or condition tying that output language to the user's preference. Embedded C/C++ review does not inherently require Chinese, and the English description does not establish consent to Chinese-language reports.

Content

No source excerpt is available for this finding.

Unbounded Resource Access

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill allows unbounded resource consumption (API calls, storage, compute). Without rate limits or quotas, a compromised or misbehaving agent can cause denial-of-service or cost overruns.

Content

Scanner excerpt · references/CHANGELOG.md (reported line 24)May include surrounding context.

md
## 1.0.0 · 2026-09-15 · 受众扩展:RT-Thread 支持 + HTML 报告 + 文档减重

- **新增规则22(高危/低危):RT-Thread 中断上下文违规 API**——判据双源核实(官方编程手册《中断管理》+ 官方内核 master 源码):睡眠/线程管理类(rt_thread_mdelay 等)、动态内存类(rt_malloc 等)、对象创建/删除类(源码带 RT_DEBUG_NOT_IN_INTERRUPT 断言)、rt_mutex_take(互斥量所有者语义,任何 timeout)报高危;等待类 API(rt_sem_take/rt_mb_recv/rt_mq_recv/rt_event_recv/rt_mb_send_wait)非零 timeout 报高危、timeout=0 试探型降 low(master 内核可运行但不属官方推荐写法);rt_sem_release/rt_event_send/rt_mb_send 等 ISR 安全 API 不报。ISR 识别新增 rt_interrupt_enter() 体判(官方标准写法,零误判,覆盖 rt_hw_interrupt_install 挂接的 xxx_handler)
- **新增 --html 报告输出**——python reviewer.py --dir ./src all --html report.html 生成单文件 HTML 报告(内联样式无外部依赖,中文界面,严重度分色卡片+规则分布条形图+逐条明细含 MISRA 标注),可直接截图分享/存档
- **文档减重**——SKILL.md 从 280 行砍至约 100 行(对话上下文常驻负担显著降低):MISRA 映射表移至 references/misra-mapping.md,本更新记录移至 references/CHANGELOG.md,SKILL.md 首屏改为「痛点 → before/after 真实演示 → 快速上手」结构
- **测试套件**:108 项断言(99 + E24~E31b 规则22 正反例)全部 PASS

Unbounded Resource Access

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill allows unbounded resource consumption (API calls, storage, compute). Without rate limits or quotas, a compromised or misbehaving agent can cause denial-of-service or cost overruns.

Content

Scanner excerpt · references/misra-mapping.md (reported line 56)May include surrounding context.

md
## RT-Thread 规则22 判据来源(双源核实 2026-09-15)

- 官方编程手册《中断管理》:ISR 内不能执行挂起当前线程的操作,违规时内核报 `Function [xxx] shall not used in ISR`;官方中断底半处理范例中 ISR 直接调用 `rt_sem_release`/`rt_mb_send` 属推荐用法
- 官方内核 master 源码:`rt_sem_create/delete` 等对象创建/删除类带 `RT_DEBUG_NOT_IN_INTERRUPT` 断言;`rt_sem_take` 无中断断言且 `timeout=0`(RT_WAITING_NO)不挂起——试探型降为 low

Unbounded Resource Access

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill allows unbounded resource consumption (API calls, storage, compute). Without rate limits or quotas, a compromised or misbehaving agent can cause denial-of-service or cost overruns.

Content

Scanner excerpt · reviewer.py (reported line 151)May include surrounding context.

python
#   官方编程手册《中断管理》:"在这个运行环境中不能使用挂起当前线程的操作"
#   (违规时内核报 "Function [xxx] shall not used in ISR");
#   官方内核 master 源码:rt_sem_create/delete 等对象创建/删除类有
#   RT_DEBUG_NOT_IN_INTERRUPT 断言;rt_sem_take 无中断断言且 timeout=0
#   (RT_WAITING_NO)不挂起——试探型降为 low。
# RT-Thread 没有 FromISR 后缀惯例(区别于 FreeRTOS):ISR 内直接调用
# release/send 类 API 是官方推荐用法(中断底半处理范例),不报。

Unbounded Resource Access

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill allows unbounded resource consumption (API calls, storage, compute). Without rate limits or quotas, a compromised or misbehaving agent can cause denial-of-service or cost overruns.

Content

Scanner excerpt · reviewer.py (reported line 169)May include surrounding context.

python
"rt_mq_create", "rt_mq_delete",
]
# 带 timeout 实参的等待类 API -> timeout 实参序号(1-based)
# 官方文档+源码:非零 timeout 为挂起语义,ISR 内禁止;timeout=0 试探型 low
RTTHREAD_WAIT_APIS = {
    "rt_sem_take": 2,
    "rt_mb_recv": 2,

Unbounded Resource Access

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill allows unbounded resource consumption (API calls, storage, compute). Without rate limits or quotas, a compromised or misbehaving agent can cause denial-of-service or cost overruns.

Content

Scanner excerpt · reviewer.py (reported line 178)May include surrounding context.

python
"rt_mb_send_wait": 3,
}
# rt_mutex_take 任何 timeout 都禁:互斥量带所有者/优先级继承语义,
# 必须在线程上下文(官方文档明确,timeout=0 也不可)
RTTHREAD_MUTEX_APIS = ["rt_mutex_take"]

# ---- 规则17:类型大小表(字节),用于局部数组栈占用估算 ----

Unbounded Resource Access

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill allows unbounded resource consumption (API calls, storage, compute). Without rate limits or quotas, a compromised or misbehaving agent can cause denial-of-service or cost overruns.

Content

Scanner excerpt · reviewer.py (reported line 1934)May include surrounding context.

python
违规内核报 "Function [xxx] shall not used in ISR"
    - 官方内核 master 源码:对象创建/删除类(rt_sem_create 等)带
      RT_DEBUG_NOT_IN_INTERRUPT 断言;rt_sem_take 无中断断言,
      timeout=0(RT_WAITING_NO)不挂起

    分级:
      high:睡眠/线程管理类、动态内存类、对象创建/删除类(源码断言实锤)、

Unbounded Resource Access

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill allows unbounded resource consumption (API calls, storage, compute). Without rate limits or quotas, a compromised or misbehaving agent can cause denial-of-service or cost overruns.

Content

Scanner excerpt · reviewer.py (reported line 1940)May include surrounding context.

python
high:睡眠/线程管理类、动态内存类、对象创建/删除类(源码断言实锤)、
            rt_mutex_take(互斥量所有者语义,任何 timeout)、等待类 API
            非零 timeout(含 RT_WAITING_FOREVER)
      low: 等待类 API timeout=0 试探型(master 内核可运行、不挂起,
            但依赖内核实现细节,非官方推荐写法)
    不报:rt_sem_release/rt_event_send/rt_mb_send/rt_mq_send 等
          ISR 安全 API(官方底半处理范例用法)

Unbounded Resource Access

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill allows unbounded resource consumption (API calls, storage, compute). Without rate limits or quotas, a compromised or misbehaving agent can cause denial-of-service or cost overruns.

Content

Scanner excerpt · reviewer.py (reported line 1998)May include surrounding context.

python
"line": i + 1,
                        "title": f"ISR 内试探型等待 {api}(…, 0)",
                        "description": (
                            f"中断服务函数 {name} 第{i+1}行以 timeout=0 调用 "
                            f"{api}()。master 内核无中断断言且不挂起,"
                            "当前可运行,但依赖内核实现细节而非官方推荐写法,"
                            "换内核版本/移植有风险。"