Перейти к содержимому

CI/CD для Go: GitHub Actions, GitLab CI, GoReleaser, supply chain security

Зачем знать: В 2026 году CI/CD — это не “автоматизация тестов”, это polyлица: тесты, lint, security scan, release, SBOM, sign artifacts, deploy. Middle 2 Go-разработчик должен уметь построить полный pipeline с нуля: от PR до signed release в GitHub. Без знания GoReleaser, govulncheck, golangci-lint config, cosign — ты не сможешь поддерживать standard production-ready проекта. Особенно важно в РФ контексте — GitLab часто preferred, и понимание различий критично.

  1. Концепция: CI/CD pipeline для Go
  2. Production-практики: GoReleaser, scanners, cache
  3. Gotchas: cache invalidation, race в parallel tests, secrets leak
  4. Real cases: HashiCorp, Charm CLI, Авито
  5. Вопросы для собеседования
  6. Practice
  7. Источники

[Push / PR] → [Lint] → [Test] → [Build] → [Security Scan] → [Image Build] → [Sign] → [Deploy]
↓ ↓ ↓ ↓ ↓ ↓
golangci go test go build govulncheck buildkit cosign
coverage gosec, trivy distroless sigstore

Принципы:

  • Fast feedback — линт и unit-тесты первыми (минуты, не часы).
  • Fail fast — early stages важнее.
  • Parallel — что можно — параллельно.
  • Reproducible builds — byte-identical artifacts.
  • Caching — Go modules, build cache.

workflow file.github/workflows/ci.yml:

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22'
cache: true
- uses: golangci/golangci-lint-action@v6
with:
version: v1.59
args: --timeout=5m
test:
runs-on: ubuntu-latest
strategy:
matrix:
go: ['1.22', '1.23']
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
cache: true
- name: Run tests
run: go test -race -coverprofile=coverage.out -covermode=atomic ./...
- name: Upload coverage
uses: codecov/codecov-action@v4
with:
files: coverage.out
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: govulncheck
run: |
go install golang.org/x/vuln/cmd/govulncheck@latest
govulncheck ./...
- name: gosec
uses: securego/gosec@master
with:
args: ./...
build:
needs: [lint, test, security]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # for goreleaser
- uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Build
run: |
go build -trimpath \
-ldflags="-s -w -X main.Version=${GITHUB_REF_NAME}" \
-o /tmp/app ./cmd/server

Matrix запускает job на нескольких комбинациях:

  • Go versions: 1.22, 1.23 (current и previous).
  • OS: ubuntu-latest, macos-latest, windows-latest.
  • Architectures: amd64, arm64.

Это catches issues, специфичные для платформы (cgo, file paths, syscalls).

actions/setup-go@v5 с cache: true автоматически кэширует:

  • ~/go/pkg/mod (module cache).
  • ~/.cache/go-build (build cache).

Cache key: hash от go.sum + Go version + OS.

Custom cache:

- uses: actions/cache@v4
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-

GitLab CI — .gitlab-ci.yml. Популярно в РФ.

stages:
- lint
- test
- build
- security
- release
variables:
GO_VERSION: "1.22"
.go-base:
image: golang:${GO_VERSION}-alpine
before_script:
- apk add --no-cache git make
cache:
key:
files: [go.sum]
paths:
- .go/pkg/mod
- .go/cache
variables:
GOPATH: $CI_PROJECT_DIR/.go
GOCACHE: $CI_PROJECT_DIR/.go/cache
lint:
extends: .go-base
stage: lint
script:
- go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
- $GOPATH/bin/golangci-lint run --timeout=5m
test:
extends: .go-base
stage: test
script:
- go test -race -coverprofile=coverage.out ./...
- go tool cover -func=coverage.out
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: coverage.xml
coverage: '/total:\s+\(statements\)\s+(\d+.\d+%)/'
build:
extends: .go-base
stage: build
script:
- CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o app ./cmd/server
artifacts:
paths: [app]
govulncheck:
extends: .go-base
stage: security
script:
- go install golang.org/x/vuln/cmd/govulncheck@latest
- $GOPATH/bin/govulncheck ./...
trivy:
stage: security
image: aquasec/trivy:latest
script:
- trivy fs --severity HIGH,CRITICAL .

