static-security

Reviews Flutter and Dart code for hardcoded secrets, insecure storage, and vulnerable dependencies.

162|23|Updated Feb 27, 2026
One-click install
npx skills add https://github.com/VeryGoodOpenSource/vgv-ai-flutter-plugin --skill static-security-verygoodopensource
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: static-security
Source: https://github.com/VeryGoodOpenSource/vgv-ai-flutter-plugin/tree/main/skills/static-security
Command: npx skills add https://github.com/VeryGoodOpenSource/vgv-ai-flutter-plugin --skill static-security-verygoodopensource

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Flutter apps compile all Dart code into binaries running on untrusted devices, so hardcoded secrets, plaintext storage, and vulnerable packages ship directly to attackers. This Skill performs static security review of Flutter/Dart codebases, catching these issues before release without pen-testing or runtime analysis. ## Core Features & Use Cases - Secrets & Storage Audit: Detects hardcoded API keys, --dart-define workarounds, tokens in SharedPreferences, and sensitive data in logs, with severity labels (Critical/Warning/Note) on every finding. - Dependency Vulnerability Scanning: Runs osv-scanner against pubspec.lock, audits ignored_advisories entries for documented justification, and flags typosquatting and transitive permission creep. - Secure Implementation Replacement: When asked to implement an insecure pattern (custom biometric channels, disabled certificate validation), it delivers the secure alternative using flutter_secure_storage, local_auth, formz, or http_certificate_pinning in the same response. - Use Case: Before cutting a release, ask it to review your codebase — it flags a JWT stored in SharedPreferences as Critical, an unjustified ignored_advisories entry as Warning, and provides the corrected code for each. ## Quick Start Ask the assistant to run a static security review of your Flutter project directory and report findings by severity before your next release.

Frequently Asked Questions about static-security

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find hardcoded API keys in a Flutter app?

Scan Dart source files, google-services.json, .env files, and platform config files for embedded credentials. Any key compiled into the binary is extractable via reverse engineering, so the only fix is serving secrets from a backend at runtime.

How to scan Flutter dependencies for known vulnerabilities?

Run osv-scanner against pubspec.lock, which holds the resolved transitive dependency tree where most advisories land. Complement it with dart pub get for GitHub Advisory Database hits and dart pub outdated for available patches.

Is --dart-define safe for storing API keys in Flutter?

No, --dart-define and String.fromEnvironment compile the value into the binary as plaintext, recoverable with strings. The same applies to .env files, obfuscation, and split strings; only backend-served secrets at runtime are safe.

SharedPreferences vs flutter_secure_storage for auth tokens?

flutter_secure_storage is required for tokens, PII, and session data because it uses iOS Keychain and Android Keystore encryption. SharedPreferences stores plaintext and is only acceptable for non-sensitive preferences like theme or locale.

Why should android:allowBackup be disabled in Flutter apps?

The Android default allowBackup="true" lets adb backup extract app data, bypassing flutter_secure_storage encryption. Set android:allowBackup="false" in AndroidManifest.xml for any app storing sensitive data.