---
title: RuleFileContents type | Wartiva GraphQL API
description: A FILE rule's content check. Every condition set must hold. Wartiva GraphQL API reference with arguments, fields, and examples.
url: https://wartiva.com/api-docs/types/rule-file-contents.html
updated: 2026-10-07
---

Policies and findings · GraphQL type

# `RuleFileContents` type

A FILE rule's content check. Every condition set must hold. Pattern checks need the path sensor to collect contents; when the collected contents were cut short, a pattern that isn't found proves nothing and the file keeps its current findings. Patterns use RE2 syntax limited to ASCII: they can't name a character beyond ASCII or use a \p or \P class, though . and \S still match any character.

## Fields

| Field Name | Description |
|---|---|
| `mustMatch` - [`String`](https://wartiva.com/api-docs/types/string.html) | A regular expression (RE2 syntax) the collected contents must match. |
| `mustNotMatch` - [`String`](https://wartiva.com/api-docs/types/string.html) | A regular expression (RE2 syntax) the collected contents must not match. |
| `checksum` - [`String`](https://wartiva.com/api-docs/types/string.html) | The xxh3-128 checksum, as 32 hex characters, the file must have: the digest path sensors collect. |

## Used by

- [`RuleBodyFile`](https://wartiva.com/api-docs/types/rule-body-file.html) type: The body of a FILE rule.
- [`RuleFileContentsInput`](https://wartiva.com/api-docs/types/rule-file-contents-input.html) input: Input variant of RuleFileContents.

## Example

### Example

```json
{
  "mustMatch": "abc123",
  "mustNotMatch": "abc123",
  "checksum": "xyz789"
}

```

---

Wartiva is in early access. Request access: https://wartiva.com/early-access.html  
All pages: https://wartiva.com/llms.txt
