Skip to content

chore: sync upstream changes (82adf904)#88

Merged
willdurand merged 8 commits into
amofrom
sync/upstream-82adf904
Jul 17, 2026
Merged

chore: sync upstream changes (82adf904)#88
willdurand merged 8 commits into
amofrom
sync/upstream-82adf904

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

This PR brings in the latest changes from VirusTotal/yara-x.

Commits included

82adf904 chore: upgrade dependencies.
c8e0f103 style: run `cargo fmt`.
f28330e1 refactor: change return type for `filesize_bounds` and `header_constraints`.
8f7ac9f4 refactor: optimize iteration for rule constraints
63645746 fix: accuracy issues when computing time spent on each rule.
754170d7 tests: add test case that covers all the `wsock32_ord_to_name` function.
ccb06e4e feat: expose ignore_invalid_rules in python API. (#711)

Generated automatically by the Sync Upstream workflow.

wxsBSD and others added 8 commits July 16, 2026 08:56
This commit exposes the new feature of ignoring invalid rules during
compilation. It is set to False by default but if turned on than errors are not
raised on compilation failure and any ignored rules will be returned when
calling the `Compiler::ignored_rules()` method. It returns a list of IgnoredRule
objects which have two properties: name and reason.

This makes it easier for users of this API to figure out why a rule was ignored.
Now they can check the `reason` property on `IgnoredRule` to see if it is any of
the IgnoredRuleReason values from the exposed enum.
The previous approach iterated over a range of pattern IDs and then performed a hash map lookup for each to retrieve filesize bounds and header constraints. This change modifies the `Rules` API to return the entire `FxHashMap`, enabling the scanner to directly iterate over the `(PatternId, Constraint)` pairs. This avoids redundant hash map lookups and improves performance in `ScanContext::update_rules_matching`.
@willdurand
willdurand marked this pull request as ready for review July 17, 2026 09:05
@willdurand
willdurand merged commit e6646d7 into amo Jul 17, 2026
1 check passed
@willdurand
willdurand deleted the sync/upstream-82adf904 branch July 17, 2026 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants