Bum fips agent and fix fips check (#717)

This commit is contained in:
Itxaka
2024-02-28 09:48:17 +01:00
committed by GitHub
parent e6a4a2288f
commit aae7cb74f5
2 changed files with 4 additions and 6 deletions

View File

@@ -15,15 +15,13 @@ prelude:
- PACKAGE_VERSION=${PACKAGE_VERSION%\+*} && cd /go/src/github.com/${GITHUB_ORG}/ && git clone --branch v${PACKAGE_VERSION} https://github.com/${GITHUB_ORG}/{{ .Values.name }}.git - PACKAGE_VERSION=${PACKAGE_VERSION%\+*} && cd /go/src/github.com/${GITHUB_ORG}/ && git clone --branch v${PACKAGE_VERSION} https://github.com/${GITHUB_ORG}/{{ .Values.name }}.git
env: env:
- GITHUB_ORG={{ ( index .Values.labels "github.owner" ) }} - GITHUB_ORG={{ ( index .Values.labels "github.owner" ) }}
- HUGO_VERSION=0.110.0 - HUGO_VERSION=0.113.0
- LDFLAGS="-s -w -X github.com/kairos-io/kairos-agent/v2/internal/common.VERSION=v${PACKAGE_VERSION} {{with .Values.ldflags}}{{.}}{{end}}"
{{if or (eq .Values.category "fips") (eq .Values.category "fips-static")}} {{if or (eq .Values.category "fips") (eq .Values.category "fips-static")}}
- CGO_ENABLED=1 - CGO_ENABLED=1
- GOEXPERIMENT=boringcrypto - GOEXPERIMENT=boringcrypto
# Because we don't track the compiled-with version on the agent we need to keep the symbols in order to checks FIPS compliance
- LDFLAGS="-w -X github.com/kairos-io/kairos-agent/v2/internal/common.VERSION=v${PACKAGE_VERSION} {{with .Values.ldflags}}{{.}}{{end}}"
{{else}} {{else}}
- CGO_ENABLED=0 - CGO_ENABLED=0
- LDFLAGS="-s -w -X github.com/kairos-io/kairos-agent/v2/internal/common.VERSION=v${PACKAGE_VERSION} {{with .Values.ldflags}}{{.}}{{end}}"
{{end}} {{end}}
steps: steps:
- | - |
@@ -35,7 +33,7 @@ steps:
{{if or (eq .Values.category "fips") (eq .Values.category "fips-static")}} {{if or (eq .Values.category "fips") (eq .Values.category "fips-static")}}
{{ if .Values.arch }} {{ if .Values.arch }}
{{ if eq .Values.arch "amd64" }} {{ if eq .Values.arch "amd64" }}
- go tool nm /usr/bin/{{.Values.name}} | grep -i "FIPS_mode" - /usr/bin/{{.Values.name}} version --long | grep -i "boringcrypto"
{{end}} {{end}}
{{end}} {{end}}
{{end}} {{end}}

View File

@@ -12,7 +12,7 @@ packages:
description: "Lifecycle agent for kairos" description: "Lifecycle agent for kairos"
- name: "kairos-agent" - name: "kairos-agent"
category: "fips" category: "fips"
version: "2.7.13" version: "2.7.14"
labels: labels:
github.repo: "kairos-agent" github.repo: "kairos-agent"
autobump.revdeps: "true" autobump.revdeps: "true"