Documentation
¶
Index ¶
- type ArchitectureComplexityRule
- func (ArchitectureComplexityRule) Category() string
- func (ArchitectureComplexityRule) Description() string
- func (ArchitectureComplexityRule) ID() string
- func (ArchitectureComplexityRule) Name() string
- func (ArchitectureComplexityRule) Run(_ context.Context, rctx Context) ([]report.Finding, error)
- func (ArchitectureComplexityRule) Severity() report.Severity
- type ArchitectureRule
- func (r ArchitectureRule) Category() string
- func (r ArchitectureRule) Description() string
- func (r ArchitectureRule) ID() string
- func (r ArchitectureRule) Name() string
- func (r ArchitectureRule) Run(_ context.Context, rctx Context) ([]report.Finding, error)
- func (r ArchitectureRule) Severity() report.Severity
- type ConfigValidationRule
- func (ConfigValidationRule) Category() string
- func (ConfigValidationRule) Description() string
- func (ConfigValidationRule) ID() string
- func (ConfigValidationRule) Name() string
- func (r ConfigValidationRule) Run(_ context.Context, rctx Context) ([]report.Finding, error)
- func (ConfigValidationRule) Severity() report.Severity
- type ConfigurationLintRule
- func (ConfigurationLintRule) Category() string
- func (ConfigurationLintRule) Description() string
- func (ConfigurationLintRule) ID() string
- func (ConfigurationLintRule) Name() string
- func (ConfigurationLintRule) Run(_ context.Context, rctx Context) ([]report.Finding, error)
- func (ConfigurationLintRule) Severity() report.Severity
- type Context
- type DependenciesRule
- func (DependenciesRule) Category() string
- func (DependenciesRule) Description() string
- func (DependenciesRule) ID() string
- func (DependenciesRule) Name() string
- func (r DependenciesRule) Run(_ context.Context, rctx Context) ([]report.Finding, error)
- func (DependenciesRule) Severity() report.Severity
- type DockerBestPracticesRule
- func (DockerBestPracticesRule) Category() string
- func (DockerBestPracticesRule) Description() string
- func (DockerBestPracticesRule) ID() string
- func (DockerBestPracticesRule) Name() string
- func (DockerBestPracticesRule) Run(_ context.Context, rctx Context) ([]report.Finding, error)
- func (DockerBestPracticesRule) Severity() report.Severity
- type DockerRule
- type DocumentationCompletenessRule
- func (DocumentationCompletenessRule) Category() string
- func (DocumentationCompletenessRule) Description() string
- func (DocumentationCompletenessRule) ID() string
- func (DocumentationCompletenessRule) Name() string
- func (DocumentationCompletenessRule) Run(_ context.Context, rctx Context) ([]report.Finding, error)
- func (DocumentationCompletenessRule) Severity() report.Severity
- type EnvFileRule
- type FeaturesConsistencyRule
- func (FeaturesConsistencyRule) Category() string
- func (FeaturesConsistencyRule) Description() string
- func (FeaturesConsistencyRule) ID() string
- func (FeaturesConsistencyRule) Name() string
- func (r FeaturesConsistencyRule) Run(_ context.Context, rctx Context) ([]report.Finding, error)
- func (FeaturesConsistencyRule) Severity() report.Severity
- type GitRule
- type GoModRule
- type GoVersionRule
- type GracefulShutdownRule
- func (GracefulShutdownRule) Category() string
- func (GracefulShutdownRule) Description() string
- func (GracefulShutdownRule) ID() string
- func (GracefulShutdownRule) Name() string
- func (GracefulShutdownRule) Run(_ context.Context, rctx Context) ([]report.Finding, error)
- func (GracefulShutdownRule) Severity() report.Severity
- type PostgreSQLRule
- type Registry
- type Rule
- type SecurityCORSRule
- func (SecurityCORSRule) Category() string
- func (SecurityCORSRule) Description() string
- func (SecurityCORSRule) ID() string
- func (SecurityCORSRule) Name() string
- func (r SecurityCORSRule) Run(_ context.Context, rctx Context) ([]report.Finding, error)
- func (SecurityCORSRule) Severity() report.Severity
- type SecurityHardcodedIPRule
- func (SecurityHardcodedIPRule) Category() string
- func (SecurityHardcodedIPRule) Description() string
- func (SecurityHardcodedIPRule) ID() string
- func (SecurityHardcodedIPRule) Name() string
- func (r SecurityHardcodedIPRule) Run(_ context.Context, rctx Context) ([]report.Finding, error)
- func (SecurityHardcodedIPRule) Severity() report.Severity
- type SecuritySQLInjectionRule
- func (SecuritySQLInjectionRule) Category() string
- func (SecuritySQLInjectionRule) Description() string
- func (SecuritySQLInjectionRule) ID() string
- func (SecuritySQLInjectionRule) Name() string
- func (r SecuritySQLInjectionRule) Run(_ context.Context, rctx Context) ([]report.Finding, error)
- func (SecuritySQLInjectionRule) Severity() report.Severity
- type SecuritySecretsRule
- func (SecuritySecretsRule) Category() string
- func (SecuritySecretsRule) Description() string
- func (SecuritySecretsRule) ID() string
- func (SecuritySecretsRule) Name() string
- func (r SecuritySecretsRule) Run(_ context.Context, rctx Context) ([]report.Finding, error)
- func (SecuritySecretsRule) Severity() report.Severity
- type SecuritySensitiveFilesRule
- func (SecuritySensitiveFilesRule) Category() string
- func (SecuritySensitiveFilesRule) Description() string
- func (SecuritySensitiveFilesRule) ID() string
- func (SecuritySensitiveFilesRule) Name() string
- func (SecuritySensitiveFilesRule) Run(_ context.Context, rctx Context) ([]report.Finding, error)
- func (SecuritySensitiveFilesRule) Severity() report.Severity
- type SecurityWeakCryptoRule
- func (SecurityWeakCryptoRule) Category() string
- func (SecurityWeakCryptoRule) Description() string
- func (SecurityWeakCryptoRule) ID() string
- func (SecurityWeakCryptoRule) Name() string
- func (r SecurityWeakCryptoRule) Run(_ context.Context, rctx Context) ([]report.Finding, error)
- func (SecurityWeakCryptoRule) Severity() report.Severity
- type SecurityXSSRule
- type StaticConfigLoader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArchitectureComplexityRule ¶ added in v0.3.1
type ArchitectureComplexityRule struct{}
ArchitectureComplexityRule checks for overly complex packages
func (ArchitectureComplexityRule) Category ¶ added in v0.3.1
func (ArchitectureComplexityRule) Category() string
func (ArchitectureComplexityRule) Description ¶ added in v0.3.1
func (ArchitectureComplexityRule) Description() string
func (ArchitectureComplexityRule) ID ¶ added in v0.3.1
func (ArchitectureComplexityRule) ID() string
func (ArchitectureComplexityRule) Name ¶ added in v0.3.1
func (ArchitectureComplexityRule) Name() string
func (ArchitectureComplexityRule) Severity ¶ added in v0.3.1
func (ArchitectureComplexityRule) Severity() report.Severity
type ArchitectureRule ¶
type ArchitectureRule struct {
Rules []config.ArchitectureRule
}
ArchitectureRule checks layer import violations.
func (ArchitectureRule) Category ¶
func (r ArchitectureRule) Category() string
func (ArchitectureRule) Description ¶
func (r ArchitectureRule) Description() string
func (ArchitectureRule) ID ¶
func (r ArchitectureRule) ID() string
func (ArchitectureRule) Name ¶
func (r ArchitectureRule) Name() string
func (ArchitectureRule) Severity ¶
func (r ArchitectureRule) Severity() report.Severity
type ConfigValidationRule ¶ added in v0.3.0
type ConfigValidationRule struct{}
ConfigValidationRule validates project configuration.
func (ConfigValidationRule) Category ¶ added in v0.3.0
func (ConfigValidationRule) Category() string
func (ConfigValidationRule) Description ¶ added in v0.3.0
func (ConfigValidationRule) Description() string
func (ConfigValidationRule) ID ¶ added in v0.3.0
func (ConfigValidationRule) ID() string
func (ConfigValidationRule) Name ¶ added in v0.3.0
func (ConfigValidationRule) Name() string
func (ConfigValidationRule) Severity ¶ added in v0.3.0
func (ConfigValidationRule) Severity() report.Severity
type ConfigurationLintRule ¶ added in v0.3.1
type ConfigurationLintRule struct{}
ConfigurationLintRule checks for common configuration issues
func (ConfigurationLintRule) Category ¶ added in v0.3.1
func (ConfigurationLintRule) Category() string
func (ConfigurationLintRule) Description ¶ added in v0.3.1
func (ConfigurationLintRule) Description() string
func (ConfigurationLintRule) ID ¶ added in v0.3.1
func (ConfigurationLintRule) ID() string
func (ConfigurationLintRule) Name ¶ added in v0.3.1
func (ConfigurationLintRule) Name() string
func (ConfigurationLintRule) Severity ¶ added in v0.3.1
func (ConfigurationLintRule) Severity() report.Severity
type DependenciesRule ¶ added in v0.3.0
type DependenciesRule struct{}
DependenciesRule checks Go module dependencies.
func (DependenciesRule) Category ¶ added in v0.3.0
func (DependenciesRule) Category() string
func (DependenciesRule) Description ¶ added in v0.3.0
func (DependenciesRule) Description() string
func (DependenciesRule) ID ¶ added in v0.3.0
func (DependenciesRule) ID() string
func (DependenciesRule) Name ¶ added in v0.3.0
func (DependenciesRule) Name() string
func (DependenciesRule) Severity ¶ added in v0.3.0
func (DependenciesRule) Severity() report.Severity
type DockerBestPracticesRule ¶ added in v0.3.1
type DockerBestPracticesRule struct{}
DockerBestPracticesRule checks Docker configuration best practices
func (DockerBestPracticesRule) Category ¶ added in v0.3.1
func (DockerBestPracticesRule) Category() string
func (DockerBestPracticesRule) Description ¶ added in v0.3.1
func (DockerBestPracticesRule) Description() string
func (DockerBestPracticesRule) ID ¶ added in v0.3.1
func (DockerBestPracticesRule) ID() string
func (DockerBestPracticesRule) Name ¶ added in v0.3.1
func (DockerBestPracticesRule) Name() string
func (DockerBestPracticesRule) Severity ¶ added in v0.3.1
func (DockerBestPracticesRule) Severity() report.Severity
type DockerRule ¶
type DockerRule struct{}
func (DockerRule) Category ¶
func (DockerRule) Category() string
func (DockerRule) Description ¶
func (DockerRule) Description() string
func (DockerRule) ID ¶
func (DockerRule) ID() string
func (DockerRule) Name ¶
func (DockerRule) Name() string
func (DockerRule) Severity ¶
func (DockerRule) Severity() report.Severity
type DocumentationCompletenessRule ¶ added in v0.3.1
type DocumentationCompletenessRule struct{}
DocumentationCompletenessRule checks documentation completeness
func (DocumentationCompletenessRule) Category ¶ added in v0.3.1
func (DocumentationCompletenessRule) Category() string
func (DocumentationCompletenessRule) Description ¶ added in v0.3.1
func (DocumentationCompletenessRule) Description() string
func (DocumentationCompletenessRule) ID ¶ added in v0.3.1
func (DocumentationCompletenessRule) ID() string
func (DocumentationCompletenessRule) Name ¶ added in v0.3.1
func (DocumentationCompletenessRule) Name() string
func (DocumentationCompletenessRule) Severity ¶ added in v0.3.1
func (DocumentationCompletenessRule) Severity() report.Severity
type EnvFileRule ¶
type EnvFileRule struct{}
func (EnvFileRule) Category ¶
func (EnvFileRule) Category() string
func (EnvFileRule) Description ¶
func (EnvFileRule) Description() string
func (EnvFileRule) ID ¶
func (EnvFileRule) ID() string
func (EnvFileRule) Name ¶
func (EnvFileRule) Name() string
func (EnvFileRule) Severity ¶
func (EnvFileRule) Severity() report.Severity
type FeaturesConsistencyRule ¶ added in v0.3.0
type FeaturesConsistencyRule struct{}
FeaturesConsistencyRule checks consistency of installed features.
func (FeaturesConsistencyRule) Category ¶ added in v0.3.0
func (FeaturesConsistencyRule) Category() string
func (FeaturesConsistencyRule) Description ¶ added in v0.3.0
func (FeaturesConsistencyRule) Description() string
func (FeaturesConsistencyRule) ID ¶ added in v0.3.0
func (FeaturesConsistencyRule) ID() string
func (FeaturesConsistencyRule) Name ¶ added in v0.3.0
func (FeaturesConsistencyRule) Name() string
func (FeaturesConsistencyRule) Severity ¶ added in v0.3.0
func (FeaturesConsistencyRule) Severity() report.Severity
type GoVersionRule ¶
type GoVersionRule struct{}
func (GoVersionRule) Category ¶
func (GoVersionRule) Category() string
func (GoVersionRule) Description ¶
func (GoVersionRule) Description() string
func (GoVersionRule) ID ¶
func (GoVersionRule) ID() string
func (GoVersionRule) Name ¶
func (GoVersionRule) Name() string
func (GoVersionRule) Severity ¶
func (GoVersionRule) Severity() report.Severity
type GracefulShutdownRule ¶
type GracefulShutdownRule struct{}
func (GracefulShutdownRule) Category ¶
func (GracefulShutdownRule) Category() string
func (GracefulShutdownRule) Description ¶
func (GracefulShutdownRule) Description() string
func (GracefulShutdownRule) ID ¶
func (GracefulShutdownRule) ID() string
func (GracefulShutdownRule) Name ¶
func (GracefulShutdownRule) Name() string
func (GracefulShutdownRule) Severity ¶
func (GracefulShutdownRule) Severity() report.Severity
type PostgreSQLRule ¶ added in v0.3.0
type PostgreSQLRule struct{}
PostgreSQLRule checks PostgreSQL connectivity and configuration.
func (PostgreSQLRule) Category ¶ added in v0.3.0
func (PostgreSQLRule) Category() string
func (PostgreSQLRule) Description ¶ added in v0.3.0
func (PostgreSQLRule) Description() string
func (PostgreSQLRule) ID ¶ added in v0.3.0
func (PostgreSQLRule) ID() string
func (PostgreSQLRule) Name ¶ added in v0.3.0
func (PostgreSQLRule) Name() string
func (PostgreSQLRule) Severity ¶ added in v0.3.0
func (PostgreSQLRule) Severity() report.Severity
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry holds ordered rules.
func AnalyzeRules ¶
func AnalyzeRules(cfg configLoader) *Registry
func CheckRules ¶
func CheckRules(cfg configLoader) *Registry
func DoctorRules ¶
func DoctorRules() *Registry
func NewRegistry ¶
type Rule ¶
type Rule interface {
ID() string
Name() string
Description() string
Category() string
Severity() report.Severity
Run(ctx context.Context, rctx Context) ([]report.Finding, error)
}
Rule is a pluggable diagnostic rule.
type SecurityCORSRule ¶
type SecurityCORSRule struct{}
SecurityCORSRule detects permissive CORS patterns in source.
func (SecurityCORSRule) Category ¶
func (SecurityCORSRule) Category() string
func (SecurityCORSRule) Description ¶
func (SecurityCORSRule) Description() string
func (SecurityCORSRule) ID ¶
func (SecurityCORSRule) ID() string
func (SecurityCORSRule) Name ¶
func (SecurityCORSRule) Name() string
func (SecurityCORSRule) Severity ¶
func (SecurityCORSRule) Severity() report.Severity
type SecurityHardcodedIPRule ¶ added in v0.3.1
type SecurityHardcodedIPRule struct{}
SecurityHardcodedIPRule detects hardcoded IP addresses.
func (SecurityHardcodedIPRule) Category ¶ added in v0.3.1
func (SecurityHardcodedIPRule) Category() string
func (SecurityHardcodedIPRule) Description ¶ added in v0.3.1
func (SecurityHardcodedIPRule) Description() string
func (SecurityHardcodedIPRule) ID ¶ added in v0.3.1
func (SecurityHardcodedIPRule) ID() string
func (SecurityHardcodedIPRule) Name ¶ added in v0.3.1
func (SecurityHardcodedIPRule) Name() string
func (SecurityHardcodedIPRule) Severity ¶ added in v0.3.1
func (SecurityHardcodedIPRule) Severity() report.Severity
type SecuritySQLInjectionRule ¶ added in v0.3.1
type SecuritySQLInjectionRule struct{}
func (SecuritySQLInjectionRule) Category ¶ added in v0.3.1
func (SecuritySQLInjectionRule) Category() string
func (SecuritySQLInjectionRule) Description ¶ added in v0.3.1
func (SecuritySQLInjectionRule) Description() string
func (SecuritySQLInjectionRule) ID ¶ added in v0.3.1
func (SecuritySQLInjectionRule) ID() string
func (SecuritySQLInjectionRule) Name ¶ added in v0.3.1
func (SecuritySQLInjectionRule) Name() string
func (SecuritySQLInjectionRule) Severity ¶ added in v0.3.1
func (SecuritySQLInjectionRule) Severity() report.Severity
type SecuritySecretsRule ¶
type SecuritySecretsRule struct{}
SecuritySecretsRule detects potential hardcoded secrets with reduced false positives.
func (SecuritySecretsRule) Category ¶
func (SecuritySecretsRule) Category() string
func (SecuritySecretsRule) Description ¶
func (SecuritySecretsRule) Description() string
func (SecuritySecretsRule) ID ¶
func (SecuritySecretsRule) ID() string
func (SecuritySecretsRule) Name ¶
func (SecuritySecretsRule) Name() string
func (SecuritySecretsRule) Severity ¶
func (SecuritySecretsRule) Severity() report.Severity
type SecuritySensitiveFilesRule ¶
type SecuritySensitiveFilesRule struct{}
SecuritySensitiveFilesRule warns when sensitive files may be committed.
func (SecuritySensitiveFilesRule) Category ¶
func (SecuritySensitiveFilesRule) Category() string
func (SecuritySensitiveFilesRule) Description ¶
func (SecuritySensitiveFilesRule) Description() string
func (SecuritySensitiveFilesRule) ID ¶
func (SecuritySensitiveFilesRule) ID() string
func (SecuritySensitiveFilesRule) Name ¶
func (SecuritySensitiveFilesRule) Name() string
func (SecuritySensitiveFilesRule) Severity ¶
func (SecuritySensitiveFilesRule) Severity() report.Severity
type SecurityWeakCryptoRule ¶ added in v0.3.1
type SecurityWeakCryptoRule struct{}
SecurityWeakCryptoRule detects weak cryptographic practices.
func (SecurityWeakCryptoRule) Category ¶ added in v0.3.1
func (SecurityWeakCryptoRule) Category() string
func (SecurityWeakCryptoRule) Description ¶ added in v0.3.1
func (SecurityWeakCryptoRule) Description() string
func (SecurityWeakCryptoRule) ID ¶ added in v0.3.1
func (SecurityWeakCryptoRule) ID() string
func (SecurityWeakCryptoRule) Name ¶ added in v0.3.1
func (SecurityWeakCryptoRule) Name() string
func (SecurityWeakCryptoRule) Severity ¶ added in v0.3.1
func (SecurityWeakCryptoRule) Severity() report.Severity
type SecurityXSSRule ¶ added in v0.3.1
type SecurityXSSRule struct{}
SecurityXSSRule detects potential XSS vulnerabilities.
func (SecurityXSSRule) Category ¶ added in v0.3.1
func (SecurityXSSRule) Category() string
func (SecurityXSSRule) Description ¶ added in v0.3.1
func (SecurityXSSRule) Description() string
func (SecurityXSSRule) ID ¶ added in v0.3.1
func (SecurityXSSRule) ID() string
func (SecurityXSSRule) Name ¶ added in v0.3.1
func (SecurityXSSRule) Name() string
func (SecurityXSSRule) Severity ¶ added in v0.3.1
func (SecurityXSSRule) Severity() report.Severity
type StaticConfigLoader ¶
type StaticConfigLoader struct {
Rules []config.ArchitectureRule
}
StaticConfigLoader wraps fixed rules for tests.
func (StaticConfigLoader) ArchitectureRules ¶
func (s StaticConfigLoader) ArchitectureRules() []config.ArchitectureRule