code: func NewHardcodedCredentials(id string, conf gosec.Config) (gosec.Rule, []ast.Node) {
  	pattern := `(?i)passwd|pass|password|pwd|secret|token`
  	entropyThreshold := 80.0
  	perCharThreshold := 3.0
  	ignoreEntropy := false
  	var truncateString = 16
  	if val, ok := conf["G101"]; ok {
  		conf := val.(map[string]string)
  		if configPattern, ok := conf["pattern"]; ok {
  			pattern = configPattern
  		}
  		if configIgnoreEntropy, ok := conf["ignore_entropy"]; ok {
  			if parsedBool, err := strconv.ParseBool(configIgnoreEntropy); err == nil {
  				ignoreEntropy = parsedBool
  			}
  		}
  		if configEntropyThreshold, ok := conf["entropy_threshold"]; ok {
  			if parsedNum, err := strconv.ParseFloat(configEntropyThreshold, 64); err == nil {
  				entropyThreshold = parsedNum
  			}
  		}
  		if configCharThreshold, ok := conf["per_char_threshold"]; ok {
  			if parsedNum, err := strconv.ParseFloat(configCharThreshold, 64); err == nil {
  				perCharThreshold = parsedNum
  			}
  		}
  		if configTruncate, ok := conf["truncate"]; ok {
  			if parsedInt, err := strconv.Atoi(configTruncate); err == nil {
  				truncateString = parsedInt
  			}
  		}
  	}
  
  	return &credentials{
  		pattern:          regexp.MustCompile(pattern),
  		entropyThreshold: entropyThreshold,
  		perCharThreshold: perCharThreshold,
  		ignoreEntropy:    ignoreEntropy,
  		truncate:         truncateString,
  		MetaData: gosec.MetaData{
  			ID:         id,
  			What:       "Potential hardcoded credentials",
  			Confidence: gosec.Low,
  			Severity:   gosec.High,
  		},
  	}, []ast.Node{(*ast.AssignStmt)(nil), (*ast.ValueSpec)(nil)}
  }
docs: // NewHardcodedCredentials attempts to find high entropy string constants being
  // assigned to variables that appear to be related to credentials.