From b88f4e26046994a15af9bcc28d3a0a91492908b9 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 28 Jan 2022 12:22:28 +0100 Subject: [PATCH] daemon/logger/awslogs: suppress false positive on hardcoded creds (gosec) daemon/logger/awslogs/cloudwatchlogs.go:42:2: G101: Potential hardcoded credentials (gosec) credentialsEndpointKey = "awslogs-credentials-endpoint" ^ daemon/logger/awslogs/cloudwatchlogs.go:67:2: G101: Potential hardcoded credentials (gosec) credentialsEndpoint = "http://169.254.170.2" ^ Signed-off-by: Sebastiaan van Stijn --- daemon/logger/awslogs/cloudwatchlogs.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/logger/awslogs/cloudwatchlogs.go b/daemon/logger/awslogs/cloudwatchlogs.go index 0ed42e6651..7406046298 100644 --- a/daemon/logger/awslogs/cloudwatchlogs.go +++ b/daemon/logger/awslogs/cloudwatchlogs.go @@ -39,7 +39,7 @@ const ( tagKey = "tag" datetimeFormatKey = "awslogs-datetime-format" multilinePatternKey = "awslogs-multiline-pattern" - credentialsEndpointKey = "awslogs-credentials-endpoint" + credentialsEndpointKey = "awslogs-credentials-endpoint" //nolint:gosec // G101: Potential hardcoded credentials forceFlushIntervalKey = "awslogs-force-flush-interval-seconds" maxBufferedEventsKey = "awslogs-max-buffered-events" logFormatKey = "awslogs-format" @@ -64,7 +64,7 @@ const ( invalidSequenceTokenCode = "InvalidSequenceTokenException" resourceNotFoundCode = "ResourceNotFoundException" - credentialsEndpoint = "http://169.254.170.2" + credentialsEndpoint = "http://169.254.170.2" //nolint:gosec // G101: Potential hardcoded credentials userAgentHeader = "User-Agent"