mirror of
https://github.com/mandiant/capa.git
synced 2025-12-12 23:59:48 -08:00
dynamic: fix some tests
This commit is contained in:
@@ -216,8 +216,8 @@ class InvalidScopes(Lint):
|
||||
recommendation = "At least one scope (static or dynamic) must be specified"
|
||||
|
||||
def check_rule(self, ctx: Context, rule: Rule):
|
||||
return (rule.meta.get("scope").get("static") in ("unspecified", "unsupported")) and (
|
||||
rule.meta.get("scope").get("dynamic") in ("unspecified", "unsupported")
|
||||
return (rule.meta.get("scopes").get("static") in ("unspecified", "unsupported")) and (
|
||||
rule.meta.get("scopes").get("dynamic") in ("unspecified", "unsupported")
|
||||
)
|
||||
|
||||
|
||||
@@ -979,10 +979,6 @@ def main(argv=None):
|
||||
|
||||
default_samples_path = str(Path(__file__).resolve().parent.parent / "tests" / "data")
|
||||
|
||||
# TODO(yelhamer): remove once support for the legacy scope field has been added
|
||||
# https://github.com/mandiant/capa/pull/1580
|
||||
return 0
|
||||
|
||||
parser = argparse.ArgumentParser(description="Lint capa rules.")
|
||||
capa.main.install_common_args(parser, wanted={"tag"})
|
||||
parser.add_argument("rules", type=str, action="append", help="Path to rules")
|
||||
|
||||
Reference in New Issue
Block a user