Files
Nayana BidariandgVisor bot 1c38b6cbed Add levels for handling spec validation via flag.
Replaces the flag "unsafe-skip-restore-spec-validation" with
"restore-spec-validation" which allows the user to set the level of restore
spec validation such as ignore, warning or enforce. This allows user to skip
validation if required. By default, the flag will be set to "enforce" which
will perform spec validation.

This is a breaking change for users who have enabled
--unsafe-skip-restore-spec-validation flag. We advise these users to use the
new flag introduced in this change: --restore-spec-validation and set it to
"warning" or "ignore". This setting (--restore-spec-validation=warning) gives
the same behavior as when the old flag was enabled.

PiperOrigin-RevId: 719045616
2025-01-23 16:00:25 -08:00

46 lines
1.2 KiB
Python

load("//tools:defs.bzl", "go_library", "go_test")
package(
default_applicable_licenses = ["//:license"],
licenses = ["notice"],
)
go_library(
name = "specutils",
srcs = [
"cri.go",
"fs.go",
"namespace.go",
"nvidia.go",
"restore.go",
"specutils.go",
],
visibility = ["//:sandbox"],
deps = [
"//pkg/abi/linux",
"//pkg/bits",
"//pkg/log",
"//pkg/sentry/devices/nvproxy/nvconf",
"//pkg/sentry/kernel/auth",
"//runsc/config",
"//runsc/flag",
"@com_github_cenkalti_backoff//:go_default_library",
"@com_github_mohae_deepcopy//:go_default_library",
"@com_github_opencontainers_runtime_spec//specs-go:go_default_library",
"@com_github_syndtr_gocapability//capability:go_default_library",
"@org_golang_x_sys//unix:go_default_library",
],
)
go_test(
name = "specutils_test",
size = "small",
srcs = ["specutils_test.go"],
library = ":specutils",
deps = [
"//pkg/sentry/devices/nvproxy/nvconf",
"//runsc/config",
"@com_github_opencontainers_runtime_spec//specs-go:go_default_library",
],
)