mirror of
https://github.com/mandiant/capa.git
synced 2025-12-12 15:49:46 -08:00
Merge pull request #1283 from mandiant/fix/issue-1282
better detect invalid rules
This commit is contained in:
@@ -82,6 +82,7 @@
|
||||
- dotnet: address unhandled exceptions with improved type checking #1230 @mike-hunhoff
|
||||
- fix import-to-ida script formatting #1208 @williballenthin
|
||||
- render: fix verbose rendering of scopes #1263 @williballenthin
|
||||
- rules: better detect invalid rules #1282 @williballenthin
|
||||
- show-features: better render strings with embedded whitespace #1267 @williballenthin
|
||||
|
||||
### capa explorer IDA Pro plugin
|
||||
|
||||
@@ -29,6 +29,7 @@ from typing import Any, Set, Dict, List, Tuple, Union, Iterator
|
||||
import yaml
|
||||
import pydantic
|
||||
import ruamel.yaml
|
||||
import yaml.parser
|
||||
|
||||
import capa.perf
|
||||
import capa.engine as ceng
|
||||
@@ -836,6 +837,8 @@ class Rule:
|
||||
raise InvalidRuleWithPath(path, str(e)) from e
|
||||
except pydantic.ValidationError as e:
|
||||
raise InvalidRuleWithPath(path, str(e)) from e
|
||||
except yaml.parser.ParserError as e:
|
||||
raise InvalidRuleWithPath(path, str(e)) from e
|
||||
|
||||
def to_yaml(self) -> str:
|
||||
# reformat the yaml document with a common style.
|
||||
|
||||
Reference in New Issue
Block a user