common

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Findings

type Findings struct {
	Description string `json:"Description"`
	StartLine   int    `json:"StartLine"`
	EndLine     int    `json:"EndLine"`
	StartColumn int    `json:"StartColumn"`
	EndColumn   int    `json:"EndColumn"`

	Line string `json:"Line"`

	Match string `json:"Match"`

	// Secret contains the full content of what is matched in
	// the tree-sitter query.
	Secret string `json:"Secret"`

	// File is the name of the file containing the finding
	File        string `json:"File"`
	SymlinkFile string `json:"SymlinkFile"`
	Commit      string `json:"Commit"`

	// Entropy is the shannon entropy of Value
	Entropy float32 `json:"Entropy"`

	Author  string   `json:"Author"`
	Email   string   `json:"Email"`
	Date    string   `json:"Date"`
	Message string   `json:"Message"`
	Tags    []string `json:"Tags"`

	// Rule is the name of the rule that was matched
	RuleID string `json:"RuleID"`

	// unique identifier
	Fingerprint string `json:"Fingerprint"`
}

type Results

type Results struct {
	Findings    []Findings
	Source      string
	ScannerName string
	Error       error
}

Results for now will be as the gitleaks results struct since it is our only secret scanner. once another secret scanner is integrated, we will need to think of a common scheme.

func (*Results) GetError

func (r *Results) GetError() error

type ScannersConfig

type ScannersConfig struct {
	Gitleaks gitleaksconfig.Config `yaml:"gitleaks" mapstructure:"gitleaks"`
}

func (ScannersConfig) IsConfig

func (ScannersConfig) IsConfig()

Jump to

Keyboard shortcuts

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