- YARA rules — individual
.yarrules, owned by a tenant. - YARA policies — named groupings of rules. The YARA analyzer targets a specific policy, so a single combined policy can swap rule sets per route, per product, or per traffic type.
The data model
A rule is independent of any policy. A policy is just a named ordered set of rule references. A rule can appear in many policies. Deleting a policy does not delete its rules.Authoring a rule
In the dashboard atagnes.lasscyber.com/protection/yara:
- Click New rule.
- Give it a unique name; the YARA rule body must declare the same
identifier (
rule MyRule: …). - Paste or write the rule. The editor validates compilation in-browser before save.
- Optionally toggle Active. Inactive rules are not compiled into any policy; useful for staging risky rules.
- Save.
- The first identifier after
rulemust match the rule’s name in Agnes’s database; the dashboard enforces this. - The
meta: category =value is what shows up as a termination signal under “Rule Category”. Reuse a stable set of categories (Injection,Secrets,Confidentiality,Brand, etc.) so policy authors can target a category instead of an explosion of rule names.
Generating rules from samples
The dashboard has a Generate from samples action that takes a list of example malicious texts and produces a starting YARA rule. It is a helper, not a substitute for review — always read the generated rule before activating it.Built-in rules
Agnes ships a handful of system-level rules underapi/data/yara/:
System rules are read-only; you can disable them per tenant if they
fire on legitimate traffic in your domain.
Authoring a YARA policy
In the dashboard atagnes.lasscyber.com/protection/yara-policies:
- Click New policy.
- Give it a name and (optional) description.
- Add rules to the policy in the order you want them evaluated.
- Optionally mark as the tenant default YARA policy. The default
is used by the YARA analyzer when no
yara_policy_idis set. - Save.
- Inbound base — the system instruction-bypass rules + your own product-specific injections.
- Outbound base — the secrets and exfiltration rules + your internal codenames.
- High-risk surface — every rule, even noisy ones; pair with a
combined policy that treats
matches_found > 0as a block.
Wiring it into a combined policy
The YARA analyzer takes ayara_policy_id parameter:
Permissions
Both rules and policies follow the
yara:* scope family. See
Roles & permissions.
Limits and gotchas
- Compilation cache. Agnes compiles the policy on first use and caches it per tenant + policy. Adding or disabling a rule clears the cache lazily; the next request after the change recompiles.
- Quoting. YARA strings use
/regex/-style literals or double-quoted strings. Test rules locally with the official YARA CLI when uncertain. - Performance. A few hundred well-written rules is fine; tens of thousands of overlapping regex rules will measurably degrade latency. Group, don’t duplicate.
Next
- YARA analyzer — runtime metrics, termination signals, and latency.
- Combined analyzer — wire the YARA policy into termination rules.