coderules

package
v0.20.3 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name:     "code-rules",
	Requires: []*analysis.Analyzer{sourcecode.Analyzer},
	Run:      run,
	Rules:    []*analysis.Rule{codeRulesViolationError, codeRulesViolationWarning, semgrepNotFound, semgrepRunningErr},
	ReadmeInfo: analysis.ReadmeInfo{
		Name:         "Code Rules",
		Description:  "Checks for forbidden access to environment variables, file system or use of syscall module.",
		Dependencies: "[semgrep](https://github.com/returntocorp/semgrep), `sourceCodeUri`",
	},
}

Functions

This section is empty.

Types

type SemgrepError

type SemgrepError struct {
}

type SemgrepResult

type SemgrepResult struct {
	CheckID string `json:"check_id"`
	End     struct {
		Col    int `json:"col"`
		Line   int `json:"line"`
		Offset int `json:"offset"`
	} `json:"end"`
	Extra struct {
		IsIgnored bool   `json:"is_ignored"`
		Lines     string `json:"lines"`
		Message   string `json:"message"`
		Severity  string `json:"severity"`
	} `json:"extra"`
	Path  string `json:"path"`
	Start struct {
		Col    int `json:"col"`
		Line   int `json:"line"`
		Offset int `json:"offset"`
	} `json:"start"`
}

type SemgrepResults

type SemgrepResults struct {
	Errors  []SemgrepError  `json:"errors"`
	Results []SemgrepResult `json:"results"`
	Version string          `json:"version"`
}

Jump to

Keyboard shortcuts

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