From 8a633da31430a8fb8136572e2497e16454927974 Mon Sep 17 00:00:00 2001 From: Julio Guerra Date: Mon, 17 Jan 2022 23:11:08 +0100 Subject: [PATCH] internal/appsec/config.go: fix --- internal/appsec/appsec_disabled.go | 3 +++ internal/appsec/config_test.go | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/appsec/appsec_disabled.go b/internal/appsec/appsec_disabled.go index 1a408b6121..12039e0359 100644 --- a/internal/appsec/appsec_disabled.go +++ b/internal/appsec/appsec_disabled.go @@ -33,3 +33,6 @@ func Start() { // Stop AppSec. func Stop() {} + +// Static rule stubs when disabled. +const staticRecommendedRule = "" diff --git a/internal/appsec/config_test.go b/internal/appsec/config_test.go index 1e6641eea2..e04fb4960d 100644 --- a/internal/appsec/config_test.go +++ b/internal/appsec/config_test.go @@ -9,6 +9,7 @@ package appsec import ( + "io/ioutil" "os" "testing" "time" @@ -97,7 +98,7 @@ func TestConfig(t *testing.T) { t.Run("local-file", func(t *testing.T) { restoreEnv := cleanEnv() defer restoreEnv() - file, err := os.CreateTemp("", "example-*") + file, err := ioutil.TempFile("", "example-*") require.NoError(t, err) defer func() { file.Close()