Skip to content

Commit c4115e1

Browse files
author
Matan Shati
committed
fix pr issues
1 parent 64900d5 commit c4115e1

File tree

2 files changed

+11
-22
lines changed

2 files changed

+11
-22
lines changed

checkov/common/checks_infra/solvers/attribute_solvers/jsonpath_exists_attribute_solver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ def __init__(self, resource_types: List[str], attribute: Optional[str], value: A
1212
attribute=attribute, value=value)
1313

1414
def _get_operation(self, vertex: Dict[str, Any], attribute: Optional[str]) -> bool:
15-
return vertex.get(attribute, None) is not None
15+
return vertex.get(attribute) is not None
1616

docs/3.Custom Policies/YAML Custom Policies.md

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -90,33 +90,22 @@ definition:
9090
| Not Ends With | `not_ending_with` |
9191
| Greater Than | `greater_than` |
9292
| Greater Than Or Equal | `greater_than_or_equal` |
93-
| Less Than | `less_than` |
94-
| Less Than Or Equal | `less_than_or_equal` |
95-
| Subset | `subset` |
96-
| Not Subset | `not_subset` |
97-
98-
### Attribute Condition: Keys and Values
99-
100-
| Key | Type | Value(s) |
101-
| --- | --- | --- |
102-
| `cond_type` | string | Must be `attribute` |
103-
| `resource_type` | collection of strings | Use either `all` or `[resource types from list]` |
104-
| `attribute` | string | Attribute of defined resource types. For example, `automated_snapshot_retention_period` |
105-
| `operator` | string | - `equals`, `not_equals`, `regex_match`, `not_regex_match`, `exists`, `not exists`, `any`, `contains`, `not_contains`, `within`, `starting_with`, `not_starting_with`, `ending_with`, `not_ending_with`, `greater_than`, `greater_than_or_equal`, `less_than`, `less_than_or_equal`, `subset`, `not_subset` |
106-
| `value` (not relevant for operator: `exists`/`not_exists`) | string | User input. |
10793
| Less Than | `less_than` |
10894
| Less Than Or Equal | `less_than_or_equal` |
95+
| Subset | `subset` |
96+
| Not Subset | `not_subset` |
10997
| Json Path Equals | `jsonpath_equals` |
98+
| Json Path Exists | `jsonpath_exists` |
11099

111100
### Attribute Condition: Keys and Values
112101

113-
| Key | Type | Value(s) |
114-
| --- | --- |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
115-
| `cond_type` | string | Must be `attribute` |
116-
| `resource_type` | collection of strings | Use either `all` or `[resource types from list]` |
117-
| `attribute` | string | Attribute of defined resource types. For example, `automated_snapshot_retention_period` |
118-
| `operator` | string | - `equals`, `not_equals`, `regex_match`, `not_regex_match`, `exists`, `not exists`, `any`, `contains`, `not_contains`, `within`, `starting_with`, `not_starting_with`, `ending_with`, `not_ending_with`, `greater_than`, `greater_than_or_equal`, `less_than`, `less_than_or_equal`, `jsonpath_equals` |
119-
| `value` (not relevant for operator: `exists`/`not_exists`) | string | User input. |
102+
| Key | Type | Value(s) |
103+
| --- | --- |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
104+
| `cond_type` | string | Must be `attribute` |
105+
| `resource_type` | collection of strings | Use either `all` or `[resource types from list]` |
106+
| `attribute` | string | Attribute of defined resource types. For example, `automated_snapshot_retention_period` |
107+
| `operator` | string | - `equals`, `not_equals`, `regex_match`, `not_regex_match`, `exists`, `not exists`, `any`, `contains`, `not_contains`, `within`, `starting_with`, `not_starting_with`, `ending_with`, `not_ending_with`, `greater_than`, `greater_than_or_equal`, `less_than`, `less_than_or_equal`, `jsonpath_equals`, `jsonpath_exists` |
108+
| `value` (not relevant for operator: `exists`/`not_exists`) | string | User input. |
120109

121110

122111
## Connection State Block

0 commit comments

Comments
 (0)