security-review — security-review for Flutter security-review, ccsession, community, security-review for Flutter, ide skills, secure Dart projects, security-review install, security-review for API security, Claude Code, Cursor, Windsurf

v1.0.0
GitHub

About this Skill

Perfect for Mobile App Security Agents needing comprehensive Flutter/Dart project audits. security-review is a skill that provides a set of security principles and checks to ensure Flutter/Dart projects are secure, including machine credential management and secure API integration

Features

Provides a security checklist for Flutter/Dart projects
Supports secure credential management using --dart-define or .env files
Ensures sensitive files like .env and google-services.json are ignored by git
Helps manage device permissions for camera and storage
Guides secure API key and token handling

# Core Topics

tarrragon tarrragon
[0]
[0]
Updated: 3/3/2026

Agent Capability Analysis

The security-review skill by tarrragon is an open-source community AI agent skill for Claude Code and other IDE workflows, helping agents execute tasks with better context, repeatability, and domain-specific guidance. Optimized for security-review for Flutter, secure Dart projects, security-review install.

Ideal Agent Persona

Perfect for Mobile App Security Agents needing comprehensive Flutter/Dart project audits.

Core Value

Empowers agents to identify and fix vulnerabilities in Flutter/Dart projects, ensuring secure handling of sensitive user data and APIs through principles like secret management and secure API key handling.

Capabilities Granted for security-review

Auditing Flutter/Dart projects for security vulnerabilities
Implementing secure authentication and authorization mechanisms
Validating API key and secret management practices

! Prerequisites & Limits

  • Requires knowledge of Flutter/Dart ecosystem
  • Limited to Flutter/Dart projects
  • Needs access to project codebase for comprehensive analysis
Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

security-review

Install security-review, an AI agent skill for AI agent workflows and automation. Works with Claude Code, Cursor, and Windsurf with one-command setup.

SKILL.md
Readonly

Security Review(Flutter/Dart)

Flutter/Dart 專案的安全審查快速指引。本 Skill 提供安全檢查清單和核心原則,詳細程式碼範例請參考 references/flutter-security-patterns.md


適用場景

  • 實作認證或授權功能
  • 處理使用者輸入(表單、掃描結果)
  • 使用 API Key 或其他機密
  • 整合第三方 API(Google Books、Dio 等)
  • 儲存或傳輸敏感資料
  • 管理裝置權限(相機、儲存)
  • 準備 Release 建置或上架

1. 機密管理

原則:機密不可出現在原始碼或版本控制中。

檢查清單

  • 無硬編碼 API Key、Token、密碼
  • 機密透過 --dart-define.env 注入
  • .env*.keystorekey.properties 已加入 .gitignore
  • google-services.json / GoogleService-Info.plist 已加入 .gitignore
  • Git 歷史中無機密洩漏

核心模式

dart
1// 正確:建置時注入 2const apiKey = String.fromEnvironment('API_KEY', defaultValue: ''); 3 4// 錯誤:硬編碼 5const apiKey = 'sk-proj-xxxxx'; // 禁止

詳細範例:references/flutter-security-patterns.md 第 1 節


2. 輸入驗證

原則:所有使用者輸入在處理前必須驗證和清理。

檢查清單

  • 所有表單欄位有 validator
  • 設定 maxLength 限制輸入長度
  • 使用白名單驗證(非黑名單)
  • 掃描結果(ISBN barcode)已清理非預期字元
  • 錯誤訊息不洩漏技術細節

核心模式

dart
1// 表單驗證 2TextFormField( 3 validator: (value) { 4 if (value == null || value.trim().isEmpty) return '必填'; 5 if (value.length > maxLength) return '超過長度限制'; 6 return null; 7 }, 8 inputFormatters: [ 9 FilteringTextInputFormatter.deny(RegExp(r'[<>{}]')), 10 ], 11)

詳細範例:references/flutter-security-patterns.md 第 2 節


3. 本地資料安全

原則:敏感資料使用加密儲存,一般偏好設定可用明文。