В GitLab CI часто:

build-image:
stage: build
image: docker:24
services:
- docker:24-dind
variables:
DOCKER_HOST: tcp://docker:2375
DOCKER_TLS_CERTDIR: ""
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
- docker build -t $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA .
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA

Альтернатива DinD — Kaniko или BuildKit в k8s.

Go module cache ($GOPATH/pkg/mod): downloaded modules. Stable между builds.

Go build cache ($GOCACHE): compiled artifacts. Sensitive к версиям компилятора.

Docker layer caching: каждый RUN — слой. Если не изменился — reused.

FROM golang:1.22-alpine AS build
WORKDIR /src
# Layer 1: dependencies (cached if go.mod/go.sum не изменились)
COPY go.mod go.sum ./
RUN go mod download
# Layer 2: source (rebuilds при изменении кода)
COPY . .
RUN go build -o /out/app ./cmd/server

BuildKit cache mounts (Docker BuildKit, 2019+):

1.4
FROM golang:1.22-alpine AS build
WORKDIR /src
COPY go.mod go.sum ./
RUN --mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
go mod download
COPY . .
RUN --mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
go build -o /out/app ./cmd/server

Это значительно ускоряет CI (50-80% reduction в build time).

В Go:

  • t.Parallel() — runs test параллельно в рамках package.
  • go test -p N — N packages параллельно.
  • go test -parallel N — N tests параллельно в package.
func TestParallel(t *testing.T) {
t.Parallel()
// ...
}

В CI: использовать matrix или job parallelization для разделения test packages между runners.

golangci-lint — meta-linter, обёртка над 50+ линтерами.

.golangci.yml
run:
timeout: 5m
go: '1.22'
linters:
enable:
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- unused
- gofmt
- goimports
- gosec
- revive
- gocyclo
- dupl
- misspell
- prealloc
- bodyclose
- rowserrcheck
- sqlclosecheck
- errorlint
- exhaustive
- nilerr
- unparam
linters-settings:
gocyclo:
min-complexity: 15
revive:
severity: warning
rules:
- name: var-naming
- name: error-naming
- name: exported
issues:
exclude-rules:
- path: _test\.go
linters: [gocyclo, errcheck, dupl, gosec]

gosec — static security analysis:

  • Detects unsafe code patterns (SQL injection, weak crypto).
  • ~30 правил.

govulncheck (Go 1.18+, official):

  • Анализирует ваши imports vs Go vulnerability database.
  • Указывает только vulnerabilities, которые реально вызываются.
  • Гораздо точнее, чем generic dependency scanner.
Окно терминала
go install golang.org/x/vuln/cmd/govulncheck@latest
govulncheck ./...
# Output:
# Vulnerability #1: GO-2024-1234
# Description: ...
# Module: github.com/foo/bar
# Found in: github.com/foo/bar@v1.0.0
# Fixed in: github.com/foo/bar@v1.0.1
# Example traces:
# foo.go:42 calls bar.Vulnerable

trivy — container image scanner:

  • Scans Docker images, filesystem, git repos.
  • Detects vulnerable packages, secrets, misconfigurations.

snyk — commercial. Web UI, integrations.

GoReleaser — releaser для Go проектов. Делает:

  • Multi-platform builds (Linux, macOS, Windows; amd64, arm64).
  • Docker images (multi-arch via buildx).
  • Homebrew formula.
  • Scoop / Chocolatey.
  • GitHub Releases / GitLab Releases.
  • Sign artifacts (cosign).
  • SBOM generation (syft).
  • Changelog generation.

Config.goreleaser.yml:

