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 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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