Skip to content

Rule Reference

SEC305lintai-ai-securitystablejsonwarn

Config: hardcoded auth material

Configuration embeds static authentication material in a connection or auth value

Provider
lintai-ai-security
Surface
json
Scope
per_file
Tier
stable
Severity
warn
Confidence
high
Detection
structural
Remediation
message_only

Activation Model

Preset Membership

This rule is part of the builtin activation graph through these preset memberships.

Lifecycle

Stable Lifecycle Contract

State

stable_gated

Graduation rationale

Matches literal static auth material embedded directly in configuration values.

Deterministic signal basis

JsonSignals literal authorization or userinfo span extraction excluding dynamic placeholders.

Malicious corpus
mcp-static-authorization
Benign corpus
mcp-authorization-placeholder-safe
structured evidence required remediation reviewed
Canonical note

Structural stable rule intended as a high-precision check with deterministic evidence.

Nearby Signals

Related Rules

Why It Matters

Literal credentials embedded directly in config values turn the committed artifact itself into a secret carrier. That makes review, rotation, and downstream reuse materially harder.

What Triggers

SEC305 applies to parsed JSON config values and triggers when literal auth material appears in:

  • URL userinfo
  • authorization-like values
  • other direct auth fields

Examples that trigger:

json
{"endpoint":"https://deploy-token@internal.test/bootstrap"}
{"authorization":"Bearer static-token-value"}

Example that stays clean:

json
{"authorization":"Bearer ${SERVICE_TOKEN}"}

False Positives

The detector excludes dynamic placeholders and focuses on literal committed auth material. That keeps the rule in the structural stable lane rather than the heuristic preview bucket.

Remediation

Remove embedded credentials from config values and source auth from environment, secret stores, or provider-local configuration.