medical-device-code-review
医疗设备软件代码审核(符合IEC 62304、NMPA中国医疗器械注册要求)。当用户要求审核代码、审查代码、代码检查、代码安全审查、代码质量审查、代码合规检查、代码安全审计、代码评审、code review、代码审查、审核这段代码、帮我看看代码、有bug吗、代码有问题吗等关键词时触发。适用于手术机器人、监护仪、输...
MIT-0 · Free to use, modify, and redistribute. No attribution required.
⭐ 0 · 161 · 1 current installs · 1 all-time installs
MIT-0
Security Scan
OpenClaw
Benign
high confidencePurpose & Capability
Name, description, and SKILL.md describe a medical device software code review (IEC 62304 / NMPA) and the included checklists and references align with that purpose. No unrelated environment variables, binaries, or install steps are required.
Instruction Scope
SKILL.md contains a structured audit workflow, checklists, and output template for reporting findings. It does not instruct the agent to read system files, access environment variables, or send data to external endpoints; it expects the user to provide code/context as input, which is appropriate for a review skill.
Install Mechanism
No install spec and no code files (instruction-only). This minimizes disk writes and execution of third-party code; the references are static documentation files only.
Credentials
The skill requests no credentials, config paths, or secrets. The checks and guidance focus on code quality, safety classification, testing coverage and regulatory documentation — consistent with the stated purpose.
Persistence & Privilege
always is false and the skill does not request persistent system modification or cross-skill configuration. Agent autonomous invocation is allowed by platform default but is not a unique privilege of this skill.
Assessment
This skill appears coherent and low-risk because it is an instruction-only checklist that does not request credentials or install code. Before using: avoid pasting real patient-identifiable data or proprietary source if you don't want it exposed; treat the output as advisory (not a certified regulatory submission); consider an independent human expert for compliance sign-off (NMPA/FDA); and if you need formal evidence (e.g., MC/DC reports, signed test artifacts), obtain those from your test tooling and human reviewers rather than relying solely on this automated checklist.Like a lobster shell, security has layers — review code before you run it.
Current versionv1.0.0
Download ziplatest
License
MIT-0
Free to use, modify, and redistribute. No attribution required.
SKILL.md
医疗设备软件代码审核
审核医疗设备软件代码的安全性、合规性和质量。
安全分类
IEC 62304 / YY/T 0664 定义软件安全分类:
| 等级 | 定义 | 示例 | 审核要求 |
|---|---|---|---|
| A | 不可能造成伤害 | 数据处理软件 | 基础 |
| B | 可能造成非严重伤害 | 体温计 | 中等 |
| C | 可能造成死亡或严重伤害 | 手术机器人、输液泵 | 严格 |
首先确定软件安全等级 — 这影响后续所有审核要求。
中国医疗器械合规要求
主要法规/标准
| 标准/法规 | 说明 | 适用产品 |
|---|---|---|
| YY/T 0664-2020 | 医疗器械软件 软件生命周期过程(等同IEC 62304) | 二类、三类 |
| GB 9706.1-2020 | 医用电气设备安全通用要求 | 有源医疗设备 |
| GB/T 25000.1-2010 | 软件质量要求与评价 | 医疗器械软件 |
| YY/T 0506 | 医用软件文档管理 | 医疗器械软件 |
| 《医疗器械软件注册审查指导原则》(2022) | NMPA软件注册要求 | 所有 |
| 《医疗器械网络安全注册技术审查指导原则》 | 网络安全要求 | 有网络功能的器械 |
NMPA注册要求
-
软件描述文档
- 产品概述
- 规格功能
- 安全性级别判定依据
-
开发文档
- 软件需求规格
- 设计与实现文档
- 验证与确认报告
-
风险管理
- 危害分析
- 风险控制措施
- 剩余风险评估
-
网络安全
- 网络安全能力描述
- 数据安全措施
- 漏洞评估
审核工作流程
- 确认软件安全等级 — 检查IEC 62304/YY/T 0664分类文档
- 审核软件开发计划 — 确认流程符合等级要求
- 审核危害分析 — 审查识别的危害和风险控制措施
- 安全漏洞评估 — 检查OWASP医疗设备安全、中华人民共和国网络安全管理规定
- 代码质量审查 — 静态分析、编码规范、单元测试覆盖率
- 文档审计 — 追溯性、设计文档、发布说明
常见缺陷
安全关键问题
- 未验证的输入 — 患者数据无边界检查
- 竞态条件 — 共享状态并发访问(如传感器读数)
- 整数溢出 — 数组索引、缓冲区大小
- 死锁 — 互斥锁/锁顺序问题
- 缺少超时 — 网络/硬件通信
- 不充分的错误处理 — 吞掉的异常、静默失败
信息安全问题
- 硬编码凭证 — 密码/密钥在源代码中
- 未加密通信 — 传输中的患者数据
- 不安全的默认配置 — 默认凭证、开放端口
- 注入缺陷 — SQL、命令注入
- 过时依赖 — 库中的已知CVE
质量问题
- 低测试覆盖率 — B类<80%,C类<90%
- 缺少追溯性 — 需求未关联测试
- 复杂函数 — 函数>50行,高圈复杂度
- 魔法数字 — 未命名的常量
- 缺少日志 — 关键操作无审计跟踪
审核检查清单
文档
- 软件需求规格(SRS)存在
- 软件设计规格(SDS)存在
- 风险管理文件包含软件危害
- 单元测试报告存在,包含覆盖率指标
- 发布说明含已知问题
安全(Safety)
- 所有外部输入已验证
- 数组/缓冲区有边界检查
- 所有外部通信有超时
- 所有故障模式有错误处理
- 共享资源线程安全访问
网络安全(Security)
- 无硬编码凭证
- PHI(受保护健康信息)已加密
- 远程访问需要认证
- 安全编码(无SQL注入等)
- 依赖项最新(无已知CVE)
质量
- 测试覆盖率符合等级要求
- 代码符合项目编码规范
- 无魔法数字(使用命名常量)
- 函数大小合理(<50行)
- 有意义的变量/函数命名
中国特定要求
- 符合GB 9706.1-2020电气安全要求
- 符合YY/T 0664-2020软件生命周期要求
- 满足NMPA网络安全指导原则
- 数据存储符合《数据安全法》《个人信息保护法》
- 中文用户文档完整
输出格式
## 审核总结
- 审核文件:[列表]
- 安全等级:[A/B/C]
- 总体评估:[通过/严重问题/次要问题]
## 严重问题(必须修复)
- [问题#1]:描述,文件:行号,建议
## 主要问题(应当修复)
- [问题#1]:描述,文件:行号,建议
## 次要问题(建议修复)
- [问题#1]:描述,文件:行号,建议
## 合规说明
- [IEC 62304 / YY/T 0664] [章节]:状态
- [GB 9706.1-2020] [章节]:状态
- [网络安全]:状态
参考资料
- 参见 references/iec-62304.md — IEC 62304/YY/T 0664 摘要
- 参见 references/fda-cybersecurity.md — 网络安全指南
- 参见 references/owasp-medical.md — 安全检查清单
- 参见 references/nmpa-compliance.md — 中国NMPA合规要求
Files
5 totalSelect a file
Select a file to preview.
Comments
Loading comments…
