From c5987a8af00e90083f0e901ac785c62f6f2751ff Mon Sep 17 00:00:00 2001 From: teowa <104055472+teowa@users.noreply.github.com> Date: Wed, 24 Apr 2024 08:32:00 +0000 Subject: [PATCH] fix --- commands/credential_scan.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/commands/credential_scan.go b/commands/credential_scan.go index 8afe79b..8dee80d 100644 --- a/commands/credential_scan.go +++ b/commands/credential_scan.go @@ -314,7 +314,7 @@ func (c CredentialScanCommand) Execute() int { if !ok { credScanErr := makeCredScanError( azapiResource, - fmt.Sprintf("variable %q was not found", varName), + fmt.Sprintf("variable %q was not found, please follow https://github.com/Azure/armstrong/blob/main/docs/guidance-for-api-test.md#4-q-i-have-some-sensitive-information-in-the-test-case-how-to-hide-it to set the variable for secret values", varName), k, ) credScanErrors = append(credScanErrors, credScanErr) @@ -326,7 +326,7 @@ func (c CredentialScanCommand) Execute() int { if theVar.HasDefault { credScanErr := makeCredScanError( azapiResource, - fmt.Sprintf("variable %q (%v:%v) used in secret field but has a default value, please remove the default value", varName, theVar.FileName, theVar.LineNumber), + fmt.Sprintf("variable %q (%v:%v) used in secret field but has a default value, please follow https://github.com/Azure/armstrong/blob/main/docs/guidance-for-api-test.md#4-q-i-have-some-sensitive-information-in-the-test-case-how-to-hide-it to set the variable for secret values", varName, theVar.FileName, theVar.LineNumber), k, ) credScanErrors = append(credScanErrors, credScanErr) @@ -336,7 +336,7 @@ func (c CredentialScanCommand) Execute() int { if !theVar.IsSensitive { credScanErr := makeCredScanError( azapiResource, - fmt.Sprintf("variable %q (%v:%v) used in secret field but is not marked as sensitive, please add \"sensitive=true\" for the variable", varName, theVar.FileName, theVar.LineNumber), + fmt.Sprintf("variable %q (%v:%v) used in secret field but is not marked as sensitive, please follow https://github.com/Azure/armstrong/blob/main/docs/guidance-for-api-test.md#4-q-i-have-some-sensitive-information-in-the-test-case-how-to-hide-it to set the variable for secret values", varName, theVar.FileName, theVar.LineNumber), k, ) credScanErrors = append(credScanErrors, credScanErr) @@ -461,7 +461,7 @@ func checkAzureProviderSecret(azureProvider hcl.AzureProvider, propertyName, pro if !ok { credScanErr := makeCredScanErrorForProvider( azureProvider, - fmt.Sprintf("variable %q was not found", varName), + fmt.Sprintf("variable %q was not found, please follow https://github.com/Azure/armstrong/blob/main/docs/guidance-for-api-test.md#4-q-i-have-some-sensitive-information-in-the-test-case-how-to-hide-it to set the variable for secret values", varName), propertyName, ) credScanErrors = append(credScanErrors, credScanErr) @@ -473,7 +473,7 @@ func checkAzureProviderSecret(azureProvider hcl.AzureProvider, propertyName, pro if theVar.HasDefault { credScanErr := makeCredScanErrorForProvider( azureProvider, - fmt.Sprintf("variable %q (%v:%v) used in secret field but has a default value, please remove the default value", varName, theVar.FileName, theVar.LineNumber), + fmt.Sprintf("variable %q (%v:%v) used in secret field but has a default value, please follow https://github.com/Azure/armstrong/blob/main/docs/guidance-for-api-test.md#4-q-i-have-some-sensitive-information-in-the-test-case-how-to-hide-it to set the variable for secret values", varName, theVar.FileName, theVar.LineNumber), propertyName, ) credScanErrors = append(credScanErrors, credScanErr) @@ -483,7 +483,7 @@ func checkAzureProviderSecret(azureProvider hcl.AzureProvider, propertyName, pro if !theVar.IsSensitive { credScanErr := makeCredScanErrorForProvider( azureProvider, - fmt.Sprintf("variable %q (%v:%v) used in secret field but is not marked as sensitive, please add \"sensitive=true\" for the variable", varName, theVar.FileName, theVar.LineNumber), + fmt.Sprintf("variable %q (%v:%v) used in secret field but is not marked as sensitive, please follow https://github.com/Azure/armstrong/blob/main/docs/guidance-for-api-test.md#4-q-i-have-some-sensitive-information-in-the-test-case-how-to-hide-it to set the variable for secret values", varName, theVar.FileName, theVar.LineNumber), propertyName, ) credScanErrors = append(credScanErrors, credScanErr)