FAQ-000549 - Custom Settings and Configuration Security / Specific Use Cases and Implementation Patterns

Current Status:VALID_RESPONSEErrorUnable to AnswerSuggests Case

Current FAQ

Question
How should Platform Cache be used securely for storing API callout responses?
Answer
To securely use Platform Cache for storing API callout responses in the AppExchange Security Review: - **Avoid storing sensitive data**: Ensure that sensitive information is not stored in the cache. - **Encrypt sensitive data**: If sensitive data must be stored, encrypt it using AES-128 or higher before storing. - **Prevent sensitive data in logs**: Avoid writing sensitive data to debug logs. - **Use for non-sensitive, temporary data**: Limit the cache usage to non-sensitive and temporary data to reduce security risks.
Enhancing FAQ...

Enhancing FAQ with AI recommendations...

AI Recommended Enhancement

Related Security Rules (click to view)
ApexBadCryptoProtectSensitiveData
Question
How should Platform Cache be used securely for storing API callout responses?
Recommended Answer Update
To securely use Platform Cache for storing API callout responses in the AppExchange Security Review: - **Avoid storing sensitive data**: Don't store sensitive information in the cache. - **Encrypt sensitive data**: If you must store sensitive data, encrypt it using AES-256 or higher before storing. - **Prevent sensitive data in logs**: Avoid writing sensitive data to debug logs. - **Use for non-sensitive, temporary data**: Limit cache usage to non-sensitive and temporary data to reduce security risks.
Reasoning
The main issue found was outdated cryptographic guidance. The original FAQ recommended 'AES-128 or higher' encryption, but this conflicts with modern security best practices where AES-256 is the current recommended standard for new implementations. AES-128, while still considered secure, is becoming less preferred for new systems. I updated this to 'AES-256 or higher' to align with current standards. I also made minor wording improvements for clarity ('Ensure that' → 'Don't', 'to reduce security risks' moved for better flow) while preserving all original points and structure. Regarding the selected security rules: ApexBadCrypto directly relates to the FAQ's encryption guidance - this rule detects weak cryptographic practices in Apex code, which is exactly what the FAQ is teaching developers to avoid when storing sensitive data in Platform Cache. The FAQ's recommendation to 'encrypt it using AES-256 or higher before storing' directly addresses the type of cryptographic security that this rule enforces. ProtectSensitiveData relates to the FAQ's core principle of avoiding sensitive data storage and proper data protection practices - this rule identifies when sensitive data might be improperly handled or exposed, which aligns with the FAQ's guidance on 'Avoid storing sensitive data' and 'Prevent sensitive data in logs'.
Reasoning References