Preparing report...

Report for github.com/aquasecurity/cfsec

A+    Excellent!    Found 78 issues across 291 files

Tweet

gofmt92%

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!


gocyclo100%

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.

No problems detected. Good job!


golint77%

Golint is a linter for Go source code.

    • cfsec/internal/app/cfsec/scanner/option.go
    • Line 3: warning: exported type Option should have comment or be unexported (golint)
    • Line 5: warning: exported function OptionIncludePassed should have comment or be unexported (golint)
    • Line 11: warning: exported function OptionIncludeIgnored should have comment or be unexported (golint)
    • Line 17: warning: exported function OptionExcludeRules should have comment or be unexported (golint)
    • Line 23: warning: exported function OptionIgnoreCheckErrors should have comment or be unexported (golint)
    • Line 29: warning: exported function OptionWithWorkspaceName should have comment or be unexported (golint)
    • cfsec/internal/app/cfsec/parser/property_helpers.go
    • Line 10: warning: exported method Property.IsNil should have comment or be unexported (golint)
    • Line 14: warning: exported method Property.IsNotNil should have comment or be unexported (golint)
    • Line 18: warning: exported method Property.IsString should have comment or be unexported (golint)
    • Line 31: warning: exported method Property.IsNotString should have comment or be unexported (golint)
    • Line 35: warning: exported method Property.IsInt should have comment or be unexported (golint)
    • Line 48: warning: exported method Property.IsNotInt should have comment or be unexported (golint)
    • Line 52: warning: exported method Property.IsMap should have comment or be unexported (golint)
    • Line 59: warning: exported method Property.IsNotMap should have comment or be unexported (golint)
    • Line 63: warning: exported method Property.IsList should have comment or be unexported (golint)
    • Line 76: warning: exported method Property.IsNotList should have comment or be unexported (golint)
    • Line 80: warning: exported method Property.IsBool should have comment or be unexported (golint)
    • Line 93: warning: exported method Property.IsNotBool should have comment or be unexported (golint)
    • Line 97: warning: exported method Property.AsString should have comment or be unexported (golint)
    • Line 107: warning: exported method Property.AsStringValue should have comment or be unexported (golint)
    • Line 111: warning: exported method Property.AsInt should have comment or be unexported (golint)
    • Line 118: warning: exported method Property.AsIntValue should have comment or be unexported (golint)
    • Line 122: warning: exported method Property.AsBool should have comment or be unexported (golint)
    • Line 129: warning: exported method Property.AsBoolValue should have comment or be unexported (golint)
    • Line 133: warning: exported method Property.AsMap should have comment or be unexported (golint)
    • Line 137: warning: exported method Property.AsList should have comment or be unexported (golint)
    • Line 144: warning: exported method Property.EqualTo should have comment or be unexported (golint)
    • Line 174: warning: exported method Property.IsTrue should have comment or be unexported (golint)
    • Line 182: warning: exported method Property.IsEmpty should have comment or be unexported (golint)
    • Line 198: warning: exported method Property.Contains should have comment or be unexported (golint)
    • cfsec/internal/app/cfsec/parser/property.go
    • Line 12: warning: exported type EqualityOptions should have comment or be unexported (golint)
    • Line 15: warning: exported const IgnoreCase should have comment (or a comment on this block) or be unexported (golint)
    • Line 18: warning: exported type Property should have comment or be unexported (golint)
    • Line 27: warning: exported type PropertyInner should have comment or be unexported (golint)
    • Line 86: warning: exported method Property.UnmarshalYAML should have comment or be unexported (golint)
    • Line 93: warning: exported method Property.UnmarshalJSONWithMetadata should have comment or be unexported (golint)
    • Line 98: warning: exported method Property.Type should have comment or be unexported (golint)
    • Line 102: warning: exported method Property.Range should have comment or be unexported (golint)
    • Line 105: warning: exported method Property.Metadata should have comment or be unexported (golint)
    • Line 110: warning: exported method Property.MetadataWithValue should have comment or be unexported (golint)
    • Line 129: warning: exported method Property.AsRawStrings should have comment or be unexported (golint)
    • Line 141: warning: exported method Property.GetStringProperty should have comment or be unexported (golint)
    • Line 155: warning: exported method Property.GetBoolProperty should have comment or be unexported (golint)
    • Line 169: warning: exported method Property.GetIntProperty should have comment or be unexported (golint)
    • Line 183: warning: exported method Property.StringDefault should have comment or be unexported (golint)
    • Line 187: warning: exported method Property.BoolDefault should have comment or be unexported (golint)
    • Line 191: warning: exported method Property.IntDefault should have comment or be unexported (golint)
    • cfsec/internal/app/cfsec/testutil/filesystem/fs.go
    • Line 11: warning: exported type FileSystem should have comment or be unexported (golint)
    • Line 15: warning: exported function New should have comment or be unexported (golint)
    • Line 35: warning: exported method FileSystem.RealPath should have comment or be unexported (golint)
    • Line 39: warning: exported method FileSystem.Close should have comment or be unexported (golint)
    • Line 43: warning: exported method FileSystem.AddDir should have comment or be unexported (golint)
    • Line 47: warning: exported method FileSystem.WriteFile should have comment or be unexported (golint)
    • Line 54: warning: exported method FileSystem.WriteTextFile should have comment or be unexported (golint)
    • cfsec/internal/app/cfsec/parser/parser.go
    • Line 16: warning: exported type Parser should have comment or be unexported (golint)
    • Line 18: warning: exported function ParseFiles should have comment or be unexported (golint)
    • Line 90: warning: exported function ParseDirectory should have comment or be unexported (golint)
    • cfsec/internal/app/cfsec/parser/resource.go
    • Line 12: warning: exported type Resource should have comment or be unexported (golint)
    • Line 20: warning: exported type ResourceInner should have comment or be unexported (golint)
    • Line 25: warning: exported method Resource.ConfigureResource should have comment or be unexported (golint)
    • Line 60: warning: exported method Resource.UnmarshalYAML should have comment or be unexported (golint)
    • Line 66: warning: exported method Resource.UnmarshalJSONWithMetadata should have comment or be unexported (golint)
    • Line 71: warning: exported method Resource.ID should have comment or be unexported (golint)
    • Line 75: warning: exported method Resource.Type should have comment or be unexported (golint)
    • Line 79: warning: exported method Resource.Range should have comment or be unexported (golint)
    • Line 83: warning: exported method Resource.SourceFormat should have comment or be unexported (golint)
    • Line 87: warning: exported method Resource.Metadata should have comment or be unexported (golint)
    • Line 95: warning: exported method Resource.IsNil should have comment or be unexported (golint)
    • Line 126: warning: exported method Resource.GetStringProperty should have comment or be unexported (golint)
    • Line 140: warning: exported method Resource.GetBoolProperty should have comment or be unexported (golint)
    • Line 154: warning: exported method Resource.GetIntProperty should have comment or be unexported (golint)
    • Line 168: warning: exported method Resource.StringDefault should have comment or be unexported (golint)
    • Line 172: warning: exported method Resource.BoolDefault should have comment or be unexported (golint)
    • Line 176: warning: exported method Resource.IntDefault should have comment or be unexported (golint)
    • cfsec/internal/app/cfsec/parser/file_context.go
    • Line 7: warning: exported type SourceFormat should have comment or be unexported (golint)
    • Line 10: warning: exported const YamlSourceFormat should have comment (or a comment on this block) or be unexported (golint)
    • Line 14: warning: exported type FileContexts should have comment or be unexported (golint)
    • Line 16: warning: exported type FileContext should have comment or be unexported (golint)
    • Line 26: warning: exported method FileContext.GetResourceByLogicalID should have comment or be unexported (golint)
    • Line 35: warning: exported method FileContext.GetResourceByType should have comment or be unexported (golint)
    • Line 48: warning: exported method FileContext.Metadata should have comment or be unexported (golint)
    • cfsec/internal/app/cfsec/parser/parameter.go
    • Line 9: warning: exported type Parameter should have comment or be unexported (golint)
    • Line 18: warning: exported method Parameter.UnmarshalYAML should have comment or be unexported (golint)
    • Line 22: warning: exported method Parameter.UnmarshalJSONWithMetadata should have comment or be unexported (golint)
    • Line 26: warning: exported method Parameter.Type should have comment or be unexported (golint)
    • Line 37: warning: exported method Parameter.Default should have comment or be unexported (golint)
    • cfsec/internal/app/cfsec/scanner/scanner.go
    • Line 16: warning: exported function RegisterCheckRule should have comment or be unexported (golint)
    • Line 20: warning: exported type Scanner should have comment or be unexported (golint)
    • Line 38: warning: exported method Scanner.Scan should have comment or be unexported (golint)
    • Line 64: warning: exported function GetRuleById should have comment or be unexported (golint)
    • cfsec/internal/app/cfsec/test/runner.go
    • Line 16: warning: exported function RunPassingExamplesTest should have comment or be unexported (golint)
    • Line 35: warning: exported function RunFailureExamplesTest should have comment or be unexported (golint)
    • Line 60: warning: exported function CreateFileContexts should have comment or be unexported (golint)
    • cfsec/internal/app/cfsec/parser/reference.go
    • Line 7: warning: exported type CFReference should have comment or be unexported (golint)
    • Line 12: warning: exported function NewCFReference should have comment or be unexported (golint)
    • Line 18: warning: exported function NewCFReferenceWithValue should have comment or be unexported (golint)
    • Line 29: warning: exported method CFReference.RefersTo should have comment or be unexported (golint)
    • Line 33: warning: exported method CFReference.ResourceRange should have comment or be unexported (golint)
    • Line 37: warning: exported method CFReference.ResolvedAttributeValue should have comment or be unexported (golint)
    • cfsec/internal/app/cfsec/parser/intrinsics.go
    • Line 32: warning: exported function PassthroughResolution should have comment or be unexported (golint)
    • Line 34: warning: exported function IsIntrinsicFunc should have comment or be unexported (golint)
    • Line 47: warning: exported function IsIntrinsic should have comment or be unexported (golint)
    • Line 56: warning: exported function ResolveIntrinsicFunc should have comment or be unexported (golint)
    • cfsec/internal/app/cfsec/parser/fn_find_in_map.go
    • Line 10: warning: exported function ResolveFindInMap should have comment or be unexported (golint)
    • Line 45: 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)
    • cfsec/internal/app/cfsec/testutil/util.go
    • Line 12: warning: exported type TestFileExt should have comment or be unexported (golint)
    • Line 15: warning: exported const YamlTestFileExt should have comment (or a comment on this block) or be unexported (golint)
    • Line 19: warning: exported function AssertCheckCode should have comment or be unexported (golint)
    • Line 42: warning: exported function CreateTestFile should have comment or be unexported (golint)

ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!