The FAQ contains solid security advice but has areas for improvement. I reordered the security points to prioritize authentication before encryption, as this follows a logical security hierarchy. The original order placed encryption second, but authentication is the foundational requirement for secure REST services. I also improved the clarity of the authentication point by removing redundant text ('Authentication and Authorization: Implement proper mechanisms') and making it more direct. The FAQ correctly advises against storing sensitive data in publicly visible custom metadata and appropriately recommends Protected Custom Metadata and Named Credentials as alternatives.
For the related security rules: ApexInsecureEndpoint directly relates to the FAQ's discussion of securing Apex REST Services for external integrations, as it identifies insecure endpoint configurations. ApexSuggestUsingNamedCred aligns with the FAQ's recommendation to 'use Named Credentials to ensure secure storage and restricted access' instead of storing sensitive data in custom metadata. The hardcoded credentials rules (AvoidHardcodedCredentialsInFieldDecls, AvoidHardcodedCredentialsInVarDecls, AvoidHardcodedCredentialsInVarAssign) relate to the FAQ's warning against storing 'sensitive data like secrets, tokens, or credentials' in custom metadata, as these rules help detect when such sensitive data might be hardcoded inappropriately.