Skip to content

Sync stale submodule snapshot + fix AVX2 SIGILL crash#66

Merged
Patel230 merged 4 commits into
mainfrom
fix/hawk-external-tok-20260708
Jul 8, 2026
Merged

Sync stale submodule snapshot + fix AVX2 SIGILL crash#66
Patel230 merged 4 commits into
mainfrom
fix/hawk-external-tok-20260708

Conversation

@Patel230

@Patel230 Patel230 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

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:

  • chore: sync VERSION to match standalone
  • security: harden gosec findings (part of hawk-eco full-repo audit)
  • fix: SIGILL crash in AVX2 assembly from illegal EVEX-encoded VPBROADCASTB (same bug and fix as Secrets scanning and CI hardening pass #65 / commit f659d19, applied here because this submodule snapshot predates that fix)

Pushing this unblocks hawk's CI `build-and-push` job, which fetches this submodule by exact commit SHA during `git submodule update`.

Patel230 added 4 commits July 7, 2026 10:17
- 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 Patel230 merged commit 2a1703c into main Jul 8, 2026
20 checks passed
@Patel230 Patel230 deleted the fix/hawk-external-tok-20260708 branch July 8, 2026 17:42
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.
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.

1 participant