core

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: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileProcessor

type FileProcessor interface {
	Supports(filePath string) bool

	Process(path string, repoName string, content string) ([]Finding, error)
}

FileProcessor is an interface that defines a generic processor.

type Finding

type Finding struct {
	Name       string                 `json:"name,omitempty"`
	Type       string                 `json:"type,omitempty"`
	Category   string                 `json:"category,omitempty"`
	Properties map[string]interface{} `json:"properties,omitempty"`
	Path       string                 `json:"path,omitempty"`
	RepoName   string                 `json:"repo_name,omitempty"`
}

type FindingIterator

type FindingIterator interface {
	HasNext() bool
	Next() (FindingSet, error)
	Reset() error // New method to reset the iterator
}

type FindingRepository

type FindingRepository interface {
	Store(matches []Finding) error
	Clear() error
	NewIterator() FindingIterator
	Close() error // add this method
}

type FindingSet

type FindingSet struct {
	Matches []Finding `json:"matchSet"`
}

type PostScanner

type PostScanner interface {
	Scan(path, name string) ([]Finding, error)
}

type ReportStorage added in v0.13.0

type ReportStorage interface {
	Store(data []byte) error
}

type Reporter

type Reporter interface {
	Report(repository FindingRepository) error
}

type SqlQueries

type SqlQueries struct {
	Queries []SqlQuery `yaml:"queries"`
}

SqlQueries holds a collection of SqlQuery instances.

type SqlQuery

type SqlQuery struct {
	Name  string `yaml:"name"`
	Query string `yaml:"query"`
}

Jump to

Keyboard shortcuts

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