cloudtrail

package
v0.64.21 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package cloudtrail implements the aws.cloudtrail source plugin: lists CloudTrail trails and emits audit_log_trail evidence records with cross-vendor logging-coverage and integrity attributes.

Index

Constants

View Source
const EvidenceTypeID = "audit_log_trail"

EvidenceTypeID is the single evidence type this plugin emits.

View Source
const SourceID = "aws.cloudtrail"

SourceID is the registered ID for the aws.cloudtrail plugin instance.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	DescribeTrails(ctx context.Context, params *awsct.DescribeTrailsInput, optFns ...func(*awsct.Options)) (*awsct.DescribeTrailsOutput, error)
	GetTrailStatus(ctx context.Context, params *awsct.GetTrailStatusInput, optFns ...func(*awsct.Options)) (*awsct.GetTrailStatusOutput, error)
}

API is the subset of the CloudTrail client this plugin uses.

type Options

type Options struct {
	API    API
	Region string
	Now    func() time.Time
}

Options is the constructor input.

type Plugin

type Plugin struct {
	// contains filtered or unexported fields
}

Plugin is the in-process aws.cloudtrail source.

func New

func New(opts Options) *Plugin

New constructs a Plugin around an explicit API implementation.

func NewFromAWS

func NewFromAWS(ctx context.Context, region string) (*Plugin, error)

NewFromAWS constructs a Plugin backed by the real AWS SDK.

func (*Plugin) Collect

func (p *Plugin) Collect(ctx context.Context, req core.SlotRequest) ([]core.EvidenceRecord, error)

Collect lists CloudTrail trails and returns one audit_log_trail record per trail.

func (*Plugin) Emits

func (*Plugin) Emits() []string

Emits returns the evidence types this plugin can produce.

func (*Plugin) ID

func (*Plugin) ID() string

ID returns the registered plugin ID.

func (*Plugin) Init

func (*Plugin) Init(context.Context, map[string]any) error

Init is a no-op; configuration is supplied to the constructor.

Jump to

Keyboard shortcuts

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