scanners

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2025 License: MIT Imports: 12 Imported by: ? 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

Index

Constants

View Source
const (
	MaxWorkers     = 10
	MaxFileWorkers = 10
	CloneBaseDir   = "/tmp/techdetector" // You can make this configurable if needed
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DirectoryScanner

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

DirectoryScanner struct

func NewDirectoryScanner

func NewDirectoryScanner(
	reporter core.Reporter,
	processors []core.FileProcessor,
	matchRepository core.FindingRepository) *DirectoryScanner

NewDirectoryScanner creates a new DirectoryScanner

func (*DirectoryScanner) Scan

func (ds *DirectoryScanner) Scan(directory string, reportFormat string)

Scan method for DirectoryScanner

type FileScanner

type FileScanner interface {
	TraverseAndSearch(repoPath, repoName string) ([]core.Finding, error)
}

type FsFileScanner added in v0.8.0

type FsFileScanner struct {
	Processors []core.FileProcessor
}

FsFileScanner implements FileScanner

func (FsFileScanner) TraverseAndSearch added in v0.8.0

func (fileScanner FsFileScanner) TraverseAndSearch(targetDir string, repoName string) ([]core.Finding, error)

type GithubOrgScanner

type GithubOrgScanner struct {
	Reporter         core.Reporter
	FileScanner      FileScanner
	MatchRepository  core.FindingRepository
	ProgressReporter utils.ProgressReporter
	GithubClient     utils.GithubApi
	GitClient        utils.GitApi
	PostScanners     []core.PostScanner
	// contains filtered or unexported fields
}

GithubOrgScanner scans GitHub organizations for tech findings

func (*GithubOrgScanner) Scan

func (g *GithubOrgScanner) Scan(orgName string, reportFormat string)

Scan processes repositories from a GitHub organization

type GitlabEEScanner added in v0.8.0

type GitlabEEScanner struct {
	Reporter         core.Reporter
	FileScanner      FileScanner
	MatchRepository  core.FindingRepository
	Cutoff           string
	ProgressReporter utils.ProgressReporter
	GitlabApi        utils.GitlabApi
	GitClient        utils.GitApi
	GitMetrics       utils.GitMetrics
}

func (GitlabEEScanner) Scan added in v0.8.0

func (scanner GitlabEEScanner) Scan()

type ProjectJob added in v0.8.0

type ProjectJob struct {
	Project *gitlab.Project
}

type ProjectResult added in v0.8.0

type ProjectResult struct {
	Matches     []core.Finding
	Error       error
	ProjectName string
}

type RepoJob

type RepoJob struct {
	Repo *github.Repository
}

RepoJob represents a repository to process

type RepoResult

type RepoResult struct {
	Error    error
	RepoName string
}

RepoResult captures the outcome of processing a repository

type RepoScanner

type RepoScanner struct {
	Reporter        core.Reporter
	FileScanner     FsFileScanner
	MatchRepository core.FindingRepository
	GitClient       utils.GitApi
	PostScanners    []core.PostScanner
}

func (RepoScanner) Scan

func (repoScanner RepoScanner) Scan(repoURL string, reportFormat string)

Jump to

Keyboard shortcuts

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