diff --git a/utils/common/src/test/kotlin/EnvironmentVariableFilterTest.kt b/utils/common/src/test/kotlin/EnvironmentVariableFilterTest.kt index 4d0a3e0dc566b..19b91a6207e97 100644 --- a/utils/common/src/test/kotlin/EnvironmentVariableFilterTest.kt +++ b/utils/common/src/test/kotlin/EnvironmentVariableFilterTest.kt @@ -80,4 +80,18 @@ class EnvironmentVariableFilterTest : StringSpec({ environment should containExactly(filteredEnvironment) } + + "An empty deny list should not deny anything" { + EnvironmentVariableFilter.reset(denySubstrings = emptyList()) + + EnvironmentVariableFilter.DEFAULT_DENY_SUBSTRINGS.forAll { + EnvironmentVariableFilter.isAllowed(it) shouldBe true + } + + EnvironmentVariableFilter.DEFAULT_ALLOW_NAMES.forAll { + EnvironmentVariableFilter.isAllowed(it) shouldBe true + } + + EnvironmentVariableFilter.isAllowed("PATH") shouldBe true + } })