ax(ueps): remove banned fmt import, use errors.New
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run

fmt.Errorf with static string replaced by errors.New.
Removes banned import per AX RFC-025.

Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
Claude 2026-04-02 07:48:46 +01:00
parent a3d697b45e
commit 8a4010f4a5
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

@ -7,7 +7,6 @@ import (
"crypto/sha256"
"encoding/binary"
"errors"
"fmt"
"io"
)
@ -129,7 +128,7 @@ func ReadAndVerify(r *bufio.Reader, sharedSecret []byte) (*ParsedPacket, error)
if !hmac.Equal(signature, expectedMAC) {
// Log this. This is a Threat Event.
// "Axiom Violation: Integrity Check Failed"
return nil, fmt.Errorf("integrity violation: HMAC mismatch (ThreatScore +100)")
return nil, errors.New("integrity violation: HMAC mismatch (ThreatScore +100)")
}
return &ParsedPacket{