security-and-hardening

Implements secure storage, network, and IPC hardening patterns for Android and Flutter applications.

Updated Jun 13, 2026
One-click install
npx skills add https://github.com/22Teikk/22Teikk-Agent-Skills-Hub --skill security-and-hardening-22teikk
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: security-and-hardening
Source: https://github.com/22Teikk/22Teikk-Agent-Skills-Hub/tree/main/core/skills/security-and-hardening
Command: npx skills add https://github.com/22Teikk/22Teikk-Agent-Skills-Hub --skill security-and-hardening-22teikk

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Mobile apps run in a hostile client environment where attackers can decompile binaries, read local storage, intercept network traffic, and inject malicious inputs through intents or deep links. This Skill provides concrete secure-coding patterns and checklists so Android and Flutter developers avoid common vulnerabilities like plaintext token storage, exported components, disabled TLS validation, and leaked secrets. ## Core Features & Use Cases - Secure Local Storage: Patterns for EncryptedSharedPreferences, SQLCipher-encrypted Room databases, and flutter_secure_storage instead of plaintext SharedPreferences. - Network & IPC Hardening: Network Security Config with certificate pinning, cleartext restrictions, exported-component rules, immutable PendingIntents, and WebView lockdown settings. - LLM Feature Security: OWASP LLM Top 10 guidance for apps calling language models, treating model output as untrusted input. - Use Case: Before releasing a banking app, run the security review checklist to verify exported attributes, R8 obfuscation, certificate pinning, and that no secrets ship via --dart-define or hardcoded Gradle files. ## Quick Start Review my Android manifest and storage code for security vulnerabilities and apply the hardening patterns from this skill.

Frequently Asked Questions about security-and-hardening

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

FAQPage Schema
How do I securely store tokens on Android?▼

Store tokens in EncryptedSharedPreferences from Jetpack Security, backed by an AES256_GCM master key in the Android Keystore. Never use plaintext SharedPreferences, since internal storage is fully readable on rooted devices.

How to implement certificate pinning in Android apps?▼

Define a pin-set with SHA-256 digests inside a domain-config block in res/xml/network_security_config.xml, then reference it via android:networkSecurityConfig in the manifest. Include a backup pin and an expiration date to avoid lockout.

Is flutter_secure_storage safe for sensitive data?▼

Yes, flutter_secure_storage uses iOS Keychain and Android Keystore-backed encryption, making it appropriate for tokens and credentials. Avoid shared_preferences for secrets, and never ship secrets via --dart-define since values are compiled into the binary.

Why is badCertificateCallback returning true dangerous in dio?▼

Returning true from badCertificateCallback disables TLS certificate validation entirely, enabling man-in-the-middle attacks on all HTTPS traffic. For high-security endpoints, pin certificates through a managed certificate store instead.

When should Android components be exported in the manifest?▼

Set android:exported="false" for all internal activities, services, and receivers. Only export components that must respond to other apps or the system, and protect them with a custom permission to prevent hijacking or fake broadcasts.

Does R8 obfuscation protect hardcoded API keys?▼

No, obfuscated keys can still be extracted with string analysis tools on the APK. Keep keys out of source code using local.properties or build parameters, and fetch sensitive configuration dynamically at runtime.