diff --git a/README.md b/README.md index dbfc96f..92d0d37 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ You may obtain a copy of the License [here](http://www.apache.org/licenses/LICEN [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/3218/badge)](https://bestpractices.coreinfrastructure.org/projects/3218) [![Build Status](https://github.com/securego/gosec/workflows/CI/badge.svg)](https://github.com/securego/gosec/actions?query=workflows%3ACI) [![Coverage Status](https://codecov.io/gh/securego/gosec/branch/master/graph/badge.svg)](https://codecov.io/gh/securego/gosec) -[![GoReport](https://goreportcard.com/badge/github.com/securego/gosec)](https://goreportcard.com/badge/github.com/securego/gosec) +[![GoReport](https://goreportcard.com/badge/github.com/securego/gosec)](https://goreportcard.com/report/github.com/securego/gosec) [![GoDoc](https://godoc.org/github.com/securego/gosec?status.svg)](https://godoc.org/github.com/securego/gosec) [![Docs](https://readthedocs.org/projects/docs/badge/?version=latest)](https://securego.io/) [![Downloads](https://img.shields.io/github/downloads/securego/gosec/total.svg)](https://github.com/securego/gosec/releases) diff --git a/analyzer_test.go b/analyzer_test.go index 801473c..4c6fc91 100644 --- a/analyzer_test.go +++ b/analyzer_test.go @@ -366,7 +366,7 @@ var _ = Describe("Analyzer", func() { It("should properly parse the errors", func() { pkg := &packages.Package{ Errors: []packages.Error{ - packages.Error{ + { Pos: "file:1:2", Msg: "build error", }, @@ -387,7 +387,7 @@ var _ = Describe("Analyzer", func() { It("should properly parse the errors without line and column", func() { pkg := &packages.Package{ Errors: []packages.Error{ - packages.Error{ + { Pos: "file", Msg: "build error", }, @@ -408,7 +408,7 @@ var _ = Describe("Analyzer", func() { It("should properly parse the errors without column", func() { pkg := &packages.Package{ Errors: []packages.Error{ - packages.Error{ + { Pos: "file", Msg: "build error", }, @@ -429,7 +429,7 @@ var _ = Describe("Analyzer", func() { It("should return error when line cannot be parsed", func() { pkg := &packages.Package{ Errors: []packages.Error{ - packages.Error{ + { Pos: "file:line", Msg: "build error", }, @@ -442,7 +442,7 @@ var _ = Describe("Analyzer", func() { It("should return error when column cannot be parsed", func() { pkg := &packages.Package{ Errors: []packages.Error{ - packages.Error{ + { Pos: "file:1:column", Msg: "build error", }, @@ -455,11 +455,11 @@ var _ = Describe("Analyzer", func() { It("should append error to the same file", func() { pkg := &packages.Package{ Errors: []packages.Error{ - packages.Error{ + { Pos: "file:1:2", Msg: "error1", }, - packages.Error{ + { Pos: "file:3:4", Msg: "error2", }, @@ -507,7 +507,7 @@ var _ = Describe("Analyzer", func() { It("should add a new error", func() { pkg := &packages.Package{ Errors: []packages.Error{ - packages.Error{ + { Pos: "file:1:2", Msg: "build error", }, diff --git a/helpers_test.go b/helpers_test.go index 0f32c38..10edd72 100644 --- a/helpers_test.go +++ b/helpers_test.go @@ -14,7 +14,7 @@ import ( ) var _ = Describe("Helpers", func() { - Context("when listing pacakge paths", func() { + Context("when listing package paths", func() { var dir string JustBeforeEach(func() { var err error diff --git a/report/sarif/writer.go b/report/sarif/writer.go index 3b9902e..5e70dd6 100644 --- a/report/sarif/writer.go +++ b/report/sarif/writer.go @@ -7,7 +7,7 @@ import ( ) //WriteReport write a report in SARIF format to the output writer -func WriteReport(w io.Writer, data *core.ReportInfo,rootPaths []string) error { +func WriteReport(w io.Writer, data *core.ReportInfo, rootPaths []string) error { sr, err := GenerateReport(rootPaths, data) if err != nil { return err diff --git a/rules/subproc.go b/rules/subproc.go index 30c32cc..48a0726 100644 --- a/rules/subproc.go +++ b/rules/subproc.go @@ -61,7 +61,7 @@ func (r *subprocess) Match(n ast.Node, c *gosec.Context) (*gosec.Issue, error) { } // isContext checks whether or not the node is a CommandContext call or not -// Thi is requried in order to skip the first argument from the check. +// Thi is required in order to skip the first argument from the check. func (r *subprocess) isContext(n ast.Node, ctx *gosec.Context) bool { selector, indent, err := gosec.GetCallInfo(n, ctx) if err != nil { diff --git a/testutils/source.go b/testutils/source.go index 8bb162a..b625cce 100644 --- a/testutils/source.go +++ b/testutils/source.go @@ -857,7 +857,7 @@ func main(){ } defer rows.Close() }`}, 1, gosec.NewConfig()}, {[]string{` -// Format string without proper quoting with transation +// Format string without proper quoting with transaction package main import ( "context" @@ -1027,7 +1027,7 @@ func main(){ } defer rows.Close() }`}, 1, gosec.NewConfig()}, {[]string{` -// DB transation check +// DB transaction check package main import ( "context"