Documentation
¶
Overview ¶
Package s3 provides an AWS S3 bucket scan source.
Package s3 provides an AWS S3 bucket scan source.
S3Source implements the source.Source interface, listing and downloading objects from an S3 bucket and emitting them as chunks for secret scanning.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*S3Source)
Option configures an S3Source.
func WithBufferSize ¶
WithBufferSize sets the channel buffer size for the chunk channel.
func WithExcludePaths ¶
WithExcludePaths sets glob patterns for object keys to exclude from scanning. Patterns are matched against each object's key (the object's path within the bucket), mirroring filesystem.WithExcludePaths semantics.
func WithMaxFileSize ¶
WithMaxFileSize sets the maximum object size to download and scan. Objects larger than this value are skipped. Values less than or equal to zero are ignored, preserving the default.
func WithPrefix ¶
WithPrefix limits the scan to objects matching the given key prefix.
func WithRegion ¶
WithRegion sets the AWS region for the S3 client.
type S3Source ¶
type S3Source struct {
// contains filtered or unexported fields
}
S3Source scans objects in an AWS S3 bucket for leaked secrets.
func New ¶
New creates a new S3Source for the given bucket. Use functional options to configure prefix filtering, max file size, etc.
func (*S3Source) Chunks ¶
Chunks lists objects in the S3 bucket and sends their contents over a channel. The channel is closed when all objects have been processed or the context is cancelled.