Preparing report...

Report for github.com/Shopify/kubeaudit

A+    Excellent!    Found 36 issues across 101 files

Tweet

gofmt98%

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


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!


gocyclo98%

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.


golint67%

Golint is a linter for Go source code.

    • kubeaudit/auditors/capabilities/capabilities.go
    • Line 13: warning: exported const Name should have comment or be unexported (golint)
    • Line 26: warning: exported var DefaultDropList should have comment or be unexported (golint)
    • Line 28: warning: exported var DefaultAllowAddList should have comment or be unexported (golint)
    • Line 35: warning: exported function New should have comment or be unexported (golint)
    • kubeaudit/internal/fix/fix.go
    • Line 10: warning: comment on exported type BySettingPodAnnotation should be of the form "BySettingPodAnnotation ..." (with optional leading article) (golint)
    • Line 34: warning: comment on exported type ByAddingPodAnnotation should be of the form "ByAddingPodAnnotation ..." (with optional leading article) (golint)
    • Line 58: warning: exported type ByRemovingPodAnnotation should have comment or be unexported (golint)
    • kubeaudit/auditors/hostns/hostns.go
    • Line 10: warning: exported const Name should have comment or be unexported (golint)
    • Line 24: warning: exported function New should have comment or be unexported (golint)
    • Line 28: warning: exported const HostNetworkOverrideLabel should have comment or be unexported (golint)
    • Line 29: warning: exported const HostIPCOverrideLabel should have comment or be unexported (golint)
    • Line 30: warning: exported const HostPIDOverrideLabel should have comment or be unexported (golint)
    • kubeaudit/auditors/privesc/privesc.go
    • Line 10: warning: exported const Name should have comment or be unexported (golint)
    • Line 21: warning: exported const OverrideLabel should have comment or be unexported (golint)
    • Line 26: warning: exported function New should have comment or be unexported (golint)
    • kubeaudit/auditors/nonroot/nonroot.go
    • Line 10: warning: exported const Name should have comment or be unexported (golint)
    • Line 27: warning: exported const OverrideLabel should have comment or be unexported (golint)
    • Line 32: warning: exported function New should have comment or be unexported (golint)
    • kubeaudit/internal/k8s/runtime.go
    • Line 23: warning: exported function DecodeResource should have comment or be unexported (golint)
    • Line 28: warning: exported function EncodeResource should have comment or be unexported (golint)
    • Line 35: warning: exported function GetContainers should have comment or be unexported (golint)
    • kubeaudit/auditors/all/all.go
    • Line 24: warning: exported var ErrUnknownAuditor should have comment or be unexported (golint)
    • Line 26: warning: exported var AuditorNames should have comment or be unexported (golint)
    • Line 42: warning: exported function Auditors should have comment or be unexported (golint)
    • kubeaudit/config/config.go
    • Line 14: warning: exported function New should have comment or be unexported (golint)
    • Line 29: warning: exported type KubeauditConfig should have comment or be unexported (golint)
    • Line 34: warning: exported method KubeauditConfig.GetEnabledAuditors should have comment or be unexported (golint)
    • Line 47: warning: exported method KubeauditConfig.GetAuditorConfigs should have comment or be unexported (golint)
    • Line 54: warning: exported type AuditorConfig should have comment or be unexported (golint)
    • kubeaudit/internal/color/color.go
    • Line 5: warning: exported var Reset should have comment or be unexported (golint)
    • Line 6: warning: exported var RedColor should have comment or be unexported (golint)
    • Line 7: warning: exported var GreenColor should have comment or be unexported (golint)
    • Line 8: warning: exported var YellowColor should have comment or be unexported (golint)
    • Line 9: warning: exported var BlueColor should have comment or be unexported (golint)
    • Line 10: warning: exported var PurpleColor should have comment or be unexported (golint)
    • Line 11: warning: exported var CyanColor should have comment or be unexported (golint)
    • Line 12: warning: exported var GrayColor should have comment or be unexported (golint)
    • Line 13: warning: exported var WhiteColor should have comment or be unexported (golint)
    • Line 15: warning: exported function Red should have comment or be unexported (golint)
    • Line 19: warning: exported function Green should have comment or be unexported (golint)
    • Line 23: warning: exported function Yellow should have comment or be unexported (golint)
    • Line 27: warning: exported function Blue should have comment or be unexported (golint)
    • Line 31: warning: exported function Purple should have comment or be unexported (golint)
    • Line 35: warning: exported function Cyan should have comment or be unexported (golint)
    • Line 39: warning: exported function Gray should have comment or be unexported (golint)
    • Line 43: warning: exported function White should have comment or be unexported (golint)
    • Line 47: warning: exported function Colored should have comment or be unexported (golint)
    • kubeaudit/internal/test/test.go
    • Line 22: warning: exported const MANIFEST_MODE should have comment or be unexported (golint)
    • Line 23: warning: exported const LOCAL_MODE should have comment or be unexported (golint)
    • Line 25: warning: exported function AuditManifest should have comment or be unexported (golint)
    • Line 29: warning: exported function AuditLocal should have comment or be unexported (golint)
    • Line 33: warning: exported function AuditMultiple should have comment or be unexported (golint)
    • Line 56: warning: exported function FixSetup should have comment or be unexported (golint)
    • Line 60: warning: comment on exported function FixSetupMultiple should be of the form "FixSetupMultiple ..." (golint)
    • Line 97: warning: exported function GetReport should have comment or be unexported (golint)
    • kubeaudit/auditors/capabilities/util.go
    • Line 63: warning: exported function IsDropAll should have comment or be unexported (golint)
    • Line 73: warning: exported function IsCapabilityInAddList should have comment or be unexported (golint)
    • Line 83: warning: exported function SecurityContextOrCapabilities should have comment or be unexported (golint)
    • kubeaudit/printer.go
    • Line 14: warning: exported type Printer should have comment or be unexported (golint)
    • Line 21: warning: exported type PrintOption should have comment or be unexported (golint)
    • Line 23: warning: exported function WithMinSeverity should have comment or be unexported (golint)
    • Line 29: warning: exported function WithWriter should have comment or be unexported (golint)
    • Line 35: warning: exported function WithFormatter should have comment or be unexported (golint)
    • Line 47: warning: exported function NewPrinter should have comment or be unexported (golint)
    • Line 59: warning: exported method Printer.PrintReport should have comment or be unexported (golint)
    • kubeaudit/internal/override/override.go
    • Line 110: warning: exported function GetPodOverrideLabel should have comment or be unexported (golint)
    • Line 114: warning: exported function GetNamespaceOverrideLabel should have comment or be unexported (golint)
    • Line 118: warning: exported function GetContainerOverrideLabel should have comment or be unexported (golint)
    • kubeaudit/auditors/netpols/netpols.go
    • Line 11: warning: exported const Name should have comment or be unexported (golint)
    • Line 30: warning: exported const IngressOverrideLabel should have comment (or a comment on this block) or be unexported (golint)
    • Line 39: warning: exported function New should have comment or be unexported (golint)
    • kubeaudit/auditors/asat/asat.go
    • Line 10: warning: exported const Name should have comment or be unexported (golint)
    • Line 20: warning: exported const OverrideLabel should have comment or be unexported (golint)
    • Line 25: warning: exported function New should have comment or be unexported (golint)
    • kubeaudit/auditors/mounts/mounts.go
    • Line 12: warning: exported const Name should have comment or be unexported (golint)
    • Line 25: warning: exported const MountNameMetadataKey should have comment (or a comment on this block) or be unexported (golint)
    • Line 37: warning: exported function New should have comment or be unexported (golint)
    • kubeaudit/result.go
    • Line 23: warning: exported type SeverityLevel should have comment or be unexported (golint)
    • Line 47: warning: exported method AuditResult.Fix should have comment or be unexported (golint)
    • Line 55: warning: exported method AuditResult.FixPlan should have comment or be unexported (golint)
    • kubeaudit/auditors/rootfs/rootfs.go
    • Line 10: warning: exported const Name should have comment or be unexported (golint)
    • Line 20: warning: exported const OverrideLabel should have comment or be unexported (golint)
    • Line 25: warning: exported function New should have comment or be unexported (golint)
    • kubeaudit/auditors/limits/config.go
    • Line 9: warning: exported type Config should have comment or be unexported (golint)
    • Line 14: warning: exported method Config.GetCPU should have comment or be unexported (golint)
    • Line 29: warning: exported method Config.GetMemory should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign99%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!