返回顶部
f

force-unwrap-scanner

扫描并报告 Swift 项目中的强制解包(!)和 try! 使用情况,识别潜在崩溃风险

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
67
下载量
0
收藏
概述
安装方式
版本历史

force-unwrap-scanner

# Force Unwrap Scanner 扫描并报告项目中的强制解包使用情况,帮助识别潜在的运行时崩溃风险。 ## 功能 - 扫描项目中所有的 `try!` 和 `!` 强制解包使用 - 按风险等级分类(高/中/低) - 生成详细报告 - 提供修复建议 ## 使用方法 ```bash cd .agent/skills/force-unwrap-scanner ./RunSkill.sh [scan|report|fix] ``` ### 参数说明 - `scan` - 扫描项目并输出结果 - `report` - 生成详细的 HTML 报告 - `fix` - 交互式修复(高风险项需要手动确认) ## 风险分级 | 风险等级 | 说明 | 示例 | |-----------|------|------| | 🔴 高 | EKEventStore、SwiftData、FileIO 等系统级操作 | `try! EKEventStore()` | | 🟡 中 | 数据库查询、网络请求 | `try! fetchTasks()` | | 🟢 低 | 本地数据、已知安全值 | `let x = dict["key"]!` | ## 输出示例 ``` 🔍 Force Unwrap Scanner Report =================================== Total: 3 findings 🔴 High: 1 🟡 Medium: 1 🟢 Low: 1 Files with issues: TimeFlow/Services/EventKitService.swift:35 TimeFlow/ViewModels/AppState.swift:12 TimeFlow/Helpers/ParseHelper.swift:45 ```

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 force-unwrap-scanner-1776023001 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 force-unwrap-scanner-1776023001 技能

通过命令行安装

skillhub install force-unwrap-scanner-1776023001

下载 Zip 包

⬇ 下载 force-unwrap-scanner v1.0.0

文件大小: 1.58 KB | 发布时间: 2026-4-13 10:20

v1.0.0 最新 2026-4-13 10:20
Initial release of force-unwrap-scanner.

- Scans Swift projects for usage of force unwraps (!) and try!
- Categorizes findings by risk level (high, medium, low)
- Generates detailed reports, including file and line numbers
- Provides actionable suggestions for remediation
- Supports commands for scanning, report generation, and interactive fixes

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部