cloudformation

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: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CloudFormationCalls = []types.AWSService{
	{
		Name: "cloudformation:ListStacks",
		Call: func(ctx context.Context, sess *session.Session) (interface{}, error) {
			svc := cloudformation.New(sess)
			input := &cloudformation.ListStacksInput{}
			return svc.ListStacksWithContext(ctx, input)
		},
		Process: func(output interface{}, err error, debug bool) []types.ScanResult {
			var results []types.ScanResult

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

			if stacks, ok := output.(*cloudformation.ListStacksOutput); ok {
				for _, stack := range stacks.StackSummaries {
					results = append(results, types.ScanResult{
						ServiceName:  "CloudFormation",
						MethodName:   "cloudformation:ListStacks",
						ResourceType: "stack",
						ResourceName: *stack.StackName,
						Details:      map[string]interface{}{},
						Timestamp:    time.Now(),
					})

					utils.PrintResult(debug, "", "cloudformation:ListStacks", fmt.Sprintf("Stack: %s", *stack.StackName), 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