The main improvement focuses on step 1 regarding credential storage. The original text mentioned 'Secure sensitive information like API keys in protected custom settings or metadata' which is acceptable but incomplete. The updated text emphasizes Named Credentials as the preferred approach while maintaining protected custom settings as an alternative, and explicitly calls out avoiding hardcoding credentials in code. This aligns with Salesforce security best practices.
For the security rules selected:
- ApexInsecureEndpoint: The FAQ discusses scanning external endpoints and ensuring secure connections to third-party applications, which directly relates to this rule about insecure endpoint usage.
- ApexSuggestUsingNamedCred: Step 1 discusses handling authentication credentials for third-party applications, and this rule specifically recommends using Named Credentials for secure credential management.
- AvoidHardcodedCredentialsInFieldDecls: The FAQ mentions securing API keys and credentials, and this rule prevents hardcoding credentials in field declarations.
- AvoidHardcodedCredentialsInHttpHeader: When integrating with third-party applications, developers often need to set authentication headers, and this rule prevents hardcoding those credentials.
- AvoidHardcodedCredentialsInVarAssign: Related to credential management mentioned in step 1, this rule prevents hardcoding credentials in variable assignments.
- AvoidHardcodedCredentialsInVarDecls: Also related to the credential management discussion in step 1, preventing hardcoded credentials in variable declarations.