Skip to content

Golang false positive #629

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
JafarAkhondali opened this issue Oct 22, 2022 · 0 comments · Fixed by #675
Closed

Golang false positive #629

JafarAkhondali opened this issue Oct 22, 2022 · 0 comments · Fixed by #675
Labels
bug The issue describes a malfunctioning aspect of the project. P3 When you get around it. E.g. a fix for non-breaking issue we will work on when there's nothing more selected The issue has been selected to be worked on.

Comments

@JafarAkhondali
Copy link

Detect-secrets create false alarm for following content(golang):

test.go:

func MyFunc(config *configs.Config){
	opts := &redis.FailoverOptions{
		anyPasswordLikeVariable: config.MySecretPasswordVariable,
	}
}
$ detect-secrets scan test.go     
{
  "version": "1.4.0",
  "plugins_used": [
    {
      "name": "ArtifactoryDetector"
    },
    {
      "name": "AWSKeyDetector"
    },
    {
      "name": "AzureStorageKeyDetector"
    },
    {
      "name": "Base64HighEntropyString",
      "limit": 4.5
    },
    {
      "name": "BasicAuthDetector"
    },
    {
      "name": "CloudantDetector"
    },
    {
      "name": "DiscordBotTokenDetector"
    },
    {
      "name": "GitHubTokenDetector"
    },
    {
      "name": "HexHighEntropyString",
      "limit": 3.0
    },
    {
      "name": "IbmCloudIamDetector"
    },
    {
      "name": "IbmCosHmacDetector"
    },
    {
      "name": "JwtTokenDetector"
    },
    {
      "name": "KeywordDetector",
      "keyword_exclude": ""
    },
    {
      "name": "MailchimpDetector"
    },
    {
      "name": "NpmDetector"
    },
    {
      "name": "PrivateKeyDetector"
    },
    {
      "name": "SendGridDetector"
    },
    {
      "name": "SlackDetector"
    },
    {
      "name": "SoftlayerDetector"
    },
    {
      "name": "SquareOAuthDetector"
    },
    {
      "name": "StripeDetector"
    },
    {
      "name": "TwilioKeyDetector"
    }
  ],
  "filters_used": [
    {
      "path": "detect_secrets.filters.allowlist.is_line_allowlisted"
    },
    {
      "path": "detect_secrets.filters.common.is_ignored_due_to_verification_policies",
      "min_level": 2
    },
    {
      "path": "detect_secrets.filters.heuristic.is_indirect_reference"
    },
    {
      "path": "detect_secrets.filters.heuristic.is_likely_id_string"
    },
    {
      "path": "detect_secrets.filters.heuristic.is_lock_file"
    },
    {
      "path": "detect_secrets.filters.heuristic.is_not_alphanumeric_string"
    },
    {
      "path": "detect_secrets.filters.heuristic.is_potential_uuid"
    },
    {
      "path": "detect_secrets.filters.heuristic.is_prefixed_with_dollar_sign"
    },
    {
      "path": "detect_secrets.filters.heuristic.is_sequential_string"
    },
    {
      "path": "detect_secrets.filters.heuristic.is_swagger_file"
    },
    {
      "path": "detect_secrets.filters.heuristic.is_templated_secret"
    }
  ],
  "results": {
    "test.go": [
      {
        "type": "Secret Keyword",
        "filename": "test.go",
        "hashed_secret": "8bed87230d154e9a4f982667d20d4752162c9df1",
        "is_verified": false,
        "line_number": 3
      }
    ]
  },
  "generated_at": "2022-10-22T12:33:01Z"
}




@jpdakran jpdakran added pending The issue still needs to be reviewed by one of the maintainers. triaged The issue has been reviewed but has not been solved yet. bug The issue describes a malfunctioning aspect of the project. P3 When you get around it. E.g. a fix for non-breaking issue we will work on when there's nothing more selected The issue has been selected to be worked on. and removed pending The issue still needs to be reviewed by one of the maintainers. triaged The issue has been reviewed but has not been solved yet. labels Mar 22, 2023
@jpdakran jpdakran linked a pull request Mar 27, 2023 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue describes a malfunctioning aspect of the project. P3 When you get around it. E.g. a fix for non-breaking issue we will work on when there's nothing more selected The issue has been selected to be worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants