Summary
Add regex pattern to extract YARA rule references from CTI text.
Context
YARA rules are the standard for malware detection signatures. CTI reports reference them by name (e.g., rule apt28_beacon { ... }, YARA: win_cobalt_strike).
- File to edit:
src/zettelforge/entity_indexer.py
- Tests:
tests/test_basic.py::TestEntityExtractor
Acceptance Criteria
Example Input/Output
ext = EntityExtractor()
result = ext.extract_all("Detected by rule apt28_beacon")
assert "apt28_beacon" in result["yara_rule"]
Summary
Add regex pattern to extract YARA rule references from CTI text.
Context
YARA rules are the standard for malware detection signatures. CTI reports reference them by name (e.g.,
rule apt28_beacon { ... },YARA: win_cobalt_strike).src/zettelforge/entity_indexer.pytests/test_basic.py::TestEntityExtractorAcceptance Criteria
yara_ruletoREGEX_PATTERNSinentity_indexer.pyrule rule_name,YARA: rule_name,yara:rule_nameyara_ruletoENTITY_TYPESrule apt28_beaconextracts asyara_ruleYARA: win_cobalt_strike_loaderextracts asyara_rulethe rule of lawdoes NOT extractpytest tests/test_basic.py -vExample Input/Output