Preparing report...

Report for github.com/aquasecurity/postee

A+    Excellent!    Found 57 issues across 104 files

Tweet

gofmt100%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

No problems detected. Good job!


go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


gocyclo95%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.

    • postee/outputs/jira.go
    • Line 274: warning: cyclomatic complexity 27 of function InitIssue() is high (> 15) (gocyclo)
    • Line 138: warning: cyclomatic complexity 18 of function (*JiraAPI).Send() is high (> 15) (gocyclo)

golint45%

Golint is a linter for Go source code.

    • postee/routes/routes.go
    • Line 3: warning: exported type InputRoute should have comment or be unexported (golint)
    • Line 12: warning: exported type Plugins should have comment or be unexported (golint)
    • Line 19: warning: exported method InputRoute.IsSchedulerRun should have comment or be unexported (golint)
    • Line 22: warning: exported method InputRoute.StartScheduler should have comment or be unexported (golint)
    • Line 26: warning: exported method InputRoute.StopScheduler should have comment or be unexported (golint)
    • postee/outputs/servicenow.go
    • Line 12: warning: exported type ServiceNowOutput should have comment or be unexported (golint)
    • Line 21: warning: exported method ServiceNowOutput.GetName should have comment or be unexported (golint)
    • Line 25: warning: exported method ServiceNowOutput.Init should have comment or be unexported (golint)
    • Line 32: warning: exported method ServiceNowOutput.Send should have comment or be unexported (golint)
    • Line 52: warning: exported method ServiceNowOutput.Terminate should have comment or be unexported (golint)
    • Line 57: warning: exported method ServiceNowOutput.GetLayoutProvider should have comment or be unexported (golint)
    • postee/outputs/splunk.go
    • Line 20: warning: exported type SplunkOutput should have comment or be unexported (golint)
    • Line 28: warning: exported method SplunkOutput.GetName should have comment or be unexported (golint)
    • Line 32: warning: exported method SplunkOutput.Init should have comment or be unexported (golint)
    • Line 38: warning: exported method SplunkOutput.Send should have comment or be unexported (golint)
    • Line 118: warning: exported method SplunkOutput.Terminate should have comment or be unexported (golint)
    • Line 123: warning: exported method SplunkOutput.GetLayoutProvider should have comment or be unexported (golint)
    • postee/msgservice/msghandling.go
    • Line 15: warning: exported type MsgService should have comment or be unexported (golint)
    • Line 21: warning: exported method MsgService.MsgHandling should have comment or be unexported (golint)
    • Line 106: warning: exported var AggregateScanAndGetQueue should have comment or be unexported (golint)
    • postee/router/router.go
    • Line 26: warning: exported const IssueTypeDefault should have comment (or a comment on this block) or be unexported (golint)
    • Line 33: warning: exported type Router should have comment or be unexported (golint)
    • Line 57: warning: exported function Instance should have comment or be unexported (golint)
    • Line 71: warning: exported method Router.ReloadConfig should have comment or be unexported (golint)
    • Line 80: warning: exported method Router.Start should have comment or be unexported (golint)
    • Line 97: warning: exported method Router.Terminate should have comment or be unexported (golint)
    • Line 119: warning: exported method Router.Send should have comment or be unexported (golint)
    • Line 157: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 258: warning: exported method Router.HandleRoute should have comment or be unexported (golint)
    • Line 290: warning: exported function BuildAndInitOtpt should have comment or be unexported (golint)
    • postee/outputs/plugin.go
    • Line 12: warning: exported const ApplicationScopeOwner should have comment (or a comment on this block) or be unexported (golint)
    • Line 15: warning: exported type Output should have comment or be unexported (golint)
    • postee/outputs/slack.go
    • Line 20: warning: exported type SlackOutput should have comment or be unexported (golint)
    • Line 27: warning: exported method SlackOutput.GetName should have comment or be unexported (golint)
    • Line 31: warning: exported method SlackOutput.Init should have comment or be unexported (golint)
    • Line 56: warning: exported method SlackOutput.Send should have comment or be unexported (golint)
    • Line 95: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 106: warning: exported method SlackOutput.Terminate should have comment or be unexported (golint)
    • Line 111: warning: exported method SlackOutput.GetLayoutProvider should have comment or be unexported (golint)
    • postee/outputs/teams.go
    • Line 18: warning: exported type TeamsOutput should have comment or be unexported (golint)
    • Line 25: warning: exported method TeamsOutput.GetName should have comment or be unexported (golint)
    • Line 29: warning: exported method TeamsOutput.Init should have comment or be unexported (golint)
    • Line 35: warning: exported method TeamsOutput.Send should have comment or be unexported (golint)
    • Line 70: warning: exported method TeamsOutput.Terminate should have comment or be unexported (golint)
    • Line 75: warning: exported method TeamsOutput.GetLayoutProvider should have comment or be unexported (golint)
    • postee/layout/vulnerabilities.go
    • Line 11: warning: exported function RenderVulnerabilities should have comment or be unexported (golint)
    • Line 55: warning: exported function VulnerabilitiesTable should have comment or be unexported (golint)
    • postee/dbservice/sharedcfg.go
    • Line 16: warning: exported function EnsureApiKey should have comment or be unexported (golint)
    • Line 40: warning: exported function GetApiKey should have comment or be unexported (golint)
    • postee/formatting/jiraprovider.go
    • Line 9: warning: exported type JiraLayoutProvider should have comment or be unexported (golint)
    • Line 11: warning: exported method JiraLayoutProvider.P should have comment or be unexported (golint)
    • Line 15: warning: exported method JiraLayoutProvider.TitleH1 should have comment or be unexported (golint)
    • Line 19: warning: exported method JiraLayoutProvider.TitleH2 should have comment or be unexported (golint)
    • Line 23: warning: exported method JiraLayoutProvider.TitleH3 should have comment or be unexported (golint)
    • Line 27: warning: exported method JiraLayoutProvider.ColourText should have comment or be unexported (golint)
    • Line 31: warning: exported method JiraLayoutProvider.Table should have comment or be unexported (golint)
    • Line 47: warning: exported method JiraLayoutProvider.A should have comment or be unexported (golint)
    • postee/teams/teams_requests.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 11: warning: exported function CreateMessageByWebhook should have comment or be unexported (golint)
    • Line 31: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • postee/formatting/htmlprovider.go
    • Line 9: warning: exported type HtmlProvider should have comment or be unexported (golint)
    • Line 11: warning: exported method HtmlProvider.P should have comment or be unexported (golint)
    • Line 15: warning: exported method HtmlProvider.TitleH1 should have comment or be unexported (golint)
    • Line 19: warning: exported method HtmlProvider.TitleH2 should have comment or be unexported (golint)
    • Line 23: warning: exported method HtmlProvider.TitleH3 should have comment or be unexported (golint)
    • Line 27: warning: exported method HtmlProvider.ColourText should have comment or be unexported (golint)
    • Line 31: warning: exported method HtmlProvider.Table should have comment or be unexported (golint)
    • Line 54: warning: exported method HtmlProvider.A should have comment or be unexported (golint)
    • postee/webserver/webserver.go
    • Line 18: warning: exported type WebServer should have comment or be unexported (golint)
    • Line 26: warning: exported function Instance should have comment or be unexported (golint)
    • Line 54: warning: exported method WebServer.Start should have comment or be unexported (golint)
    • Line 91: warning: exported method WebServer.Terminate should have comment or be unexported (golint)
    • postee/outputs/email.go
    • Line 20: warning: exported type EmailOutput should have comment or be unexported (golint)
    • Line 31: warning: exported method EmailOutput.GetName should have comment or be unexported (golint)
    • Line 35: warning: exported method EmailOutput.Init should have comment or be unexported (golint)
    • Line 43: warning: exported method EmailOutput.Terminate should have comment or be unexported (golint)
    • Line 48: warning: exported method EmailOutput.GetLayoutProvider should have comment or be unexported (golint)
    • Line 52: warning: exported method EmailOutput.Send should have comment or be unexported (golint)
    • postee/outputs/webhook.go
    • Line 14: warning: exported type WebhookOutput should have comment or be unexported (golint)
    • Line 19: warning: exported method WebhookOutput.GetName should have comment or be unexported (golint)
    • Line 23: warning: exported method WebhookOutput.Init should have comment or be unexported (golint)
    • Line 29: warning: exported method WebhookOutput.Send should have comment or be unexported (golint)
    • Line 53: warning: exported method WebhookOutput.Terminate should have comment or be unexported (golint)
    • Line 58: warning: exported method WebhookOutput.GetLayoutProvider should have comment or be unexported (golint)
    • postee/utils/utils.go
    • Line 15: warning: exported function GetEnvironmentVarOrPlain should have comment or be unexported (golint)
    • Line 23: warning: exported function InitDebug should have comment or be unexported (golint)
    • Line 32: warning: exported function Debug should have comment or be unexported (golint)
    • Line 38: warning: exported function GetEnv should have comment or be unexported (golint)
    • postee/data/slack.go
    • Line 3: warning: exported type SlackTextBlock should have comment or be unexported (golint)
    • Line 8: warning: exported type SlackBlock should have comment or be unexported (golint)
    • postee/dbservice/checker.go
    • Line 10: warning: exported function CheckSizeLimit should have comment or be unexported (golint)
    • Line 44: warning: exported function CheckExpiredData should have comment or be unexported (golint)
    • postee/data/types.go
    • Line 5: warning: exported type ScanImageInfo should have comment or be unexported (golint)
    • Line 19: warning: exported type SensitiveData should have comment or be unexported (golint)
    • Line 26: warning: exported type MalwareData should have comment or be unexported (golint)
    • Line 32: warning: exported type ImageAssuranceResults should have comment or be unexported (golint)
    • Line 37: warning: exported type ControlCheck should have comment or be unexported (golint)
    • Line 43: warning: exported type ScanOptions should have comment or be unexported (golint)
    • Line 48: warning: exported type VulnerabilitySummary should have comment or be unexported (golint)
    • Line 59: warning: exported type InfoResources should have comment or be unexported (golint)
    • Line 63: warning: exported type ResourceDetails should have comment or be unexported (golint)
    • Line 68: warning: exported type Vulnerability should have comment or be unexported (golint)
    • Line 75: warning: exported function BuildUniqueId should have comment or be unexported (golint)
    • Line 79: warning: exported method ScanImageInfo.GetUniqueId should have comment or be unexported (golint)
    • Line 83: warning: exported method ScanImageInfo.HasId should have comment or be unexported (golint)
    • postee/layout/ticketLayout.go
    • Line 10: warning: exported function GenTestDescription should have comment or be unexported (golint)
    • Line 16: warning: exported function GenTicketDescription should have comment or be unexported (golint)
    • postee/formatting/slackmrkdwnprovider.go
    • Line 28: warning: exported type SlackMrkdwnProvider should have comment or be unexported (golint)
    • Line 30: warning: exported method SlackMrkdwnProvider.TitleH1 should have comment or be unexported (golint)
    • Line 34: warning: exported method SlackMrkdwnProvider.TitleH2 should have comment or be unexported (golint)
    • Line 38: warning: exported method SlackMrkdwnProvider.TitleH3 should have comment or be unexported (golint)
    • Line 42: warning: exported method SlackMrkdwnProvider.ColourText should have comment or be unexported (golint)
    • Line 46: warning: exported method SlackMrkdwnProvider.Table should have comment or be unexported (golint)
    • Line 138: warning: exported method SlackMrkdwnProvider.P should have comment or be unexported (golint)
    • Line 142: warning: exported method SlackMrkdwnProvider.A should have comment or be unexported (golint)
    • postee/regoservice/eval.go
    • Line 15: warning: don't use underscores in Go names; const result_prop should be resultProp (golint)
    • Line 16: warning: don't use underscores in Go names; const title_prop should be titleProp (golint)
    • Line 17: warning: don't use underscores in Go names; const aggregation_pkg_prop should be aggregationPkgProp (golint)
    • Line 87: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 100: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 167: warning: exported function BuildBundledRegoEvaluator should have comment or be unexported (golint)
    • Line 167: warning: don't use underscores in Go names; func parameter rego_package should be regoPackage (golint)
    • Line 186: warning: don't use underscores in Go names; func parameter rego_package should be regoPackage (golint)
    • Line 214: warning: don't use underscores in Go names; var aggregation_pkg_val should be aggregationPkgVal (golint)
    • Line 219: warning: don't use underscores in Go names; var aggregation_pkg should be aggregationPkg (golint)
    • Line 231: warning: exported function BuildExternalRegoEvaluator should have comment or be unexported (golint)
    • postee/msgservice/getuniqueid_test.go
    • Line 13: warning: don't use underscores in Go names; var unique_scan1 should be uniqueScan1 (golint)
    • Line 20: warning: don't use underscores in Go names; var unique_scan2 should be uniqueScan2 (golint)
    • Line 27: warning: don't use underscores in Go names; var non_unique_payload should be nonUniquePayload (golint)
    • postee/layout/colors.go
    • Line 3: warning: exported function CriticalColor should have comment or be unexported (golint)
    • Line 4: warning: exported function HighColor should have comment or be unexported (golint)
    • Line 5: warning: exported function MediumColor should have comment or be unexported (golint)
    • Line 6: warning: exported function LowColor should have comment or be unexported (golint)
    • Line 7: warning: exported function NegligibleColor should have comment or be unexported (golint)
    • postee/main.go
    • Line 18: warning: exported const URL should have comment (or a comment on this block) or be unexported (golint)
    • Line 22: warning: comment on exported const CFG_FILE should be of the form "CFG_FILE ..." (golint)
    • Line 92: warning: exported function Daemonize should have comment or be unexported (golint)
    • postee/router/loads_test.go
    • Line 92: warning: receiver name ctxWrapper should be consistent with previous receiver name ctx for ctxWrapper (golint)
    • Line 123: warning: receiver name ctxWrapper should be consistent with previous receiver name ctx for ctxWrapper (golint)
    • postee/outputs/jira.go
    • Line 21: warning: exported type JiraAPI should have comment or be unexported (golint)
    • Line 44: warning: exported method JiraAPI.GetName should have comment or be unexported (golint)
    • Line 98: warning: exported method JiraAPI.Terminate should have comment or be unexported (golint)
    • Line 103: warning: exported method JiraAPI.Init should have comment or be unexported (golint)
    • Line 116: warning: exported method JiraAPI.GetLayoutProvider should have comment or be unexported (golint)
    • Line 116: warning: receiver name jira should be consistent with previous receiver name ctx for JiraAPI (golint)
    • Line 138: warning: exported method JiraAPI.Send should have comment or be unexported (golint)
    • Line 274: warning: exported function InitIssue should have comment or be unexported (golint)
    • postee/servicenow/servicenow_base.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 4: warning: exported const BaseServer should have comment (or a comment on this block) or be unexported (golint)
    • Line 9: warning: exported type ServiceNowData should have comment or be unexported (golint)
    • postee/dbservice/dbparam.go
    • Line 12: warning: exported var DbBucketOutputStats should have comment or be unexported (golint)
    • Line 23: warning: exported function ChangeDbPath should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!