scanners

package
v0.0.0-...-2f0a4f1 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2023 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const TestSSLName = "testssl"

Variables

This section is empty.

Functions

This section is empty.

Types

type AdditionalFields

type AdditionalFields struct {
	Target     string `json:"target"`
	Convention string `json:"convention"`
}

type Detectors

type Detectors struct {
	Elements             []Elements `json:"elements"`
	Description          string     `json:"description"`
	Markdown             string     `json:"markdown"`
	FirstMarkdownElement string     `json:"first_markdown_element"`
	Id                   string     `json:"id"`
	Check                string     `json:"check"`
	Impact               string     `json:"impact"`
	Confidence           string     `json:"confidence"`
}

type Elements

type Elements struct {
	Type               string             `json:"type"`
	Name               string             `json:"name"`
	SourceMapping      SourceMapping      `json:"source_mapping"`
	TypeSpecificFields TypeSpecificFields `json:"type_specific_fields"`
	AdditionalFields   `json:"additional_fields,omitempty"`
}

type EmailReport

type EmailReport struct {
	FinalScore   string `json:"finalScore"`
	OverallGrade string `json:"overallGrade"`
}

type Extra

type Extra struct {
	Fingerprint string `json:"fingerprint"`
	IsIgnored   bool   `json:"is_ignored"`
	Lines       string `json:"lines"`
	Message     string `json:"message"`
	Severity    string `json:"severity"`
}

type Parent

type Parent struct {
	Type               string        `json:"type"`
	Name               string        `json:"name"`
	SourceMapping      SourceMapping `json:"source_mapping"`
	TypeSpecificFields `json:"type_specific_fields,omitempty"`
}

type Paths

type Paths struct {
	Comment string   `json:"_comment"`
	Scanned []string `json:"scanned"`
}

type Result

type Result struct {
	CheckId string `json:"check_id"`
	Extra   Extra
	Path    string `json:"path"`
}

type Results

type Results struct {
	Detectors []Detectors `json:"detectors"`
}

type Scanner

type Scanner interface {
	Name() string
	Image() string
	Execute(client *client.Client, params []string, files io.Reader) ([]model.IssueRequest, error)
}

type ScannerWithEmail

type ScannerWithEmail interface {
	Scanner
	ExecuteForEmail(client *client.Client, params []string, files io.Reader) (EmailReport, error)
}

type Semgrep

type Semgrep struct{}

Semgrep https://hub.docker.com/r/returntocorp/semgrep docker images for semgrep - Lightweight static analysis for many languages. TODO move timeout time to struct.

func (Semgrep) Execute

func (s Semgrep) Execute(apiClient *client.Client, params []string, tarball io.Reader) ([]model.IssueRequest, error)

func (Semgrep) Image

func (Semgrep) Image() string

func (Semgrep) Name

func (Semgrep) Name() string

type SemgrepReport

type SemgrepReport struct {
	Errors  []interface{} `json:"errors"`
	Paths   Paths         `json:"paths"`
	Result  []Result      `json:"results"`
	Version string        `json:"version"`
}

type Slither

type Slither struct{}

Slither https://hub.docker.com/r/trailofbits/slither Official testssl.sh docker image. Check SSL/TLS ciphers, protocols, cryptographic flaws + much more. TODO move timeout time to struct.

func (Slither) Execute

func (t Slither) Execute(apiClient *client.Client, params []string, tarball io.Reader) ([]model.IssueRequest, error)

func (Slither) Image

func (Slither) Image() string

func (Slither) Name

func (Slither) Name() string

type SlitherReport

type SlitherReport struct {
	Success bool        `json:"success"`
	Error   interface{} `json:"error"`
	Results Results     `json:"results"`
}

type SourceMapping

type SourceMapping struct {
	Start            int    `json:"start"`
	Length           int    `json:"length"`
	FilenameUsed     string `json:"filename_used"`
	FilenameRelative string `json:"filename_relative"`
	FilenameAbsolute string `json:"filename_absolute"`
	FilenameShort    string `json:"filename_short"`
	IsDependency     bool   `json:"is_dependency"`
	Lines            []int  `json:"lines"`
	StartingColumn   int    `json:"starting_column"`
	EndingColumn     int    `json:"ending_column"`
}

type TestSSL

type TestSSL struct{}

TestSSL https://hub.docker.com/r/drwetter/testssl.sh/tags Official testssl.sh docker image. Check SSL/TLS ciphers, protocols, cryptographic flaws + much more. TODO move timeout time to struct.

func (TestSSL) Execute

func (t TestSSL) Execute(apiClient *client.Client, params []string, _ io.Reader) ([]model.IssueRequest, error)

func (TestSSL) ExecuteForEmail

func (t TestSSL) ExecuteForEmail(apiClient *client.Client, params []string, _ io.Reader) (EmailReport, error)

func (TestSSL) Image

func (TestSSL) Image() string

func (TestSSL) Name

func (TestSSL) Name() string

type TestSSLReport

type TestSSLReport struct {
	ID       string `json:"id"`
	IP       string `json:"ip"`
	Port     string `json:"port"`
	Severity string `json:"severity"`
	Finding  string `json:"finding"`
	CVE      string `json:"cve,omitempty"`
	CWE      string `json:"cwe,omitempty"`
}

type TypeSpecificFields

type TypeSpecificFields struct {
	Parent struct {
		Type          string        `json:"type"`
		Name          string        `json:"name"`
		SourceMapping SourceMapping `json:"source_mapping"`
	} `json:"parent"`
	Signature string `json:"signature"`
}

Jump to

Keyboard shortcuts

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