Skip to content

Rule Reference

SEC309lintai-ai-securitythreat-reviewsecuritystablejsonwarn

Config: literal secrets in config

Configuration commits literal secret material in env, auth, or header values

Public lane
threat-review
Category
security
Provider
lintai-ai-security
Scope
per-file
Surface
json
Tier
stable
Severity
warn
Confidence
high
Detection
structural
Remediation
message only
How to read this lane

Explicit malicious, secret-bearing, or spyware-like review.

How to read this category

Strong exploit, secret, or unsafe-execution signal.

Activation Model

Preset Activation

These presets explain where this rule appears in the product experience.

Lifecycle

Stable Lifecycle Contract

State

stable

Graduation rationale

Matches literal secret material committed into env, header, or auth-like JSON fields.

Deterministic signal basis

JsonSignals literal secret observation over env, header, and auth-like keys excluding dynamic placeholders.

Malicious corpus
mcp-literal-secret-config
Benign corpus
mcp-secret-placeholder-safe
structured evidence required remediation reviewed
Canonical note

Structural stable rule positioned as an explicit threat-review control: high-signal malicious, credential-bearing, or spyware-like behavior that stays opt-in rather than shaping the quiet default.

Nearby Signals

Related Rules

Why It Matters

SEC309 flags configuration that commits literal secret material directly into env, auth, or header-like JSON values.

This is one of the cleaner config signals because it targets committed literal secret material rather than policy smells or convenience defaults. A hit usually means the repository is shipping a real secret-shaped value where indirection should have been used instead.

What Triggers

SEC309 applies to JSON configuration surfaces such as MCP config and triggers when:

  • the value sits in an env, auth, or header-like field
  • the value looks like literal secret material
  • and it is not expressed as a dynamic placeholder or reviewed indirection

Example that triggers:

json
{"env":{"OPENAI_API_KEY":"sk-test-secret"}}

Examples that stay clean:

  • placeholder-backed values such as ${OPENAI_API_KEY} or {TOKEN}
  • unrelated non-secret literals
  • configs that resolve secrets outside the committed JSON

False Positives

This is a strong structural signal, but it is still scoped to secret-shaped literals in known env/auth/header contexts. Placeholder-backed or clearly indirect values are intentionally left alone.

Remediation

Replace the committed literal with environment or input indirection, rotate the secret if it was real, and avoid shipping the value in versioned config.