Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

YARA

$ yara Official Low Risk
VirusTotal · Security & Secrets · BSD-3-Clause · macos / linux / windows

YARA (yara) classifies and identifies malware samples, suspicious binaries, and leaked artifacts using declarative .yar rule files. Completely offline and read-only with deterministic exit codes, though it outputs line-oriented text (RULE TARGET) rather than JSON.

FCRS-1.0 Score
80 /100
Good
Medium Confidence
Zero-Friction Install
brew install yara
CLI vs MCP Decision CLI Only

yara scans large local files, memory dumps, and directory trees at native C speed without transferring binaries over MCP.

Agent-Readiness Checklist

— JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 17 / 25

Fully non-interactive and deterministic, though yara emits space-separated text lines and lacks a built-in --json flag.

  • Non-interactive flag execution with -r, -s, -m, -w
  • No native --json output format
Trust & Safety 23 / 25

Strictly read-only and 100% offline; supports --timeout to guard against expensive regex backtracking in rules.

  • Zero network calls and zero target file modifications
Setup & Portability 13 / 15

Fast C binary available via brew, Linux apt/dnf packages, and Windows release archives.

  • Available across macOS, Linux, and Windows
Utility & Efficiency 12 / 15

Industry-standard malware and pattern-matching engine; requires external .yar rule files to be useful.

  • De-facto standard DFIR pattern-matching CLI
Maintenance & Lineage 8 / 10

Maintained by VirusTotal (VirusTotal/yara) under BSD-3-Clause (transitioning alongside YARA-X).

  • Official VirusTotal repository under BSD-3-Clause
Docs & Verifiability 7 / 10

Comprehensive ReadTheDocs manual covering rule syntax and CLI flags.

  • Official docs at yara.readthedocs.io

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

No authentication or credentials used; reads local .yar rule files and target files only.

Side Effects
Read-Only
Cost & Quotas

BSD-3-Clause open-source CLI; free and 100% offline.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# YARA (yara) Agent Rules
- Pass `-w` in automated runs to suppress non-fatal rule syntax warnings from polluting stdout.
- Use `-r` on bounded target directories and `-p <threads>` for large trees; keep `--timeout` set on untrusted rule sets.

Agent-Ready Command Recipes

Safe Read-Only Queries

Scan a directory recursively with rule metadata
yara -r -m -w rules.yar ./artifacts

Scans ./artifacts recursively (-r), prints matched rule -m metadata, and suppresses rule warnings (-w).

Print matched string offsets on a file
yara -s -g rules.yar suspicious.bin

Prints rule tags (-g) and exact hex/string match offsets (-s) on suspicious.bin.

Strengths for Agents

  • + Fast, offline, strictly read-only scanning with -s offset evidence and -m metadata.
  • + Clean --timeout safeguard prevents pathological rule regexes from hanging agent runs.

Caveats & Pitfalls

  • ! Lacks native --json output—agents must parse line-oriented RULE [TAGS] FILE text.
  • ! Does not ship built-in malware rules; requires pointing to a .yar rule file or compiled ruleset.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI