secretscan

package
v3.1.17 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsEnabled

func IsEnabled() bool

IsEnabled returns whether secret scanning is enabled

func ShouldBlockOnDetection

func ShouldBlockOnDetection() bool

ShouldBlockOnDetection returns whether to block pushes with secrets

Types

type ScanPushResult

type ScanPushResult struct {
	Blocked  bool
	Message  string
	Secrets  []secretscan.DetectedSecret
	RepoID   int64
	RepoName string
}

ScanPushResult contains the result of scanning a push for secrets

func ScanPush

func ScanPush(ctx context.Context, repo *repo_model.Repository, gitRepo *git.Repository, oldCommitID, newCommitID string) (*ScanPushResult, error)

ScanPush scans a push for secrets

Source Files

  • secretscan.go

Jump to

Keyboard shortcuts

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