AgentsConfigHelper / rules
Cursor rule2 starsChanged 3 months agoMITView on GitHub
Mobile app security (iOS/Android): storage, transport, code integrity, biometrics, permissions
We split this codeguard-0-mobile-apps.mdc into the rules it gives an agent
28 rules. About 0 are common, 28 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈28
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Follow least privilege and defense in depth principles
- Distinctive: line 17
Use standard secure authentication protocols (OAuth2, JWT)
- Distinctive: line 21
Use only trusted and validated third-party libraries and components
- Distinctive: line 25
Never trust the client for security decisions:
- Distinctive: line 27
Do not store user passwords on device.
- Distinctive: line 28
Avoid hardcoding credentials in the mobile app
- Distinctive: line 30
Use platform-specific secure storage (iOS Keychain, Android Keystore)
- Distinctive: line 34
Use platform-supported biometric authentication with secure fallbacks
- Distinctive: line 43
Avoid caching, logging, or background snapshots of sensitive data
- Distinctive: line 44
Always use HTTPS for network communications
- Distinctive: line 49
Use HTTPS for all network communication
- Distinctive: line 50
Do not override SSL certificate validation for self-signed certificates
- Distinctive: line 51
Use strong, industry standard cipher suites with appropriate key lengths
- Distinctive: line 52
Use certificates signed by trusted CA providers
- Distinctive: line 53
Consider certificate pinning for additional security
- Distinctive: line 55
Avoid sending sensitive data via SMS
- Distinctive: line 60
Use static analysis tools to identify vulnerabilities
- Distinctive: line 62
Keep all libraries up to date to patch known vulnerabilities
- Distinctive: line 67
Check for debugging, hooking, or code injection
- Distinctive: line 69
Verify app signatures at runtime
- Distinctive: line 74
Use Android's ProGuard for code obfuscation
- Distinctive: line 75
Avoid storing sensitive data in SharedPreferences
- Distinctive: line 77
Use Android Keystore with hardware backing (TEE or StrongBox)
- Distinctive: line 84
Use conditional logic to mask sensitive widget content on lock screen
- Distinctive: line 86
Use Secure Enclave for cryptographic key storage
- Distinctive: line 88
Use DeviceCheck API for persistent device state tracking
- Distinctive: line 95
Ensure security features do not harm usability
- Distinctive: line 96
Use real-time monitoring to detect and respond to threats
≈ “Common” is an estimate: at least 1 in 5 of the 6,350 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
--- description: 'Mobile app security (iOS/Android): storage, transport, code integrity, biometrics, permissions' globs: **/*.java,**/*.js,**/*.jsx,**/*.kt,**/*.kts,**/*.m,**/*.mjs,**/*.pl,**/*.pm,**/*.swift,**/*.wsdl,**/*.xml,**/*.xsd,**/*.xslt version: 1.0.1 --- rule_id: codeguard-0-mobile-apps ## Mobile Application Security Guidelines Essential security practices for developing secure mobile applications across iOS and Android platforms. ### Architecture and Design Implement secure design principles from the start: - Follow least privilege and defense in depth principles - Use standard secure authentication protocols (OAuth2, JWT) - Perform all authentication and authorization checks server-side - Request only necessary permissions for app and backend services - Establish security controls for app updates, patches, and releases - Use only trusted and validated third-party libraries and components ### Authentication and Authorization Never trust the client for security decisions: - Perform authentication/authorization server-side only - Do not store user passwords on device; use revocable access tokens - Avoid hardcoding credentials in the mobile app - Encrypt credentials in transmission - Use platform-specific secure storage (iOS Keychain, Android Keystore) - Require password complexity and avoid short PINs (4 digits) - Implement session timeouts and remote logout functionality - Require re-authentication for sensitive operations - Use platform-supported biometric authentication with secure fallbacks ### Data Storage and Privacy Protect sensitive data at rest and in transit: - Encrypt sensitive data using platform APIs; avoid custom encryption - Leverage hardware-based security features (Secure Enclave, Strongbox) - Store private data on device's internal storage only - Minimize PII collection to necessity and implement automatic expiration - Avoid caching, logging, or background snapshots of sensitive data - Always use HTTPS for network communications ### Network Communication Assume all network communication is insecure: - Use HTTPS for all network communication - Do not override SSL certificate validation for self-signed certificates - Use strong, industry standard cipher suites with appropriate key lengths - Use certificates signed by trusted CA providers - Consider certificate pinning for additional security - Encrypt data even if sent over SSL - Avoid sending sensitive data via SMS ### Code Quality and Integrity Maintain application security throughout development: - Use static analysis tools to identify vulnerabilities - Make security a focal point during code reviews - Keep all libraries up to date to patch known vulnerabilities - Disable debugging in production builds - Include code to validate integrity of application code - Obfuscate the app binary - Implement runtime anti-tampering controls: - Check for debugging, hooking, or code injection - Detect emulator or rooted/jailbroken devices - Verify app signatures at runtime ### Platform-Specific Security #### Android Security - Use Android's ProGuard for code obfuscation - Avoid storing sensitive data in SharedPreferences - Disable backup mode to prevent sensitive data in backups - Use Android Keystore with hardware backing (TEE or StrongBox) - Implement Google's Play Integrity API for device and app integrity checks #### iOS Security - Configure Shortcuts permissions to require device unlock for sensitive actions - Set Siri intent `requiresUserAuthentication` to true for sensitive functionality - Implement authentication checks on deep link endpoints - Use conditional logic to mask sensitive widget content on lock screen - Store sensitive data in iOS Keychain, not plist files - Use Secure Enclave for cryptographic key storage - Implement App Attest API for app integrity validation - Use DeviceCheck API for persistent device state tracking ### Testing and Monitoring Validate security controls through comprehensive testing: - Perform penetration testing including cryptographic vulnerability assessment - Leverage automated tests to ensure security features work as expected - Ensure security features do not harm usability - Use real-time monitoring to detect and respond to threats - Have a clear incident response plan in place - Plan for regular updates and implement forced update mechanisms when necessary ### Input and Output Validation Prevent injection and execution attacks: - Validate and sanitize all user input - Validate and sanitize output to prevent injection attacks - Mask sensitive information on UI fields to prevent shoulder surfing - Inform users about security-related activities (logins from new devices) By following these practices derived from the OWASP Mobile Application Security framework, you can significantly improve the security posture of your mobile applications across both development and operational phases.
Trending
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Other versions2 projects use a version of this.
Word for word · 2
- cisco-ai-defense/skill-scanner★ 2.7k100% same
- shrav89/skill-scanner★ 2100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 3,978 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository24 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/codeguard-0-additional-cryptography.mdcCursor rule
- .cursor/rules/codeguard-0-api-web-services.mdcCursor rule
- .cursor/rules/codeguard-0-authentication-mfa.mdcCursor rule
- .cursor/rules/codeguard-0-authorization-access-control.mdcCursor rule
- .cursor/rules/codeguard-0-client-side-web-security.mdcCursor rule
- .cursor/rules/codeguard-0-cloud-orchestration-kubernetes.mdcCursor rule
- .cursor/rules/codeguard-0-data-storage.mdcCursor rule
- .cursor/rules/codeguard-0-devops-ci-cd-containers.mdcCursor rule
- .cursor/rules/codeguard-0-file-handling-and-uploads.mdcCursor rule
- .cursor/rules/codeguard-0-framework-and-languages.mdcCursor rule
- .cursor/rules/codeguard-0-iac-security.mdcCursor rule
- .cursor/rules/codeguard-0-input-validation-injection.mdcCursor rule
- .cursor/rules/codeguard-0-logging.mdcCursor rule
- .cursor/rules/codeguard-0-privacy-data-protection.mdcCursor rule
- .cursor/rules/codeguard-0-safe-c-functions.mdcCursor rule
- .cursor/rules/codeguard-0-session-management-and-cookies.mdcCursor rule
- .cursor/rules/codeguard-0-supply-chain-security.mdcCursor rule
- .cursor/rules/codeguard-0-xml-and-serialization.mdcCursor rule
- .cursor/rules/codeguard-1-crypto-algorithms.mdcCursor rule
- .cursor/rules/codeguard-1-digital-certificates.mdcCursor rule
- .cursor/rules/codeguard-1-hardcoded-credentials.mdcCursor rule
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

