Skip to content

Rule Reference

SEC317lintai-ai-securitystabletool_jsonwarn

OpenAI strict schema: properties not all required

OpenAI strict tool schema does not require every declared property

Provider
lintai-ai-security
Surface
tool_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

Checks OpenAI strict tool schemas for full required coverage of declared properties.

Deterministic signal basis

ToolJsonSignals recursive required-versus-properties comparison over strict OpenAI schemas.

Malicious corpus
tool-json-openai-strict-required-coverage
Benign corpus
tool-json-openai-strict-required-complete
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

OpenAI strict mode works best when every declared property is actually covered by required. Otherwise the schema says the contract is strict while still leaving declared keys optional in ways that can surprise tool callers.

What Triggers

SEC317 applies to OpenAI-style strict tool schemas and triggers when declared properties are not all represented in the required list.

Example that triggers:

json
[
  {
    "type": "function",
    "function": {
      "name": "weather",
      "strict": true,
      "parameters": {
        "type": "object",
        "properties": {
          "city": { "type": "string" },
          "units": { "type": "string" }
        },
        "required": ["city"],
        "additionalProperties": false
      }
    }
  }
]

False Positives

This is a deterministic structural comparison between declared properties and the required set for strict schemas.

Remediation

Include every declared property in required when strict mode is enabled.