FAQ-000737 - Data Storage and Encryption Security / Vulnerability Identification and Remediation

Current Status:VALID_RESPONSEErrorUnable to AnswerSuggests Case

Current FAQ

Question
What are the most common mistakes that lead to "Insecure Storage of Sensitive Data" vulnerabilities?
Answer
The most common mistakes that lead to "Insecure Storage of Sensitive Data" vulnerabilities in Salesforce include: 1. **Unprotected Storage**: Storing sensitive information (e.g., API keys, passwords, cryptographic keys) in unprotected fields or custom objects without encryption. 2. **Public Visibility**: Using public visibility settings for sensitive fields, allowing unauthorized access. 3. **Logging Sensitive Data**: Including sensitive data in debug statements, which can expose it in production environments. 4. **Ignoring Security Standards**: Failing to follow enterprise security standards when exporting or storing sensitive data. 5. **Improper Storage**: Not using protected custom settings or custom metadata to securely store secrets. 6. **Insecure Client Applications**: Storing credentials insecurely in client applications (e.g., browser apps or Java apps) without proper encryption mechanisms. 7. **Insecure Retrieval Methods**: Using insecure methods to retrieve or store session IDs or other sensitive information. Avoiding these mistakes by implementing secure storage practices, encryption, and proper access controls can help mitigate these vulnerabilities.
Enhancing FAQ...

Enhancing FAQ with AI recommendations...

AI Recommended Enhancement

Related Security Rules (click to view)
ApexBadCryptoApexSuggestUsingNamedCredAvoidHardcodedCredentialsInFieldDeclsAvoidHardcodedCredentialsInVarDeclsAvoidHardcodedCredentialsInVarAssignAvoidHardcodedCredentialsInHttpHeaderProtectSensitiveData
Question
What are the most common mistakes that lead to "Insecure Storage of Sensitive Data" vulnerabilities?
Recommended Answer Update
The most common mistakes that lead to "Insecure Storage of Sensitive Data" vulnerabilities in Salesforce include: 1. **Unprotected Storage**: Storing sensitive information (e.g., API keys, passwords, cryptographic keys) in unprotected fields or custom objects without encryption. 2. **Public Visibility**: Using public visibility settings for sensitive fields, allowing unauthorized access. 3. **Logging Sensitive Data**: Including sensitive data in debug statements, which can expose it in production environments. 4. **Ignoring Security Standards**: Failing to follow enterprise security standards when exporting or storing sensitive data. 5. **Improper Storage**: Not using protected custom settings, custom metadata, or Named Credentials to securely store secrets. 6. **Insecure Client Applications**: Storing credentials insecurely in client applications (e.g., browser apps or Java apps) without proper encryption mechanisms. 7. **Insecure Retrieval Methods**: Using insecure methods to retrieve or store session IDs or other sensitive information. Avoiding these mistakes by implementing secure storage practices, encryption, and proper access controls can help mitigate these vulnerabilities.
Reasoning
The FAQ content is accurate and comprehensive, but needed one minor improvement to better align with Salesforce best practices. The main change was in point 5, where I added "Named Credentials" alongside protected custom settings and custom metadata. This is important because Named Credentials are the recommended approach for securely storing external system credentials, which directly relates to several of the security rules. The security rules I selected are all directly relevant to the FAQ content: ApexBadCrypto relates to point 1 about encryption, ApexSuggestUsingNamedCred relates to point 5 about proper storage mechanisms, the AvoidHardcodedCredentials rules (FieldDecls, VarDecls, VarAssign, HttpHeader) all relate to points 1 and 6 about not storing credentials in unprotected locations, and ProtectSensitiveData relates to the overall theme of the FAQ about protecting sensitive information from insecure storage.
Reasoning References