ses

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SESCalls = []types.AWSService{
	{
		Name: "ses:ListIdentities",
		Call: func(ctx context.Context, sess *session.Session) (interface{}, error) {
			originalConfig := sess.Config
			var allIdentities []string
			for _, region := range types.Regions {
				regionConfig := &aws.Config{
					Region:      aws.String(region),
					Credentials: originalConfig.Credentials,
				}
				regionSess, err := session.NewSession(regionConfig)
				if err != nil {
					return nil, err
				}
				svc := ses.New(regionSess)
				output, err := svc.ListIdentitiesWithContext(ctx, &ses.ListIdentitiesInput{})
				if err != nil {
					return nil, err
				}
				allIdentities = append(allIdentities, aws.StringValueSlice(output.Identities)...)
			}
			return allIdentities, nil
		},
		Process: func(output interface{}, err error, debug bool) []types.ScanResult {
			var results []types.ScanResult

			if err != nil {
				utils.HandleAWSError(debug, "ses:ListIdentities", err)
				return []types.ScanResult{
					{
						ServiceName: "SES",
						MethodName:  "ses:ListIdentities",
						Error:       err,
						Timestamp:   time.Now(),
					},
				}
			}

			if identities, ok := output.([]string); ok {
				for _, identity := range identities {
					results = append(results, types.ScanResult{
						ServiceName:  "SES",
						MethodName:   "ses:ListIdentities",
						ResourceType: "identity",
						ResourceName: identity,
						Details:      map[string]interface{}{},
						Timestamp:    time.Now(),
					})

					utils.PrintResult(debug, "", "ses:ListIdentities", fmt.Sprintf("Found Identity: %s", identity), nil)
				}
			}
			return results
		},
		ModuleName: types.DefaultModuleName,
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL