The FAQ content is accurate and addresses the core question well. I made minor improvements to reduce redundancy and improve flow. The original answer repeated the same recommendation about protected custom settings twice in slightly different ways, so I consolidated this into a cleaner structure while preserving all the technical information.
Regarding security rules selected:
- **AvoidHardcodedCredentialsInFieldDecls**: This rule directly relates to the FAQ's emphasis on avoiding hardcoded credentials in field declarations, which is addressed by the recommendation to use protected custom settings for customer-configurable credentials instead.
- **AvoidHardcodedCredentialsInVarDecls**: The FAQ's approach of allowing post-installation configuration specifically prevents the need to hardcode credentials in variable declarations, which this rule flags.
- **AvoidHardcodedCredentialsInVarAssign**: Similarly, by using protected custom settings and named credentials as recommended in the FAQ, developers avoid hardcoding credentials in variable assignments.
- **ApexSuggestUsingNamedCred**: The FAQ explicitly recommends "Named Credentials" as one of the three main approaches, which directly aligns with this rule's guidance to use named credentials for secure credential management.
- **ProtectSensitiveData**: The entire FAQ is about protecting sensitive data through secure storage mechanisms like protected custom settings, which is exactly what this rule aims to enforce.