Exploit databaseDownload repository ZIP
GH-f0a9bb99064fc5c640a8aca726a5dee3
actions-marketplace-validations/securego_gosec
Sources for CVE-2022-23772
3 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.
Repository files69
actions-marketplace-validations/securego_gosecRevision a3d5223361a5
- .claude/
- .github/
- analyzers/
- autofix/
- cmd/
- cwe/
- examples/
- goanalysis/
- internal/
- issue/
- report/
- rules/
- taint/
- testutils/
- tools/
- .env.example
- .gitignore
- .golangci.yml
- .goreleaser.yml
- CLAUDE.md
- DEVELOPMENT.md
- Dockerfile
- LICENSE.txt
- Makefile
- README.md
- RULES.md
- USERS.md
- action.yml
- analyzer.go
- analyzer_bench_test.go
- analyzer_core_internal_test.go
- analyzer_ignores_internal_test.go
- analyzer_package_loading_test.go
- analyzer_test.go
- call_list.go
- call_list_test.go
- config.go
- config_test.go
- cosign.pub
- entrypoint.sh
- errors.go
- errors_test.go
- flag_test.go
- go.mod
- go.sum
- gosec_cache.go
- gosec_cache_test.go
- gosec_suite_test.go
- helpers.go
- helpers_test.go
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
errors.go
Go · 692 bytespackage gosec
import (
"sort"
)
// Error is used when there are golang errors while parsing the AST
type Error struct {
Line int `json:"line"`
Column int `json:"column"`
Err string `json:"error"`
}
// NewError creates Error object
func NewError(line, column int, err string) *Error {
return &Error{
Line: line,
Column: column,
Err: err,
}
}
// sortErrors sorts the golang errors by line
func sortErrors(allErrors map[string][]Error) {
for _, errors := range allErrors {
sort.Slice(errors, func(i, j int) bool {
if errors[i].Line == errors[j].Line {
return errors[i].Column <= errors[j].Column
}
return errors[i].Line < errors[j].Line
})
}
}