Skip to content

[pull] main from VirusTotal:main#237

Merged
pull[bot] merged 5 commits into
threatcode:mainfrom
VirusTotal:main
Jun 8, 2026
Merged

[pull] main from VirusTotal:main#237
pull[bot] merged 5 commits into
threatcode:mainfrom
VirusTotal:main

Conversation

@pull

@pull pull Bot commented Jun 8, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

plusvic and others added 5 commits June 8, 2026 11:24
This change may be overreaching and I understand if it is closed.

Each major Go release is supported until there are two newer major releases. Go 1.24 support ended on February 4th, 2026.
This change introduces a mechanism to detect and leverage "header constraints" derived from YARA rule conditions. These constraints, such as `uint32(0) == 0x464c457f` or `$a at 0`, specify required byte sequences or integer values at fixed offsets from the start of the file.

During scanning, if the initial bytes of the data do not satisfy a pattern's header constraints, that pattern is disabled before any detailed matching attempts. This early pruning reduces redundant work and improves scan performance, particularly for files with well-defined magic bytes or headers that don't match specific rule conditions.

The existing filesize bounds checks are also refactored to use this new pattern disabling mechanism for consistency and clearer logic.
* Addressed testifylint errors
* Replaced deprecated ioutil.TempFile with os.CreateTemp
* Formatted with gofumpt

---------

Co-authored-by: zdiff <zdiff@localhost>
@pull pull Bot locked and limited conversation to collaborators Jun 8, 2026
@pull pull Bot added the ⤵️ pull label Jun 8, 2026
@pull pull Bot merged commit ceb06cd into threatcode:main Jun 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants