Skip to content

Commit

Permalink
Merge pull request #63 from binarly-io/feature/target
Browse files Browse the repository at this point in the history
inform the user about rules that should not be used with the scan-firmware command
  • Loading branch information
yeggor committed Mar 12, 2024
2 parents 7ae8172 + f427632 commit f6a2732
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions fwhunt_scan_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,11 @@ def scan_firmware(image_path: str, rule: List[str], rules_dir: str) -> bool:
# Group rules by guids
rules_guids: Dict[str, List[UefiRule]] = dict()
for uefi_rule in set(uefi_rules) - set(uefi_rules_fw):
if uefi_rule.target is not None:
print(
f"[I] The rule {uefi_rule.name} incompatible with scan-firmware command (target: {uefi_rule.target})"
)
continue
if uefi_rule.volume_guids is None:
print(
f"[I] Specify volume_guids in {uefi_rule.name} or use scan-module command"
Expand Down

0 comments on commit f6a2732

Please sign in to comment.