flutter-security

Enforces security best practices for Flutter applications.

5|Updated Oct 14, 2025
One-click install
npx skills add https://github.com/reloveution/dart-flutter-rules --skill flutter-security
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: flutter-security
Source: https://github.com/reloveution/dart-flutter-rules/tree/main/skills/flutter-security
Command: npx skills add https://github.com/reloveution/dart-flutter-rules --skill flutter-security

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses common security vulnerabilities in Flutter applications, helping developers protect sensitive data, secure network communications, and prevent common attack vectors.

Core Features & Use Cases

  • Secure Data Storage: Provides guidance on avoiding insecure storage methods like SharedPreferences for sensitive data and recommends flutter_secure_storage.
  • Input Validation & Sanitization: Emphasizes the importance of validating all user inputs and sanitizing data before display to prevent cross-site scripting (XSS) attacks.
  • Network Security: Mandates HTTPS for all communications, suggests certificate pinning for critical APIs, and advises on proper session management.
  • Secure Logging: Warns against logging sensitive information such as passwords or tokens.

Quick Start

Use the flutter-security skill to ensure sensitive API keys are stored securely using flutter_secure_storage.

Frequently Asked Questions about flutter-security

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

FAQPage Schema
How do I securely store API keys in Flutter?

Securely store API keys in Flutter by using the flutter_secure_storage package instead of SharedPreferences. SharedPreferences stores data in plain text, while flutter_secure_storage encrypts credentials locally to prevent unauthorized access.

What is the best way to validate user input and prevent XSS in Flutter?

Input validation in Flutter requires sanitizing all user data before rendering it on the screen. Sanitizing input prevents cross-site scripting (XSS) attacks by ensuring malicious code is treated strictly as text rather than executable scripts.

How do I secure network communications and API interactions in Flutter?

Secure network communications in Flutter by enforcing HTTPS for all API interactions and applying certificate pinning for critical endpoints. Certificate pinning verifies the server's public key directly, preventing man-in-the-middle attacks during session management.

Why does insecure logging cause data exfiltration in Flutter apps?

Insecure logging causes data exfiltration in Flutter apps when sensitive information like passwords or session tokens is printed to system logs. Prevent data leaks by ensuring that logging mechanisms never record user credentials or API keys.