Skip to content

pattern: add Datadog API key detection #23

Description

@Rome-1

What

Add a secret detection pattern for Datadog API keys to both Node and Python implementations.

Pattern info

  • Service: Datadog (monitoring/observability)
  • Format: 32-character hex string, typically prefixed with context like DD_API_KEY=
  • Regex suggestion: /\b[a-f0-9]{32}\b/ with contextual anchoring (e.g., datadog|DD_API_KEY|DD_APP_KEY)

Files to change

  1. node/src/scanners/secret-patterns.ts — add pattern to the DEFAULT_SECRET_PATTERNS array
  2. python/rafter_cli/scanners/secret_patterns.py — add identical pattern
  3. node/tests/secret-patterns.test.ts — add test with fake credential
  4. python/tests/test_regex_scanner.py — add matching test

How to test

cd node && pnpm test -- --grep "datadog"
cd python && pytest tests/test_regex_scanner.py -k "datadog"

Notes

  • Follow the existing pattern format: { name, severity, regex, description }
  • Both implementations must have identical regex — see existing patterns for examples
  • Use realistic but fake test credentials

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions