Skip to content

Commit

Permalink
change some IDs (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
Owen Rumney authored Dec 22, 2021
1 parent 9a44f3e commit 6ad753e
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
7 changes: 5 additions & 2 deletions loader/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ func GetProvidersHierarchy() (providers map[string]map[string][]string) {

for _, rule := range registeredRules {

cNames := make(map[string]bool)
pName := strings.ToLower(rule.Rule().Provider.DisplayName())
sName := strings.ToLower(rule.Rule().Service)
cName := rule.Rule().AVDID
Expand All @@ -42,13 +43,15 @@ func GetProvidersHierarchy() (providers map[string]map[string][]string) {
provs[pName][sName] = make([]string, 0)
}

provs[pName][sName] = append(provs[pName][sName], cName)
if _, ok := cNames[cName]; !ok {
cNames[cName] = true
provs[pName][sName] = append(provs[pName][sName], cName)
}
}

return provs
}


func GetProviders() (providers []Provider) {

registeredRules := rules.GetRegistered()
Expand Down
2 changes: 1 addition & 1 deletion rules/aws/elasticsearch/use_secure_tls_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

var CheckUseSecureTlsPolicy = rules.Register(
rules.Rule{
AVDID: "AVD-AWS-0047",
AVDID: "AVD-AWS-0126",
Provider: provider.AWSProvider,
Service: "elastic-search",
ShortCode: "use-secure-tls-policy",
Expand Down
2 changes: 1 addition & 1 deletion rules/aws/redshift/non_default_vpc_deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

var CheckUsesVPC = rules.Register(
rules.Rule{
AVDID: "AVD-AWS-0085",
AVDID: "AVD-AWS-0127",
Provider: provider.AWSProvider,
Service: "redshift",
ShortCode: "use-vpc",
Expand Down
6 changes: 3 additions & 3 deletions rules/aws/sam/enable_function_tracing.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ import (

var CheckEnableFunctionTracing = rules.Register(
rules.Rule{
AVDID: "AVD-AWS-0113",
AVDID: "AVD-AWS-0125",
Provider: provider.AWSProvider,
Service: "sam",
ShortCode: "enable-function-tracing",
Summary: "SAM Function must have X-Ray tracing enabled",
Impact: "Without full tracing enabled it is difficult to trace the flow of logs",
Resolution: "Enable tracing",
Explanation: `X-Ray tracing enables end-to-end debugging and analysis of the function.`,
Links: []string{
Links: []string{
"https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-resource-function.html#sam-function-tracing",
},
Severity: severity.Low,
Severity: severity.Low,
},
func(s *state.State) (results rules.Results) {
for _, function := range s.AWS.SAM.Functions {
Expand Down
2 changes: 1 addition & 1 deletion rules/aws/vpc/add_description_to_security_group_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

var CheckAddDescriptionToSecurityGroupRule = rules.Register(
rules.Rule{
AVDID: "AVD-AWS-0099",
AVDID: "AVD-AWS-0124",
Provider: provider.AWSProvider,
Service: "vpc",
ShortCode: "add-description-to-security-group-rule",
Expand Down

0 comments on commit 6ad753e

Please sign in to comment.