The FAQ content is generally solid but needed refinement in several areas to align with Salesforce security best practices:
1. **Encryption Standards**: Updated to recommend AES-256 as the preferred standard while maintaining AES-128 as acceptable minimum, and clarified to use "platform-provided encryption libraries" for better accuracy.
2. **Credential Management**: Enhanced to specifically mention Salesforce Named Credentials as the recommended approach, which aligns with secure credential storage practices. Added explicit guidance against hardcoding credentials.
3. **Logging Practices**: Strengthened the language from "Avoid logging" to "Never log" to emphasize the critical nature of this security requirement.
4. **Security Review Scope**: Clarified that the security review "doesn't verify" rather than "does not verify" for better readability.
**Security Rules Reasoning:**
- **ApexBadCrypto**: Selected because the FAQ discusses encryption standards and avoiding custom encryption implementations, which directly relates to this rule's purpose of detecting weak cryptography.
- **ApexSuggestUsingNamedCred**: Selected because the FAQ covers credential management and secure storage, which directly aligns with this rule's recommendation to use Named Credentials.
- **AvoidHardcodedCredentialsInFieldDecls/VarDecls/VarAssign/HttpHeader**: Selected because the FAQ discusses secure credential storage and the updated text explicitly mentions not hardcoding credentials, which these rules detect.
- **ProtectSensitiveData**: Selected because the entire FAQ is about protecting sensitive insurance data (SSN, bank details, personal information), which directly matches this rule's purpose.
- **AvoidInsecureHttpRemoteSiteSetting**: Selected because insurance verification typically involves external API calls, and the FAQ discusses data in transit security.
- **UseHttpsCallbackUrlConnectedApp**: Selected because insurance applications often use OAuth flows for secure authentication, relating to the FAQ's authentication and security considerations.