version: 2
before:
hooks:
- go mod tidy
builds:
- id: app
main: ./cmd/server
binary: app
env:
- CGO_ENABLED=0
flags:
- -trimpath
ldflags:
- -s -w
- -X main.Version={{.Version}}
- -X main.Commit={{.Commit}}
- -X main.Date={{.Date}}
goos: [linux, darwin, windows]
goarch: [amd64, arm64]
ignore:
- goos: windows
goarch: arm64
archives:
- id: default
format: tar.gz
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
format_overrides:
- goos: windows
format: zip
dockers:
- image_templates:
- "ghcr.io/myorg/app:{{ .Version }}-amd64"
dockerfile: Dockerfile
use: buildx
build_flag_templates:
- "--platform=linux/amd64"
docker_manifests:
- name_template: "ghcr.io/myorg/app:{{ .Version }}"
image_templates:
- "ghcr.io/myorg/app:{{ .Version }}-amd64"
- "ghcr.io/myorg/app:{{ .Version }}-arm64"
brews:
- name: app
repository:
owner: myorg
name: homebrew-tap
homepage: https://example.com
description: My CLI
signs:
- cmd: cosign
args:
- "sign-blob"
- "--output-signature=${signature}"
- "${artifact}"
- "--yes"
artifacts: all
output: true
sboms:
- artifacts: archive
changelog:
sort: asc
use: github
groups:
- title: Features
regexp: '^.*?feat(\(.+\))??!?:.+$'
- title: 'Bug fixes'
regexp: '^.*?fix(\(.+\))??!?:.+$'

Usage:

Окно терминала
# Test build
goreleaser release --snapshot --clean
# Real release (нужен git tag)
git tag v1.0.0
git push origin v1.0.0
goreleaser release --clean

SBOM — список всех компонентов и их versions в release artifact.

Стандарты:

  • SPDX (Linux Foundation).
  • CycloneDX (OWASP).

Tools:

  • syft (Anchore) — генерирует SBOM из Docker images или filesystem.
  • trivy также может.
Окно терминала
syft packages registry:ghcr.io/myorg/app:v1.0.0 -o spdx-json > sbom.json

Зачем:

  • Compliance (executive order USA 2021).
  • Vulnerability scanning против SBOM.
  • Supply chain transparency.

cosign (sigstore project) — sign Docker images, blobs.

Keyless signing (через OIDC token из CI):

Окно терминала
cosign sign --yes ghcr.io/myorg/app:v1.0.0

Подпись хранится в OCI registry (как новый tag).

Verify:

Окно терминала
cosign verify ghcr.io/myorg/app:v1.0.0 \
--certificate-identity-regexp "https://github.com/myorg/app/.github/workflows/release.yml@.*" \
--certificate-oidc-issuer "https://token.actions.githubusercontent.com"

Reproducible build — same source → byte-identical binary.

Why: trust, transparency, supply chain.

Go flags:

Окно терминала
go build \
-trimpath \
-ldflags="-s -w -buildid=" \
-mod=readonly
  • -trimpath — strips local paths (/Users/abylay/... → trimmed).
  • -buildid= — removes build ID (random).
  • -s -w — strip debug and symbol tables.
  • SOURCE_DATE_EPOCH env var — fixed timestamp.

После release artifact deploys:

  • GitOps (ArgoCD) — push image tag в Git, ArgoCD sync.
  • Helmhelm upgrade с new image tag.
  • Direct kubectlkubectl set image deployment/app app=ghcr.io/myorg/app:v1.0.0.

Canary / Blue-Green — через Flagger, Argo Rollouts.


GitHub Flow (simple):

  • main всегда deployable.
  • Feature branches → PR → main.
  • Tag для release.

GitFlow (complex):

  • main + develop + feature + release + hotfix.
  • Для projects с долгими release cycles.

В 2026 для cloud-native — GitHub Flow дефолт.

v<MAJOR>.<MINOR>.<PATCH>:

  • MAJOR — breaking changes.
  • MINOR — new features (backward-compatible).
  • PATCH — bug fixes.

Pre-release: v1.0.0-beta.1, v1.0.0-rc.2.

В Go modules — обязателен v префикс.

<type>(<scope>): <subject>
<body>
<footer>

Types: feat, fix, docs, style, refactor, perf, test, chore.

Пример:

