Appearance
Why It Matters
SEC361 flags committed Claude settings files that omit a top-level $schema reference.
This is useful because:
- shared
.claude/settings.jsonfiles are configuration artifacts, not free-form notes - a schema reference improves editor validation and makes team-owned settings easier to review
- the failure mode is community-hostile: the file looks authoritative, but misses a low-cost interoperability hint that many users expect in checked-in JSON config
What Triggers
This rule applies only to committed Claude settings surfaces:
.claude/settings.jsonclaude/settings.json
It triggers when:
- the JSON parses as a top-level object
- and the object does not contain
$schema
Example that triggers:
json
{
"hooks": {
"Stop": []
}
}Example that stays clean:
json
{
"$schema": "https://json.schemastore.org/claude-code-settings.json",
"hooks": {
"Stop": []
}
}- fixture-like paths under
tests/,fixtures/,examples/, orsamples/
False Positives
This rule stays Preview because some repositories intentionally keep Claude settings minimal or target editor setups without schema-aware validation. The signal is about deterministic configuration quality and maintainability, not about exploitability.
Remediation
Add the top-level SchemaStore URL:
json
{
"$schema": "https://json.schemastore.org/claude-code-settings.json"
}Keep the rest of the settings file unchanged. The goal is to make shared Claude settings easier to validate and review, not to change runtime behavior.