From d7c1fb9112c616ece53b9fcef1b136ac736bb021 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sun, 27 Mar 2022 20:07:52 +0200 Subject: [PATCH] linting: ignore some "G101: Potential hardcoded credentials" warnings cli/config/credentials/native_store.go:10:2: G101: Potential hardcoded credentials (gosec) remoteCredentialsPrefix = "docker-credential-" ^ cli/command/service/opts.go:917:2: G101: Potential hardcoded credentials (gosec) flagCredentialSpec = "credential-spec" ^ Signed-off-by: Sebastiaan van Stijn --- cli/command/service/opts.go | 2 +- cli/config/credentials/native_store.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/command/service/opts.go b/cli/command/service/opts.go index 020e9dd015..f7d7fcfa87 100644 --- a/cli/command/service/opts.go +++ b/cli/command/service/opts.go @@ -914,7 +914,7 @@ func addServiceFlags(flags *pflag.FlagSet, opts *serviceOptions, defaultFlagValu } const ( - flagCredentialSpec = "credential-spec" + flagCredentialSpec = "credential-spec" //nolint:gosec // ignore G101: Potential hardcoded credentials flagPlacementPref = "placement-pref" flagPlacementPrefAdd = "placement-pref-add" flagPlacementPrefRemove = "placement-pref-rm" diff --git a/cli/config/credentials/native_store.go b/cli/config/credentials/native_store.go index afe542cc3c..f9619b0381 100644 --- a/cli/config/credentials/native_store.go +++ b/cli/config/credentials/native_store.go @@ -7,7 +7,7 @@ import ( ) const ( - remoteCredentialsPrefix = "docker-credential-" + remoteCredentialsPrefix = "docker-credential-" //nolint:gosec // ignore G101: Potential hardcoded credentials tokenUsername = "" )