feat(auth): add OAuth2 support
Implement OAuth2 Authorization Code flow with PKCE.
BREAKING CHANGE: removes deprecated /login endpoint

Используется для auto-changelog (GoReleaser, release-please).

Coverage threshold — но не самоцель.

- name: Check coverage
run: |
go test -coverprofile=coverage.out ./...
coverage=$(go tool cover -func=coverage.out | grep total | awk '{print $3}' | sed 's/%//')
if (( $(echo "$coverage < 80" | bc -l) )); then
echo "Coverage $coverage% below 80%"
exit 1
fi

Codecov или Coveralls — для visualisation в PR.

.pre-commit-config.yaml
repos:
- repo: https://github.com/golangci/golangci-lint
rev: v1.59
hooks:
- id: golangci-lint
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml

Запускается локально перед commit, ловит ошибки раньше CI.

Dependabot (GitHub) — автоматические PRs для dependency updates. Renovate (Mend) — более configurable, поддерживает GitLab.

.github/dependabot.yml
version: 2
updates:
- package-ecosystem: gomod
directory: /
schedule:
interval: weekly
groups:
otel:
patterns: ["go.opentelemetry.io/*"]
1.4
FROM golang:1.22-alpine AS deps
WORKDIR /src
COPY go.mod go.sum ./
RUN --mount=type=cache,target=/go/pkg/mod \
go mod download
FROM deps AS build
COPY . .
RUN --mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
CGO_ENABLED=0 GOOS=linux \
go build -trimpath -ldflags="-s -w" -o /out/app ./cmd/server
FROM gcr.io/distroless/static-debian12:nonroot
COPY --from=build /out/app /app
USER nonroot:nonroot
EXPOSE 8080
ENTRYPOINT ["/app"]

Размер: 10-15 MB total.

# GitHub Actions
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/myorg/app:${{ github.sha }}

Без long-lived secrets:

permissions:
id-token: write
contents: read
steps:
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::123456789012:role/github-actions
aws-region: us-east-1
- name: Deploy
run: aws ecs update-service ...

GitHub выдает OIDC token, AWS IAM verifies через trust relationship.

  • GitHub Secrets — encrypted, scoped per environment.
  • GitLab CI Variables — Protected (только на protected branches), Masked (не показывается в logs).
  • HashiCorp Vault — централизованный.

НЕ commit’ить secrets в YAML! Pre-commit hook + scanner (gitleaks, trufflehog).


3.1 ⚠️ Cache невалидируется при изменении Go version

Заголовок раздела «3.1 ⚠️ Cache невалидируется при изменении Go version»

Cache key должен включать Go version, иначе после Go upgrade build будет ошибочный.

var counter int
func TestA(t *testing.T) {
t.Parallel()
counter++ // RACE с TestB!
}
func TestB(t *testing.T) {
t.Parallel()
counter++
}

Tests с shared state не parallel-safe. Используй -race ALWAYS.

echo $SECRET в CI script → secret в log. GitHub mask’ит автоматически, но не всегда. Не PRINT’и secrets.

PR от forked repo не имеет write access к cache. Но если в config ошибка — могут override cache. Используй pull_request event, не pull_request_target (если нужны secrets).

CI: amd64 Linux 5.15
Production: arm64 Linux 5.4

→ binary не запустится, или syscalls differ. Используй multi-arch build + match environment.

func TestX(t *testing.T) {
go background() // goroutine не остановлена
}

В race detector это flag’нется. Используй t.Cleanup или ctx.

govulncheck показывает только vulnerabilities, которые реально вызываются в коде. Если показывает — это серьёзно. Generic scanners типа Snyk показывают всё подряд → много шума.

Окно терминала
go build -ldflags="-X main.Version=$VERSION"

Если $VERSION содержит spaces / quotes — injection. Sanitize.

PR check should run go mod tidy and git diff --exit-code go.mod go.sum. Иначе кто-то забывает tidy → broken builds для others.

goreleaser: error: --skip git-validation is required when running on dirty branch

В CI обычно clean — но go mod tidy после checkout может изменить tree.

trivy показывает CVE для пакетов в image. Часто это базовая OS packages, которые не используются. Use --ignore-unfixed, --severity HIGH,CRITICAL.

Если COPY копирует много файлов, и один меняется — весь layer rebuild. Структурируй COPY от least-changing к most-changing.

Long integration tests делать в отдельной job, не блокировать PR на каждое изменение. Запускать nightly или conditional.

GoReleaser плохо работает с monorepo. Альтернатива: ko (Google) или custom solution.


HashiCorp releases:

  • GitHub Actions + GoReleaser.
  • Signed binaries для все OS/arch.
  • GPG sign + cosign.
  • SBOM для compliance.
  • Public release notes generated.

Charm (gum, glow, bubble) — образцовое использование GoReleaser:

  • Homebrew, Scoop, Linux packages.
  • Multi-platform.
  • Auto-changelog.

gh CLI:

  • Builds on every push.
  • Releases через GoReleaser.
  • Distribute через apt, brew, scoop, winget.

Авито (РФ):

  • GitLab CI dominant.
  • Docker registry on-prem.
  • Vault для secrets.
  • ArgoCD для deployments.

Внутренние CI/CD:

  • GitLab CI.
  • Свой security scanner.
  • Mandatory SBOM для compliance.

Cloudflare использует:

  • BuildKit с remote cache (для огромного monorepo).
  • Bazel для некоторых services.
  • Custom security scanners.

В 2020 атака через CI/CD pipeline:

  • Hackers injected код в build process.
  • Подписанные binaries содержали backdoor.
  • 18,000 customers affected.

После — индустрия серьёзно занялась supply chain security: SBOM, sigstore, SLSA framework.

SLSA (Supply-chain Levels for Software Artifacts) — стандарт от Google для build security:

  • Level 1: documented build process.
  • Level 2: hosted build + version control.
  • Level 3: source/build provenance, ephemeral environment.
  • Level 4: hermetic builds, two-person review.

GoReleaser в 2024+ supports SLSA Level 3.


Q1: Какие стадии в типичном CI/CD pipeline для Go? A: Lint → Test → Build → Security Scan → Image Build → Sign → Deploy. Fast feedback (lint, unit tests первыми), параллельность где можно, security shift-left.

Q2: Что такое golangci-lint? A: Meta-linter Go, обёртка над 50+ линтерами (errcheck, staticcheck, gosec, gocyclo, и др.). Конфигурируется через .golangci.yml. Стандарт для Go проектов.

Q3: Что такое govulncheck и чем отличается от Snyk? A: Official Go tool, scan’ит ваши imports vs Go vulnerability database. Показывает только vulnerabilities, которые реально вызываются в коде. Snyk — generic, показывает всё подряд (много false positives).

Q4: Что такое GoReleaser? A: Releaser для Go проектов. Multi-platform builds, Docker images (multi-arch), GitHub Releases, Homebrew formula, SBOM, signing с cosign. Стандарт для Go OSS-проектов.

Q5: Что такое BuildKit cache mounts? A: Docker BuildKit feature: RUN --mount=type=cache,target=/go/pkg/mod go mod download. Кэширует mod/build directories между builds. Может ускорить CI в 2-3 раза.

Q6: GitHub Actions vs GitLab CI? A: Похожи функционально. GitHub Actions: marketplace actions, OIDC для cloud. GitLab CI: integrated в GitLab, лучше для on-prem, Docker-in-docker нативно. В РФ часто GitLab из-за on-prem.

Q7: Что такое SBOM? A: Software Bill of Materials — список всех компонентов в release artifact. Стандарты: SPDX, CycloneDX. Tools: syft, trivy. Нужен для compliance, vulnerability scanning, supply chain transparency.

Q8: Что такое cosign? A: Sigstore tool для signing Docker images и других artifacts. Keyless signing через OIDC (no key management). Подпись хранится в OCI registry.

Q9: Что такое reproducible build? A: Same source code + same tools → byte-identical binary. Достигается через -trimpath, -buildid=, SOURCE_DATE_EPOCH. Нужно для trust и supply chain transparency.

Q10: Какие флаги используешь для production Go build? A: -trimpath (strip paths), -ldflags="-s -w" (strip debug), -ldflags="-X main.Version=..." (inject version), CGO_ENABLED=0 (static binary), -mod=readonly (no go.mod changes).

Q11: Что такое OIDC в CI и зачем? A: OpenID Connect tokens для cloud auth без long-lived secrets. GitHub Actions выдаёт OIDC token, AWS/GCP/Azure trust его через IAM. Безопаснее AWS keys в secrets.

Q12: Что такое supply chain attack? A: Атака через зависимости, build process, или distribution channel. Примеры: SolarWinds (2020), event-stream npm package. Защита: SBOM, sign, sigstore, SLSA framework.

Q13: SLSA framework — что это? A: Supply-chain Levels for Software Artifacts от Google. 4 уровня security: от documented build (1) до hermetic build с two-person review (4). Стандарт для измерения supply chain maturity.

Q14: Что такое Dependabot? A: GitHub bot для автоматических PRs на dependency updates. Поддерживает 30+ ecosystems (Go modules, npm, pip). Можно группировать по pattern (например, все otel вместе).

Q15: Что такое semantic versioning? A: MAJOR.MINOR.PATCH. MAJOR breaking, MINOR new feature, PATCH fix. В Go modules обязателен v префикс (v1.2.3).

Q16: Conventional commits — зачем? A: Стандарт <type>(<scope>): <subject> (feat, fix, docs, etc). Используется для auto-changelog (GoReleaser, release-please) и semantic versioning bump (feat = minor, fix = patch).

Q17: Как обеспечить fast feedback в CI? A: 1) Linters первыми (быстро). 2) Unit tests перед integration. 3) Parallel jobs где можно. 4) Cache (mod, build). 5) Fail fast (stop on first failure). 6) Distributed tests.

Q18: Matrix builds — зачем? A: Тестирование на multiple OS/Go versions/architectures одновременно. Ловит platform-specific bugs (file paths, syscalls). В CI: запускается параллельно.

Q19: Docker layer caching — best practices? A: 1) Copy go.mod/go.sum first, RUN go mod download (cached). 2) Copy source code last. 3) Multi-stage build (final image без build tools). 4) BuildKit cache mounts для mod/build cache.

Q20: Что делать с secrets в CI? A: 1) Use GitHub Secrets / GitLab Variables (encrypted). 2) Mask in logs (::add-mask::). 3) Avoid pull_request_target (security issue). 4) OIDC для cloud auth. 5) Pre-commit hook + scanner (gitleaks). НИКОГДА не commit’ить.


  1. Базовый CI: создай GitHub Actions workflow с lint + test + build для Go проекта. Запусти на PR.

  2. golangci-lint config: создай .golangci.yml с 15+ линтеров. Прогони на проекте, фиксь errors.

  3. govulncheck: интегрируй в CI, найди (или симулируй) vulnerability, посмотри output.

  4. GoReleaser release: настрой .goreleaser.yml для multi-platform release. Push tag, release создан.

  5. Docker multi-arch: build image для amd64 + arm64 через buildx. Test на разных платформах.

  6. SBOM: сгенерируй SBOM через syft для своего release. Загрузи как artifact.

  7. cosign sign: signing release artifact через cosign в CI. Verify подпись локально.

  8. GitLab CI: переписать workflow на GitLab CI (если используешь GitHub). Сравни.


  1. GitHub Actions Go: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go.
  2. GoReleaser: https://goreleaser.com/.
  3. golangci-lint: https://golangci-lint.run/.
  4. govulncheck: https://go.dev/security/vuln/.
  5. sigstore/cosign: https://github.com/sigstore/cosign.
  6. Anchore syft: https://github.com/anchore/syft.
  7. trivy: https://aquasecurity.github.io/trivy/.
  8. SLSA framework: https://slsa.dev/.
  9. Docker BuildKit: https://docs.docker.com/build/buildkit/.
  10. GitLab CI for Go: https://docs.gitlab.com/ee/ci/examples/go-example.html.