Loading...
Loading...
Compare original and translation side by side
python3 scripts/scan_hardcoded_secrets.py /path/to/projectpython3 scripts/scan_hardcoded_secrets.py /path/to/projectpython3 scripts/check_dependencies.py /path/to/projectpubspec.yamlanypython3 scripts/check_dependencies.py /path/to/projectpubspec.yamlanypython3 scripts/check_network_security.py /path/to/projectpython3 scripts/check_network_security.py /path/to/projectpython3 scripts/analyze_storage_security.py /path/to/projectpython3 scripts/analyze_storage_security.py /path/to/projectIs this a comprehensive security audit?
├─ YES → Run all 4 automated scanners → Review results → Perform manual analysis → Generate report
└─ NO → Continue...
Is this for a specific OWASP risk category?
├─ M1 (Credentials) → Run scan_hardcoded_secrets.py → Review findings
├─ M2 (Dependencies) → Run check_dependencies.py → Update packages
├─ M5 (Network) → Run check_network_security.py → Implement certificate pinning
├─ M9 (Storage) → Run analyze_storage_security.py → Use encrypted storage
└─ Other (M3/M4/M6/M7/M8/M10) → Load reference docs → Perform manual analysis
Is this a quick security check before release?
└─ YES → Run all automated scanners → Focus on CRITICAL/HIGH findings → Fix blockers这是全面安全审计吗?
├─ 是 → 运行所有4个自动化扫描器 → 审查结果 → 执行人工分析 → 生成报告
└─ 否 → 继续...
这是针对特定OWASP风险类别的检查吗?
├─ M1(凭证) → 运行scan_hardcoded_secrets.py → 审查发现的问题
├─ M2(依赖) → 运行check_dependencies.py → 更新包
├─ M5(网络) → 运行check_network_security.py → 实施证书固定
├─ M9(存储) → 运行analyze_storage_security.py → 使用加密存储
└─ 其他(M3/M4/M6/M7/M8/M10) → 加载参考文档 → 执行人工分析
这是发布前的快速安全检查吗?
└─ 是 → 运行所有自动化扫描器 → 重点关注CRITICAL/HIGH级别的问题 → 修复阻塞性问题python3 .claude/skills/owasp-mobile-security-checker/scripts/scan_hardcoded_secrets.py .
python3 .claude/skills/owasp-mobile-security-checker/scripts/check_dependencies.py .
python3 .claude/skills/owasp-mobile-security-checker/scripts/analyze_storage_security.py .
python3 .claude/skills/owasp-mobile-security-checker/scripts/check_network_security.py .owasp_m1_secrets_scan.jsonowasp_m2_dependencies_scan.jsonowasp_m5_network_scan.jsonowasp_m9_storage_scan.jsonRead references/owasp_mobile_top_10_2024.mdpython3 .claude/skills/owasp-mobile-security-checker/scripts/scan_hardcoded_secrets.py .
python3 .claude/skills/owasp-mobile-security-checker/scripts/check_dependencies.py .
python3 .claude/skills/owasp-mobile-security-checker/scripts/analyze_storage_security.py .
python3 .claude/skills/owasp-mobile-security-checker/scripts/check_network_security.py .owasp_m1_secrets_scan.jsonowasp_m2_dependencies_scan.jsonowasp_m5_network_scan.jsonowasp_m9_storage_scan.json阅读references/owasp_mobile_top_10_2024.mdflutter_secure_storage// Search for: SharedPreferences + setString with 'token', 'auth', 'password'
// Flag: Plaintext credential storage
// Verify: FlutterSecureStorage usage for sensitive data
// Check: Token expiration logic existsflutter_secure_storage// 搜索:SharedPreferences + setString 搭配 'token', 'auth', 'password'
// 标记:明文凭证存储
// 验证:FlutterSecureStorage用于存储敏感数据
// 检查:存在令牌过期逻辑// Search for: rawQuery, rawInsert with string interpolation ($)
// Flag: SQL injection vulnerability
// Search for: WebView without proper sanitization
// Flag: XSS vulnerability// 搜索:rawQuery, rawInsert 搭配字符串插值 ($)
// 标记:SQL注入漏洞
// 搜索:未进行适当清理的WebView
// 标记:XSS漏洞// Search for: FirebaseAnalytics.logEvent with email, phone, name
// Flag: PII in analytics
// Search for: print(), log() with user data
// Flag: PII in logs// 搜索:FirebaseAnalytics.logEvent 搭配 email, phone, name
// 标记:分析中包含PII
// 搜索:print(), log() 搭配用户数据
// 标记:日志中包含PIIundefinedundefinedundefinedundefined// Flag: Debug code that executes in release builds
if (kDebugMode) { print("..."); } // This compiles in release!
// Preferred: assert(() { debugPrint("..."); return true; }());// 标记:在发布版本中执行的调试代码
if (kDebugMode) { print("..."); } // 这段代码会在发布版本中编译!
// 推荐写法:assert(() { debugPrint("..."); return true; }());// Search for: md5, sha1, des (weak algorithms)
// Search for: AESMode.ecb (insecure mode)
// Search for: 'encryption_key', 'secret_key' (hardcoded keys)// 搜索:md5, sha1, des(弱算法)
// 搜索:AESMode.ecb(不安全模式)
// 搜索:'encryption_key', 'secret_key'(硬编码密钥)YOUR_API_KEYYOUR_API_KEYreferences/owasp_mobile_top_10_2024.mdreferences/owasp_mobile_top_10_2024.mdFile: lib/services/api_client.dart:15
Issue: Hardcoded API key
Code: const String apiKey = "sk_live_ABC123...";references/owasp_mobile_top_10_2024.md// Before (INSECURE):
const String apiKey = "sk_live_ABC123...";
// After (SECURE):
final secureStorage = FlutterSecureStorage();
String? apiKey = await secureStorage.read(key: 'api_key');
// Key injected at build time or fetched from secure backendscan_hardcoded_secrets.py文件:lib/services/api_client.dart:15
问题:硬编码API密钥
代码:const String apiKey = "sk_live_ABC123...";references/owasp_mobile_top_10_2024.md// 修复前(不安全):
const String apiKey = "sk_live_ABC123...";
// 修复后(安全):
final secureStorage = FlutterSecureStorage();
String? apiKey = await secureStorage.read(key: 'api_key');
// 密钥在构建时注入或从安全后端获取scan_hardcoded_secrets.py