From cfbe47bd9910644addc2beb2ccf20ca4d8f257c0 Mon Sep 17 00:00:00 2001 From: deferdeter <166976362+deferdeter@users.noreply.github.com> Date: Tue, 16 Apr 2024 18:14:00 +0800 Subject: [PATCH] chore: fix some typos in comments (#1897) Signed-off-by: deferdeter --- contrib/snmp2cpe/pkg/cpe/cpe_test.go | 2 +- detector/github.go | 2 +- detector/util.go | 2 +- reporter/syslog_test.go | 2 +- reporter/util.go | 2 +- tui/tui.go | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/contrib/snmp2cpe/pkg/cpe/cpe_test.go b/contrib/snmp2cpe/pkg/cpe/cpe_test.go index 139f5b9f..e4689ae0 100644 --- a/contrib/snmp2cpe/pkg/cpe/cpe_test.go +++ b/contrib/snmp2cpe/pkg/cpe/cpe_test.go @@ -44,7 +44,7 @@ func TestConvert(t *testing.T) { want: []string{"cpe:2.3:o:cisco:ios:15.1(4)m4:*:*:*:*:*:*:*"}, }, { - name: "Cisco IOS Vresion 15.5(3)M on Cisco 892J-K9-V02", + name: "Cisco IOS Version 15.5(3)M on Cisco 892J-K9-V02", args: snmp.Result{ SysDescr0: `Cisco IOS Software, C890 Software (C890-UNIVERSALK9-M), Version 15.5(3)M, RELEASE SOFTWARE (fc1) Technical Support: http://www.cisco.com/techsupport diff --git a/detector/github.go b/detector/github.go index 1c6d2e9e..983605d2 100644 --- a/detector/github.go +++ b/detector/github.go @@ -49,7 +49,7 @@ func DetectGitHubSecurityAlerts(r *models.ScanResult, owner, repo, token string, // https://developer.github.com/v4/previews/#repository-vulnerability-alerts // To toggle this preview and access data, need to provide a custom media type in the Accept header: - // MEMO: I tried to get the affected version via GitHub API. Bit it seems difficult to determin the affected version if there are multiple dependency files such as package.json. + // MEMO: I tried to get the affected version via GitHub API. Bit it seems difficult to determine the affected version if there are multiple dependency files such as package.json. // TODO remove this header if it is no longer preview status in the future. req.Header.Set("Accept", "application/vnd.github.package-deletes-preview+json") req.Header.Set("Content-Type", "application/json") diff --git a/detector/util.go b/detector/util.go index a119b1e5..c00c9b57 100644 --- a/detector/util.go +++ b/detector/util.go @@ -134,7 +134,7 @@ func getPlusDiffCves(previous, current models.ScanResult) models.VulnInfos { // TODO commented out because a bug of diff logic when multiple oval defs found for a certain CVE-ID and same updated_at // if these OVAL defs have different affected packages, this logic detects as updated. - // This logic will be uncomented after integration with gost https://github.com/vulsio/gost + // This logic will be uncommented after integration with gost https://github.com/vulsio/gost // } else if isCveFixed(v, previous) { // updated[v.CveID] = v // logging.Log.Debugf("fixed: %s", v.CveID) diff --git a/reporter/syslog_test.go b/reporter/syslog_test.go index 41f7a6ef..b3184112 100644 --- a/reporter/syslog_test.go +++ b/reporter/syslog_test.go @@ -111,7 +111,7 @@ func TestSyslogWriterEncodeSyslog(t *testing.T) { for j, m := range messages { e := tt.expectedMessages[j] if e != m { - t.Errorf("test: %d, Messsage %d: \nexpected %s \nactual %s", i, j, e, m) + t.Errorf("test: %d, Message %d: \nexpected %s \nactual %s", i, j, e, m) } } } diff --git a/reporter/util.go b/reporter/util.go index 4b5cd604..f18f5fcb 100644 --- a/reporter/util.go +++ b/reporter/util.go @@ -723,7 +723,7 @@ func getPlusDiffCves(previous, current models.ScanResult) models.VulnInfos { // TODO commented out because a bug of diff logic when multiple oval defs found for a certain CVE-ID and same updated_at // if these OVAL defs have different affected packages, this logic detects as updated. - // This logic will be uncomented after integration with gost https://github.com/vulsio/gost + // This logic will be uncommented after integration with gost https://github.com/vulsio/gost // } else if isCveFixed(v, previous) { // updated[v.CveID] = v // logging.Log.Debugf("fixed: %s", v.CveID) diff --git a/tui/tui.go b/tui/tui.go index b4dd9378..babed660 100644 --- a/tui/tui.go +++ b/tui/tui.go @@ -67,7 +67,7 @@ func RunTui(results models.ScanResults) subcommands.ExitStatus { func keybindings(g *gocui.Gui) (err error) { errs := []error{} - // Move beetween views + // Move between views errs = append(errs, g.SetKeybinding("side", gocui.KeyTab, gocui.ModNone, nextView)) // errs = append(errs, g.SetKeybinding("side", gocui.KeyCtrlH, gocui.ModNone, previousView)) // errs = append(errs, g.SetKeybinding("side", gocui.KeyCtrlL, gocui.ModNone, nextView))