cwe-311-non-encrypted-storage

Remediate CWE-311 vulnerabilities in Java code with AES-256-GCM encryption.

3|1|Updated Mar 6, 2026
One-click install
npx skills add https://github.com/DevelopersCoffee/java-cwe-security-skills --skill cwe-311-non-encrypted-storage
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cwe-311-non-encrypted-storage
Source: https://github.com/DevelopersCoffee/java-cwe-security-skills/tree/main/cwe-311-non-encrypted-storage
Command: npx skills add https://github.com/DevelopersCoffee/java-cwe-security-skills --skill cwe-311-non-encrypted-storage

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the critical security vulnerability of storing sensitive data in plaintext, ensuring that confidential information is properly encrypted.

Core Features & Use Cases

  • Vulnerability Remediation: Identifies and fixes patterns where sensitive data (like passwords or SSNs) is stored unencrypted.
  • Secure Data Handling: Implements robust encryption mechanisms for data at rest, such as in configuration files or databases.
  • Use Case: When dealing with user data that includes personally identifiable information (PII) like social security numbers, this skill ensures that the data is encrypted before being saved to the database, protecting it from unauthorized access.

Quick Start

Use the cwe-311-non-encrypted-storage skill to secure sensitive data in the provided Java code.

Frequently Asked Questions about cwe-311-non-encrypted-storage

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix missing encryption of sensitive data in Java?

Remediate missing encryption of sensitive data in Java by replacing plaintext storage patterns in databases or configuration files with AES-256-GCM encryption and secure key management practices to protect data at rest.

What is CWE-311 and how does it affect database storage?

CWE-311 is the missing encryption of sensitive data vulnerability, occurring when personally identifiable information like passwords or SSNs is saved in plaintext in databases, exposing confidential data to unauthorized access.

How do I encrypt sensitive data before saving it to a database?

Encrypt sensitive data before saving it to a database by applying AES-256-GCM encryption mechanisms to the plaintext information, ensuring that confidential user data is properly encrypted when at rest.

Does this encryption remediation handle plaintext in configuration files?

Yes, this encryption remediation handles plaintext in configuration files by identifying and fixing unencrypted sensitive data patterns in both configuration files and databases to ensure secure data handling.

What encryption standard is required for securing Java sensitive data?

AES-256-GCM is the required encryption standard for securing Java sensitive data, providing strong data protection for vulnerabilities like CWE-311 when used alongside secure key management practices.

When do I need to implement secure data handling for PII in Java?

Implement secure data handling for PII in Java when dealing with user data that includes personally identifiable information, ensuring the data is encrypted before being saved to prevent unauthorized access.