Security ScanningSecrets Scanning

Secrets Scanning

Scan your Kubernetes cluster for exposed secrets and credentials that could pose security risks.

Secrets Scanning Overview
Secrets Scanning dashboard with scan results

Overview

Secrets Scanning helps you identify exposed credentials, API keys, tokens, and other sensitive information that may be unintentionally exposed in your Kubernetes resources. This includes scanning ConfigMaps, environment variables, and other configurations where secrets might be accidentally stored in plain text.

Dashboard Tabs

TabDescription
OverviewSummary of scan results and recent findings
FindingsDetailed list of all discovered secrets
Scan HistoryHistory of previous scans

Metrics

The overview shows key metrics:

  • Total Secrets - Number of potential secrets found
  • Critical - High-risk secrets requiring immediate action
  • High - Important secrets to address soon
  • Remediated - Secrets that have been fixed

How to Use

Running a Secrets Scan

  1. Navigate to Security > Security Scanning > Secrets Scanning
  2. Click the Run Scan button in the top right
  3. Wait for the scan to complete
  4. Review findings in the dashboard

Reviewing Findings

  1. Click on the Findings tab
  2. Browse the list of discovered secrets
  3. Click on a finding for details:
    • Location (namespace, resource)
    • Type of secret detected
    • Recommended remediation

Viewing Scan History

  1. Click on the Scan History tab
  2. See when scans were run
  3. Compare results over time

Types of Secrets Detected

TypeExamples
API KeysAWS keys, GCP credentials, Azure tokens
PasswordsDatabase passwords, service credentials
TokensJWT tokens, OAuth tokens, bearer tokens
Private KeysSSH keys, TLS certificates
Connection StringsDatabase URLs with credentials

Best Practices

  1. Use Kubernetes Secrets - Store sensitive data in Secret resources, not ConfigMaps
  2. External Secret Management - Consider tools like Vault, AWS Secrets Manager
  3. Regular Scanning - Run scans regularly to catch new exposures
  4. Immediate Remediation - Address critical findings immediately
  5. Rotate Exposed Secrets - If a secret is exposed, rotate it immediately

Remediation Steps

When a secret is found:

  1. Assess Impact - Determine if the secret was actually exposed
  2. Rotate Secret - Generate a new secret/credential
  3. Update References - Update all applications using the secret
  4. Move to Secrets - Store in Kubernetes Secrets or external vault
  5. Rescan - Verify the issue is resolved

Next Steps