For the complete documentation index, see llms.txt. This page is also available as Markdown.
Cortex CloudApplication Security

MongoDB Atlas Keys Secret detected in code

Rule Details

Cortex AppSec Rule ID

APPSEC_SECRET_116

Category

Database Credentials

Severity

HIGH

Framework

Git

Impact

The MongoDB Atlas Keys Secret grants server-to-server access to cloud resources.

Exposure allows unauthorized access to databases, potentially leading to data exfiltration, modification, or deletion. This is a Critical Risk causing operational disruption and financial loss.

How to Fix

To remediate exposed Database credentials:

  1. Log in to your database administration tool or console.

  2. Identify the database user associated with the exposed connection string.

  3. Rotate the password for that specific database user immediately.

  4. Update the connection strings in your application configuration or secrets manager.

  5. Restart your application instances if necessary to apply the new connection string.

Next, remove the secret from your codebase:

  1. Locate the exposed connection string in your codebase.

  2. Replace the hardcoded value with a secure variable or reference.

Finally, clean your version control history:

  1. Permanently remove the sensitive data from your version control history to ensure it cannot be retrieved.

Last updated

Was this helpful?