Skip to content

Commit

Permalink
updated matchers
Browse files Browse the repository at this point in the history
  • Loading branch information
princechaddha committed Dec 23, 2024
1 parent 5642c6b commit 16d015c
Show file tree
Hide file tree
Showing 25 changed files with 1 addition and 35 deletions.
2 changes: 0 additions & 2 deletions cloud/alibaba/ack/ack-cluster-api-public.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,11 @@ code:
matchers-condition: and
matchers:
- type: word
part: body
words:
- 'master_url":'
- 'api_server_endpoint\":\"'

- type: word
part: body
words:
- 'api_server_endpoint\":\"\",'
negative: true
1 change: 0 additions & 1 deletion cloud/alibaba/ack/ack-cluster-auditing-disable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ code:
matchers:
- type: regex
part: body
regex:
- '"AuditProjectName"\s*:\s*""'

Expand Down
1 change: 0 additions & 1 deletion cloud/alibaba/ack/ack-cluster-cloud-monitor-disable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ code:
matchers:
- type: word
part: body
words:
- 'kubernetes_config":'
- 'cms_enabled": false'
Expand Down
2 changes: 0 additions & 2 deletions cloud/alibaba/ack/ack-cluster-health-disable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,11 @@ code:
matchers-condition: and
matchers:
- type: word
part: body
words:
- 'check_id":'
- 'status":'

- type: word
part: body
words:
- '"status": "Succeeded'
negative: true
Expand Down
2 changes: 0 additions & 2 deletions cloud/alibaba/ack/ack-cluster-network-policies-disable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ code:
matchers:
- type: word
part: body
words:
- '"Network": "terway-eniip"'
internal: true
Expand All @@ -54,7 +53,6 @@ code:
matchers:
- type: word
part: body
words:
- 'NetworkPolicy\":\"false'

Expand Down
4 changes: 1 addition & 3 deletions cloud/alibaba/ack/ack-cluster-network-policies-missing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,15 @@ code:
matchers-condition: and
matchers:
- type: regex
part: body
regex:
- '"Network"\s*:\s*"'

- type: word
part: body
words:
- '"Network": "terway-eniip"'
negative: true

extractors:
- type: dsl
dsl:
- '" Cluster is not using the plugin to enforce network policies"'
- '"Cluster is not using the plugin to enforce network policies"'
1 change: 0 additions & 1 deletion cloud/alibaba/ack/kubernetes-dashboard-enabled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ code:
matchers:
- type: word
part: body
words:
- 'kubernetes-dashboard'

Expand Down
2 changes: 0 additions & 2 deletions cloud/alibaba/actiontrail/multi-region-logging-disabled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,11 @@ code:
matchers-condition: and
matchers:
- type: word
part: body
words:
- '"TrailRegion": "All"'
negative: true

- type: word
part: body
words:
- '"Status": "Enable"'

Expand Down
1 change: 0 additions & 1 deletion cloud/alibaba/actiontrail/public-actiontrail-bucket.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ code:
matchers:
- type: regex
part: body
regex:
- 'ACL.*:.*public-read-write'

Expand Down
2 changes: 0 additions & 2 deletions cloud/alibaba/ecs/os-patches-outdated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,12 @@ code:
matchers-condition: and
matchers:
- type: word
part: body
words:
- '"RaspStatus":'
- '"Type":'
condition: and

- type: word
part: body
words:
- '"TotalCount": 0'
- '"VulRecords":'
Expand Down
1 change: 0 additions & 1 deletion cloud/alibaba/ecs/unattached-disk-encryption-disabled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ code:
matchers:
- type: word
part: body
words:
- '"Encrypted": false'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,10 @@ code:
matchers-condition: and
matchers:
- type: word
part: body
words:
- '"Encrypted": false'

- type: word
part: body
words:
- '"InstanceId": ""'
negative: true
Expand Down
1 change: 0 additions & 1 deletion cloud/alibaba/ecs/unrestricted-rdp-access.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ code:
matchers-condition: and
matchers:
- type: word
part: body
words:
- '"IpProtocol": "TCP"'
- '"PortRange": "3389/3389"'
Expand Down
1 change: 0 additions & 1 deletion cloud/alibaba/ecs/unrestricted-ssh-access.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ code:
matchers-condition: and
matchers:
- type: word
part: body
words:
- '"IpProtocol": "TCP"'
- '"PortRange": "22/22"'
Expand Down
1 change: 0 additions & 1 deletion cloud/alibaba/oss/improper-bucket-sse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ code:
matchers:
- type: regex
part: body
regex:
- 'SSEAlgorithm:\s?AES256'
- 'StatusCode=404'
Expand Down
1 change: 0 additions & 1 deletion cloud/alibaba/oss/sse-cmk-disabled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ code:
matchers-condition: and
matchers:
- type: word
part: body
words:
- 'Creator": "Rds'

Expand Down
1 change: 0 additions & 1 deletion cloud/alibaba/oss/sse-smk-disabled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ code:
matchers:
- type: word
part: body
words:
- 'AliasName": "alias/acs/rds'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,10 @@ code:
matchers-condition: and
matchers:
- type: regex
part: body
regex:
- '"MaxPasswordAge":\s*(9[1-9]|[1-9][0-9]{2,})' # Matches values greater than 90

- type: regex
part: body
regex:
- '"MaxPasswordAge":\s*(0|[1-9][0-9]?)' # Excludes values between 0 and 90

Expand Down
2 changes: 0 additions & 2 deletions cloud/alibaba/ram/password-policy-length-unconfigured.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,11 @@ code:
matchers-condition: and
matchers:
- type: regex
part: body
regex:
- \"MinimumPasswordLength\":\s*(1[4-9]|[2-9][0-9]{1,})
negative: true

- type: regex
part: body
regex:
- \"MinimumPasswordLength":\s*(\d|1[0-3])

Expand Down
1 change: 0 additions & 1 deletion cloud/alibaba/rds/mssql-audit-disabled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ code:
matchers:
- type: word
part: body
words:
- '"SQLCollectorStatus": "Disabled"'

Expand Down
1 change: 0 additions & 1 deletion cloud/alibaba/rds/mysql-audit-disabled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ code:
matchers:
- type: word
part: body
words:
- '"SQLCollectorStatus": "Disabled"'

Expand Down
1 change: 0 additions & 1 deletion cloud/alibaba/rds/postgresql-audit-disabled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ code:
matchers:
- type: word
part: body
words:
- '"SQLCollectorStatus": "Disabled"'

Expand Down
1 change: 0 additions & 1 deletion cloud/alibaba/rds/rds-audit-disabled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ code:
matchers:
- type: word
part: body
words:
- '"SQLCollectorStatus": "Disabled"'

Expand Down
1 change: 0 additions & 1 deletion cloud/alibaba/rds/transparent-encryption-disabled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ code:
matchers:
- type: word
part: body
words:
- '"TDEStatus": "Disabled"'

Expand Down
1 change: 0 additions & 1 deletion cloud/alibaba/vpc/vpc-flow-disabled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ code:
matchers:
- type: word
part: body
words:
- '"FlowLog": []'

Expand Down

0 comments on commit 16d015c

Please sign in to comment.