Sync stale submodule snapshot + fix AVX2 SIGILL crash#66
Merged
Conversation
- Integer-overflow guards on numeric conversions - File/dir permission tightening (0600/0750) - Path-traversal cleaning and error-return handling - Narrow, justified #nosec annotations where risk is not applicable Module now scans clean with gosec (0 issues).
VPBROADCASTB with a general-purpose-register source only has an AVX-512 (EVEX-encoded) form; the AVX2 (VEX-encoded) form requires an XMM or memory source operand. hasANSIavx2 and countBytesAVX2 broadcast directly from a GPR, so despite being gated only on cpu.X86.HasAVX2, they emitted an AVX-512 instruction that crashes with SIGILL on AVX2-only hardware. Stage the byte through an XMM register first to keep both broadcasts in valid AVX2 form.
Same fix as GrayCodeAI/tok commit f45b767: a short captured secret value can coincidentally be a substring of a fixed redaction marker's type label (e.g. captured value "eare" is a substring of the marker text "[REDACTED:Bearer Token]"). Strip [REDACTED:...] markers before counting so only genuinely leaked occurrences count.
Patel230
added a commit
that referenced
this pull request
Jul 11, 2026
* security: harden gosec findings (part of hawk-eco full-repo audit) - Integer-overflow guards on numeric conversions - File/dir permission tightening (0600/0750) - Path-traversal cleaning and error-return handling - Narrow, justified #nosec annotations where risk is not applicable Module now scans clean with gosec (0 issues). * chore: sync VERSION to match standalone * Fix SIGILL crash in AVX2 assembly from illegal EVEX-encoded VPBROADCASTB VPBROADCASTB with a general-purpose-register source only has an AVX-512 (EVEX-encoded) form; the AVX2 (VEX-encoded) form requires an XMM or memory source operand. hasANSIavx2 and countBytesAVX2 broadcast directly from a GPR, so despite being gated only on cpu.X86.HasAVX2, they emitted an AVX-512 instruction that crashes with SIGILL on AVX2-only hardware. Stage the byte through an XMM register first to keep both broadcasts in valid AVX2 form. * Fix FuzzRedactSecrets false positive from marker text self-collision Same fix as GrayCodeAI/tok commit f45b767: a short captured secret value can coincidentally be a substring of a fixed redaction marker's type label (e.g. captured value "eare" is a substring of the marker text "[REDACTED:Bearer Token]"). Strip [REDACTED:...] markers before counting so only genuinely leaked occurrences count.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This branch carries commits that were sitting locally on this nested submodule checkout (used inside the hawk monorepo's `external/tok`) but never pushed to any remote ref, plus one new fix discovered while triaging CI failures:
Pushing this unblocks hawk's CI `build-and-push` job, which fetches this submodule by exact commit SHA during `git submodule update`.