Skip to main content
The 100 built-in signatures cover common attack patterns, but your application may have threats that are unique to your domain: internal project codenames that should never appear in LLM output, proprietary data formats, or custom prompt structures your team uses. Custom signatures let you codify those patterns in YAML and deploy them alongside the shipped catalog — without touching the package.
1

Create the signatures directory

InferenceWall automatically loads all .yaml files from this directory at startup and merges them with the shipped catalog.
2

Write your signature YAML

Create a YAML file for your signature. The filename does not matter — only the id field inside the YAML is used for catalog merging.
3

Verify the signature is picked up

Restart the server or reimport the SDK. InferenceWall performs the catalog merge at startup, so no hot-reload is needed — a restart is sufficient.

Signature YAML format

Every signature is a single YAML file with four top-level sections. The full schema:

Signature ID format

IDs follow the pattern {CATEGORY}-{SUBCATEGORY}-{NUMBER}. Use a number above 099 for custom signatures to avoid colliding with the shipped catalog.

Pattern types

Detection engines

Direction

Set direction to control which side of the conversation the signature inspects:
  • input — scans only user-supplied prompts (inbound)
  • output — scans only LLM responses (outbound)
  • bidirectional — scans both

Overriding shipped signatures

If your custom signature has the same id as a shipped signature, it completely replaces the shipped version at startup. Use this to tune severity, patterns, or scoring without forking the package. For example, to lower the anomaly points for INJ-D-001, create ~/.inferwall/signatures/inj-d-001-override.yaml with id: INJ-D-001 and your modified scoring.anomaly_points. The filename is irrelevant — only the id controls which entry wins.

Using a custom directory path

By default InferenceWall loads custom signatures from ~/.inferwall/signatures/. Override this with the IW_SIGNATURES_DIR environment variable:
All .yaml files in the specified directory are loaded and merged with the shipped catalog.

Testing your signatures

Every signature should include at least 3 true positive and 3 true negative test cases. True positives confirm the signature fires on real attack payloads; true negatives confirm it doesn’t fire on benign inputs that share vocabulary with the attack. Run a quick manual test via the CLI:

MITRE ATLAS mapping

Use the optional meta.atlas field to map your signature to the MITRE ATLAS adversarial AI threat taxonomy. This helps security teams assess detection coverage and identify gaps.
Use the full technique ID including sub-technique numbers (e.g., AML.T0051.000 not AML.T0051). See Concepts: Signatures for the full ATLAS mapping reference.
Community signatures are licensed under CC BY-SA 4.0. If you modify a community signature and redistribute it, you must share your modifications under the same license. Add the license header at the top of every community signature file:

Further reading

Signature catalog

Browse all 100 built-in signatures with their IDs, categories, and ATLAS mappings.

Signature concepts

Deep dive into the three-layer catalog merge, scoring model, and ATLAS taxonomy.