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"`
}
Click to show internal directories.
Click to hide internal directories.