Appearance
Why It Matters
Literal auth material inside server.json remote headers turns the registry artifact into a secret-bearing manifest. That is both a security problem and a portability problem for downstream consumers.
What Triggers
SEC321 applies to server.json remotes[].headers[] and triggers when an auth-like header carries literal bearer, basic, or API-key style material instead of a placeholder-backed variable.
Example that triggers:
json
{
"headers": [
{
"name": "Authorization",
"value": "Bearer sk_live_12345"
}
]
}Example that stays clean:
json
{
"headers": [
{
"name": "Authorization",
"value": "Bearer {TOKEN}",
"variables": {
"TOKEN": { "description": "API token", "isSecret": true }
}
}
]
}False Positives
The rule is limited to auth-like header names and literal values. Dynamic placeholders stay clean, so this is not a blanket rule against authenticated remotes.
Remediation
Replace the literal auth header value with a placeholder-backed variable declared on the same header object.