gosec

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name:     "go-sec",
	Requires: []*analysis.Analyzer{sourcecode.Analyzer},
	Run:      run,
	Rules:    []*analysis.Rule{goSecNotInstalled},
	ReadmeInfo: analysis.ReadmeInfo{
		Name:         "Go Security Checker",
		Description:  "Inspects source code for security problems by scanning the Go AST.",
		Dependencies: "[gosec](https://github.com/securego/gosec), `sourceCodeUri`",
	},
}

Functions

This section is empty.

Types

type Issue

type Issue struct {
	Severity   string `json:"severity"`
	Confidence string `json:"confidence"`
	RuleID     string `json:"rule_id"`
	Details    string `json:"details"`
	File       string `json:"file"`
	Code       string `json:"code"`
	Line       string `json:"line"`
}

type Result added in v0.20.2

type Result struct {
	Issues []Issue `json:"Issues"`
	Stats  Stats   `json:"Stats"`
}

type Stats

type Stats struct {
	Files int `json:"files"`
	Lines int `json:"lines"`
	Nosec int `json:"nosec"`
	Found int `json:"found"`
}

Jump to

Keyboard shortcuts

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