Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

native-fips

БесплатноБез исполняемых скриптовНе проверен

Configure Go projects to use Go's native FIPS 140 module instead of openssl-based FIPS. Use when the user wants to enable FIPS compliance in a Go project…

openshift-engот openshift-eng★ 123 звезды на GitHub

Об этом скилле

Native FIPS

Configure a Go project to use Go's native FIPS 140 module (GOFIPS140). With CGO_ENABLED=0, this produces static binaries that no longer depend on the openssl RPM. Projects that require cgo should keep CGO_ENABLED=1 and adjust their FIPS setup accordingly. Works for both new projects and migrating existing openssl-based FIPS setups.

Reference

Build-time: GOFIPS140

Tells the Go compiler which FIPS 140 crypto module to embed into the binary.

Value Status ML-KEM ML-DSA Notes
v1.0.0 Validation completed Yes No Validated, stable
v1.26.0 Module In Process (MIP) Yes Yes Adds ML-DSA + better entropy
latest Alias — — Resolves to newest available module
certified Alias — — Resolves to newest FIPS-certified module

Use certified in go build as it automatically resolves to the latest certified module (currently v1.0.0). Both modules support ML-KEM (post-quantum key encapsulation), so post-quantum key exchange is available without the old DEFAULT:PQ crypto-policies stage.

Build-time: GOEXPERIMENT=strictfipsruntime (downstream only)

The downstream golang-fips/go toolchain (used in RHEL/CentOS Go Toolset) provides GOEXPERIMENT=strictfipsruntime, which adds a startup check that panics if the binary's FIPS configuration is incompatible with the host environment. This is separate from GOFIPS140 — it provides fail-closed startup enforcement, not module selection.

When migrating a downstream build from the OpenSSL backend to native FIPS on 1.26+ builders, retain GOEXPERIMENT=strictfipsruntime and add -tags no_openssl to disable the OpenSSL backend. The 1.26+ builders imply GODEBUG=fips140=auto whenever the FIPS module is compiled in, so the binary works on both FIPS and non-FIPS hosts:

CGO_ENABLED=0 GOFIPS140=v1.26.0 GOEXPERIMENT=strictfipsruntime go build -tags no_openssl ...

For upstream Go (which has no strictfipsruntime or OpenSSL backend):

CGO_ENABLED=0 GOFIPS140=certified go build ...

Runtime: GODEBUG=fips140=<value>

Controls FIPS activation at runtime. You almost never need to set this explicitly. When a binary is built with GOFIPS140, the toolchain sets an appropriate default: upstream Go defaults to fips140=on, and the downstream golang-fips/go toolchain defaults (or will soon default) to fips140=auto. Only override this if you need behavior different from the toolchain default.

Value Behavior Availability
fips140=auto Follow the host's FIPS setting (/proc/sys/crypto/fips_enabled) Downstream golang-fips/go only
fips140=on Always enable FIPS, regardless of host Upstream Go and downstream
fips140=only Best-effort FIPS-only mode — non-FIPS crypto calls may return an error or panic. May produce false positives/negatives. Test and assessment only — not for production. Upstream Go and downstream

Upstream Go (go.dev) supports off, on, and only. The auto value is provided by the downstream golang-fips/go toolchain.

Post-quantum cryptography (ML-KEM)

Go 1.24+ includes crypto/mlkem (FIPS 203) and crypto/tls uses X25519MLKEM768 by default for TLS connections. This means ML-KEM is built into the binary — no OS-level crypto-policies configuration is needed.

The old approach required a separate crypto-policies setup (via RPM or manual config) to enable DEFAULT:PQ. This configured system C libraries (OpenSSL, GnuTLS, NSS, etc.) by generating per-library config files in /etc/crypto-policies/back-ends/:

Backend file Library
openssl.config / opensslcnf.config OpenSSL
gnutls.config GnuTLS
nss.config NSS (Mozilla)
openssh.config / opensshserver.config OpenSSH
java.config Java/OpenJDK
krb5.config Kerberos
libssh.config libssh

The :PQ subpolicy prepends hybrid ML-KEM groups at highest priority, adding X25519MLKEM768, P256-MLKEM768, P384-MLKEM1024 etc. to each backend in its native syntax.

Why this is unnecessary for Go binaries: A statically-compiled Go binary (CGO_ENABLED=0) with GOFIPS140 uses its own crypto/tls stack — it does not link against OpenSSL, GnuTLS, or NSS. OS-level crypto-policies back-end configs have zero effect on Go binaries. Such binaries have no runtime library dependencies, so they can run in minimal scratch-like images such as Hardened Images - Static.

Verification with tls-scanner

The tls-scanner tool can verify endpoint TLS compliance on a running cluster — it connects to pod endpoints and checks their TLS configuration (protocol versions, cipher suites, and with PQC_CHECK=true, TLS 1.3 and ML-KEM

Полный SKILL.md на GitHub

Установить native-fips в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл native-fips?

Configure Go projects to use Go's native FIPS 140 module instead of openssl-based FIPS. Use when the user wants to enable FIPS compliance in a Go project, migrate from openssl-based FIPS to native Go FIPS, or when build configs contain GOEXPERIMENT=strictfipsruntime or openssl-based FIPS patterns. Triggers on: 'native FIPS', 'GOFIPS140', 'FIPS without openssl', 'enable FIPS', 'migrate FIPS', 'GOEXPERIMENT=strictfipsruntime', 'strictfipsruntime', 'fips140', 'Go FIPS module'.

Как установить скилл native-fips?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл native-fips запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить native-fips с