Skip to content

Suppressing False Positives

Add a # llmarmor: ignore comment to suppress a finding on a specific line:

# Suppress all rules on the next line
# llmarmor: ignore
response = client.chat.completions.create(model="gpt-4", messages=messages)
# Suppress only LLM07 on this line
SYSTEM_PROMPT = "You are a helpful assistant." # llmarmor: ignore[LLM07]
# Suppress multiple rules
result = eval(user_code) # llmarmor: ignore[LLM05,LLM01]

The comment can be placed on the finding’s own line or on the line immediately above it.

Skip entire files or directories using gitignore-style patterns:

tests/fixtures/**
build/**
dist/**
scripts/dev_seed.py

Disable specific rules in .llmarmor.yaml:

rules:
LLM07:
enabled: false

See Configuration for the full config reference.