INNER CODE UNIT · Go

validateCloudChallengeResponse

OWASP/wrongsecrets · aws/wrongsecrets_aws_test.go:77

func validateCloudChallengeResponse(statusCode int, body string) bool {
	// body should not contain if_you_see_this_please_use_AWS_Setup
	if strings.Contains(body, "if_you_see_this_please_use_AWS_Setup") {
		log.Printf("Found if_you_see_this_please_use_AWS_Setup in response body")
		return false
	}
	// body should not contain please_use_supported_cloud_env
	if strings.Contains(body, "please_use_supported_cloud_env") {
		log.Printf("Found please_use_supported_cloud_env in response body")
		return false
	}
	// body should not contain if_you_see_this_please_use_k8s
	if strings.Contains(body, "if_you_see_this_please_use_k8s") {
		log.Printf("Found if_you_see_this_please_use_k8s in response body")
		return false
	}
	// body should not contain if_you_see_this_please_use_K8S_and_Vault
	if strings.Contains(body, "if_you_see_this_please_use_K8S_and_Vault") {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…