檢查清單

  • 機密資料使用 flutter_secure_storage(非 SharedPreferences
  • SQLite 查詢使用參數化(? 佔位符)
  • 無 SQL 字串拼接
  • SharedPreferences 中無 Token、密碼、個資

核心模式

dart
1// 正確:參數化查詢 2await db.rawQuery('SELECT * FROM books WHERE title LIKE ?', ['%$query%']); 3 4// 錯誤:字串拼接(SQL 注入) 5await db.rawQuery("SELECT * FROM books WHERE title LIKE '%$query%'");

儲存選擇指引

資料類型儲存方式
Token、密碼、API Keyflutter_secure_storage
使用者偏好(主題、語言)SharedPreferences
結構化業務資料sqflite(參數化查詢)
暫存檔案path_provider 暫存目錄

詳細範例:references/flutter-security-patterns.md 第 3 節


4. 網路安全

原則:所有網路通訊使用 HTTPS,驗證回應結構。

檢查清單

  • 所有 API 端點使用 HTTPS
  • 設定合理的連線逾時(connectTimeoutreceiveTimeout
  • API 回應結構已驗證(型別檢查)
  • Token 透過攔截器注入(非手動拼接)
  • 401 回應時清除本地 Token

核心模式

dart
1// Dio 安全配置 2final dio = Dio(BaseOptions( 3 baseUrl: 'https://api.example.com', // HTTPS only 4 connectTimeout: const Duration(seconds: 10), 5 receiveTimeout: const Duration(seconds: 15), 6)); 7 8// 攔截器注入 Token 9dio.interceptors.add(InterceptorsWrapper( 10 onRequest: (options, handler) async { 11 final token = await storage.readToken(); 12 if (token != null) { 13 options.headers['Authorization'] = 'Bearer $token'; 14 } 15 handler.next(options); 16 }, 17));

詳細範例:references/flutter-security-patterns.md 第 4 節


5. 權限管理

原則:僅請求必要權限,在需要時才請求,並說明用途。

檢查清單

  • 僅宣告實際需要的權限(AndroidManifest / Info.plist)
  • 權限在使用前才請求(非啟動時全部請求)
  • iOS Info.plist 每個權限有用途說明字串
  • 處理「永久拒絕」狀態(引導到系統設定)
  • 權限被拒時提供替代方案或提示

核心模式

dart
1// 按需請求,處理各種狀態 2Future<bool> requestCameraPermission() async { 3 final status = await Permission.camera.status; 4 if (status.isGranted) return true; 5 if (status.isDenied) { 6 final result = await Permission.camera.request(); 7 return result.isGranted; 8 } 9 if (status.isPermanentlyDenied) { 10 await openAppSettings(); 11 return false; 12 } 13 return false; 14}

詳細範例:references/flutter-security-patterns.md 第 5 節


6. 認證與授權

原則:Token 安全儲存,過期自動處理,敏感操作前驗證狀態。

檢查清單

  • Token 使用 flutter_secure_storage 儲存
  • Token 過期有自動更新機制
  • 登出時清除所有本地 Token
  • 敏感操作前驗證使用者認證狀態
  • Refresh Token 失敗時跳轉登入頁面

詳細範例:references/flutter-security-patterns.md 第 6 節


7. 依賴安全

原則:定期檢查依賴漏洞,鎖定版本確保可重現建置。

檢查清單

  • flutter pub audit 無已知漏洞
  • flutter pub outdated 定期執行
  • pubspec.lock 已提交到版本控制
  • 依賴版本有合理約束(使用 ^ 語法)
  • CI/CD 使用 --enforce-lockfile 確保一致性

核心指令

bash
1flutter pub audit # 檢查已知漏洞 2flutter pub outdated # 檢查過時套件 3flutter pub upgrade # 更新依賴

詳細範例:references/flutter-security-patterns.md 第 7 節


8. 敏感資料外洩防護

原則:日誌不含敏感資料,錯誤訊息不洩漏技術細節。

檢查清單

  • 日誌中無 Token、密碼、個人資料
  • 使用者看到的錯誤訊息為通用文字(透過 i18n / ErrorHandler)
  • 技術細節僅記錄到開發日誌(kDebugMode 判斷)
  • Release 建置不輸出除錯日誌
  • Stack Trace 不暴露給使用者

核心模式

dart
1// 正確:Release 模式下不輸出日誌 2if (kDebugMode) { 3 debugPrint('API Error: ${error.runtimeType}'); 4} 5 6// 正確:使用 ErrorHandler 轉換錯誤訊息 7final userMessage = ErrorHandler.getUserMessage(exception); 8 9// 錯誤:直接暴露技術細節 10// showError('Database error: $sqlException at line 42');

詳細範例:references/flutter-security-patterns.md 第 8 節


上架前安全檢查清單

Release 建置或上架前,逐項確認:

  • 機密:無硬編碼機密,全部透過環境變數注入
  • 輸入驗證:所有使用者輸入已驗證
  • SQL 注入:所有查詢參數化
  • 本地儲存:敏感資料使用加密儲存
  • HTTPS:所有網路通訊使用 HTTPS
  • 權限:僅宣告必要權限,有用途說明
  • 認證:Token 安全儲存和自動更新
  • 日誌:Release 建置無敏感資料輸出
  • 依賴flutter pub audit 無漏洞
  • 錯誤處理:使用者看不到技術細節
  • ProGuard/R8:Android Release 啟用程式碼混淆
  • App Transport Security:iOS 已正確設定

參考資源


Last Updated: 2026-03-02

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is security-review?

Perfect for Mobile App Security Agents needing comprehensive Flutter/Dart project audits. security-review is a skill that provides a set of security principles and checks to ensure Flutter/Dart projects are secure, including machine credential management and secure API integration

How do I install security-review?

Run the command: npx killer-skills add tarrragon/ccsession. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for security-review?

Key use cases include: Auditing Flutter/Dart projects for security vulnerabilities, Implementing secure authentication and authorization mechanisms, Validating API key and secret management practices.

Which IDEs are compatible with security-review?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for security-review?

Requires knowledge of Flutter/Dart ecosystem. Limited to Flutter/Dart projects. Needs access to project codebase for comprehensive analysis.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add tarrragon/ccsession. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use security-review immediately in the current project.

Related Skills

Looking for an alternative to security-review or another community skill for your workflow? Explore these related open-source skills.

View All

widget-generator

Logo of f
f

f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.

149.6k
0
AI

flags

Logo of vercel
vercel

flags is a Next.js feature management skill that enables developers to efficiently add or modify framework feature flags, streamlining React application development.

138.4k
0
Browser

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI