containers/podman

seccomp deprecations noticed with golangci-lint 2.6.0

Open

#27.501 geöffnet am 11. Nov. 2025

Auf GitHub ansehen
 (2 Kommentare) (0 Reaktionen) (1 zugewiesene Person)Go (3.107 Forks)batch import
ContribfestGood First Issuebugweektriagedvolunteers-wanted

Repository-Metriken

Stars
 (31.686 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

With the upcoming golangci-lint bump to v2.6.0 in https://github.com/containers/podman/pull/27473 , the lint check fails on seccomp deprecations like so:

+ ./bin/golangci-lint run --build-tags=apparmor,seccomp,selinux
pkg/specgen/generate/kube/seccomp.go:40:30: SA1019: v1.SeccompContainerAnnotationKeyPrefix is deprecated: set a container security context `seccompProfile` field. (staticcheck)
			if prefixAndCtr[0]+"/" != v1.SeccompContainerAnnotationKeyPrefix {
			                          ^
pkg/specgen/generate/kube/seccomp.go:56:33: SA1019: v1.SeccompPodAnnotationKey is deprecated: set a pod security context `seccompProfile` field. (staticcheck)
		podSeccomp, ok := annotations[v1.SeccompPodAnnotationKey]
		                              ^
pkg/specgen/generate/kube/seccomp.go:73:7: SA1019: v1.DeprecatedSeccompProfileDockerDefault is deprecated: set a pod or container security context `seccompProfile` of type "RuntimeDefault" instead. (staticcheck)
	case v1.DeprecatedSeccompProfileDockerDefault:
	     ^
pkg/specgen/generate/kube/seccomp.go:75:7: SA1019: v1.SeccompProfileRuntimeDefault is deprecated: set a pod or container security context `seccompProfile` of type "RuntimeDefault" instead. (staticcheck)
	case v1.SeccompProfileRuntimeDefault:
	     ^

#27473 will proceed with marking those as nolint and a pointer here, so someone more knowledgeable with seccomp could pick this up.

Contributor Guide