source

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package source defines scan source interfaces.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chunk

type Chunk struct {
	// Data is the raw content to scan.
	Data []byte

	// SourceMetadata describes where the chunk originated from.
	SourceMetadata finding.SourceMetadata
}

Chunk is the smallest unit of data to be scanned.

type Source

type Source interface {
	// Type returns the source type identifier (e.g., "git", "filesystem", "container").
	Type() string

	// Chunks sends scannable data chunks over a channel.
	// The channel is closed when the context is cancelled.
	Chunks(ctx context.Context) <-chan Chunk

	// Validate checks that the source is accessible and valid.
	Validate() error
}

Source represents a data source to be scanned. Each source type (Git, filesystem, container) implements this interface.

Directories

Path Synopsis
Package container provides a container image scan source.
Package container provides a container image scan source.
Package filesystem provides a filesystem-based scan source.
Package filesystem provides a filesystem-based scan source.
Package gcs provides a Google Cloud Storage bucket scan source.
Package gcs provides a Google Cloud Storage bucket scan source.
Package git provides a Git repository scan source.
Package git provides a Git repository scan source.
Package s3 provides an AWS S3 bucket scan source.
Package s3 provides an AWS S3 bucket scan source.
Package slack provides a Slack workspace scan source.
Package slack provides a Slack workspace scan source.

Jump to

Keyboard shortcuts

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