FAQ-000529 - Custom Settings and Configuration Security / Security Review and Compliance

Current Status:VALID_RESPONSEErrorUnable to AnswerSuggests Case

Current FAQ

Question
What are the best practices for bringing custom objects with sensitive data to protected status?
Answer
To bring custom objects with sensitive data to protected status in the AppExchange Security Review, follow these best practices: 1. **Use Protected Custom Metadata or Settings**: Store sensitive data like API keys or passwords in protected custom metadata fields or settings for secure management. 2. **Encrypt Sensitive Data**: If sensitive data is stored in custom objects, encrypt it using the Apex Crypto API and store the encryption key separately in protected custom settings or metadata. 3. **Set Permissions Carefully**: Configure field permissions to ensure only authorized users or processes can access sensitive data. 4. **Avoid Public Visibility**: Do not use public custom settings, objects, or metadata for sensitive data to prevent unauthorized access. 5. **Secure Coding Practices**: Prevent vulnerabilities like SOQL injection and unauthorized access by sanitizing inputs and enforcing CRUD/FLS checks. 6. **Leverage Named Credentials**: Use named credentials for locally generated or per-org secrets, but note that administrators can view these. 7. **Thorough Reviews and Testing**: Use tools like the Salesforce Security Scanner and conduct manual reviews to identify vulnerabilities. Document false positives with evidence for the review process. 8. **Follow Salesforce Guidelines**: Adhere to AppExchange Security Review policies and Salesforce's standards for secure data handling. By following these steps, you can enhance security and meet the AppExchange Security Review requirements.
Enhancing FAQ...

Enhancing FAQ with AI recommendations...

AI Recommended Enhancement

Related Security Rules (click to view)
ApexBadCryptoApexCRUDViolationApexSOQLInjectionApexSuggestUsingNamedCredAvoidHardcodedCredentialsInFieldDeclsAvoidHardcodedCredentialsInVarDeclsAvoidHardcodedCredentialsInVarAssignProtectSensitiveData
Question
What are the best practices for bringing custom objects with sensitive data to protected status?
Recommended Answer Update
To bring custom objects with sensitive data to protected status in the AppExchange Security Review, follow these best practices: 1. **Use Protected Custom Metadata or Settings**: Store sensitive data like API keys or passwords in protected custom metadata fields or settings for secure management. 2. **Encrypt Sensitive Data**: If sensitive data is stored in custom objects, encrypt it using the Apex Crypto API and store the encryption key separately in protected custom settings or metadata. 3. **Set Permissions Carefully**: Configure field permissions to ensure only authorized users or processes can access sensitive data. 4. **Avoid Public Visibility**: Don't use public custom settings, objects, or metadata for sensitive data to prevent unauthorized access. 5. **Secure Coding Practices**: Prevent vulnerabilities like SOQL injection and unauthorized access by sanitizing inputs and enforcing CRUD/FLS checks. 6. **Leverage Named Credentials**: Use named credentials for locally generated or per-org secrets, but note that administrators can view these. 7. **Thorough Reviews and Testing**: Use tools like the Salesforce Security Scanner and conduct manual reviews to identify vulnerabilities. Document false positives with evidence for the review process. 8. **Follow Salesforce Guidelines**: Adhere to AppExchange Security Review policies and Salesforce's standards for secure data handling. By following these steps, you can enhance security and meet the AppExchange Security Review requirements.
Reasoning
The FAQ content is generally accurate and well-structured. The main improvements made were: 1. **Minor wording refinements**: Changed 'Do not use' to 'Don't use' in point 4 to maintain conversational tone per the brand guidelines. 2. **Security rule associations**: This FAQ directly relates to multiple security rules: - ApexBadCrypto: The FAQ discusses encrypting sensitive data using Apex Crypto API, which this rule validates - ApexCRUDViolation: Point 5 mentions enforcing CRUD/FLS checks, which this rule detects violations for - ApexSOQLInjection: Point 5 specifically mentions preventing SOQL injection by sanitizing inputs - ApexSuggestUsingNamedCred: Point 6 directly discusses using named credentials for secrets - AvoidHardcodedCredentialsInFieldDecls/VarDecls/VarAssign: Points 1 and 2 discuss proper storage of sensitive data like API keys and passwords, avoiding hardcoding - ProtectSensitiveData: The entire FAQ is about protecting sensitive data in custom objects 3. **Content accuracy**: All technical content aligns with current Salesforce security best practices and the available security rules. No outdated information was detected.
Reasoning References
Recommended Related Articles