INNER CODE UNIT · Go

pairAWSCredentials

cc1a2b/JShunter · internal/jshunter/aws_pair.go:43

func pairAWSCredentials() []AWSPair {
	findingsMutex.Lock()
	defer findingsMutex.Unlock()

	bySource := map[string]struct {
		akids   []*Finding
		secrets []*Finding
	}{}
	for _, f := range findingsByHash {
		s := bySource[f.Source]
		switch f.RuleID {
		case "aws.access_key_id":
			s.akids = append(s.akids, f)
		case "aws.secret_access_key":
			s.secrets = append(s.secrets, f)
		}
		bySource[f.Source] = s
	}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…