praetorian-cli 2.2.5__py3-none-any.whl → 2.2.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- praetorian_cli/sdk/entities/risks.py +10 -5
- {praetorian_cli-2.2.5.dist-info → praetorian_cli-2.2.6.dist-info}/METADATA +1 -1
- {praetorian_cli-2.2.5.dist-info → praetorian_cli-2.2.6.dist-info}/RECORD +7 -7
- {praetorian_cli-2.2.5.dist-info → praetorian_cli-2.2.6.dist-info}/WHEEL +0 -0
- {praetorian_cli-2.2.5.dist-info → praetorian_cli-2.2.6.dist-info}/entry_points.txt +0 -0
- {praetorian_cli-2.2.5.dist-info → praetorian_cli-2.2.6.dist-info}/licenses/LICENSE +0 -0
- {praetorian_cli-2.2.5.dist-info → praetorian_cli-2.2.6.dist-info}/top_level.txt +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from praetorian_cli.sdk.model.globals import Kind
|
|
2
|
-
from praetorian_cli.sdk.model.query import Relationship, Node, Query, risk_of_key, ASSET_NODE, ATTRIBUTE_NODE
|
|
2
|
+
from praetorian_cli.sdk.model.query import Relationship, Node, Query, risk_of_key, ASSET_NODE, ATTRIBUTE_NODE, Filter
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
class Risks:
|
|
@@ -85,12 +85,12 @@ class Risks:
|
|
|
85
85
|
|
|
86
86
|
return self.api.delete_by_key('risk', key, body)
|
|
87
87
|
|
|
88
|
-
def list(self,
|
|
88
|
+
def list(self, contains_filter='', offset=None, pages=100000) -> tuple:
|
|
89
89
|
"""
|
|
90
90
|
List risks with optional filtering and pagination.
|
|
91
91
|
|
|
92
|
-
:param
|
|
93
|
-
:type
|
|
92
|
+
:param contains_filter: Filter to apply to the risk key. Ensure the risk's key contains the filter.
|
|
93
|
+
:type contains_filter: str
|
|
94
94
|
:param offset: The offset of the page you want to retrieve results. If not supplied, retrieves from the first page
|
|
95
95
|
:type offset: str or None
|
|
96
96
|
:param pages: The number of pages of results to retrieve. <mcp>Start with one page of results unless specifically requested.</mcp>
|
|
@@ -98,7 +98,12 @@ class Risks:
|
|
|
98
98
|
:return: A tuple containing (list of matching risks, next page offset)
|
|
99
99
|
:rtype: tuple
|
|
100
100
|
"""
|
|
101
|
-
|
|
101
|
+
filters = []
|
|
102
|
+
if contains_filter:
|
|
103
|
+
contains_filter_filter = Filter(field=Filter.Field.KEY, operator=Filter.Operator.CONTAINS, value=contains_filter)
|
|
104
|
+
filters.append(contains_filter_filter)
|
|
105
|
+
query = Query(Node([Node.Label.RISK], filters=filters))
|
|
106
|
+
return self.api.search.by_query(query, pages)
|
|
102
107
|
|
|
103
108
|
def attributes(self, key):
|
|
104
109
|
"""
|
|
@@ -43,7 +43,7 @@ praetorian_cli/sdk/entities/integrations.py,sha256=NVaW_dWbnMkMIs-EYr2W7QAeamPVw
|
|
|
43
43
|
praetorian_cli/sdk/entities/jobs.py,sha256=JBkNgFzQEtV0XJSuKtAzCHOYa9rcVxgTkp-tAuS6CP0,8181
|
|
44
44
|
praetorian_cli/sdk/entities/keys.py,sha256=PgoGa3xyLMzWrIIQ8zgi7bfZiUFFumPtMDo64GjhdjE,6089
|
|
45
45
|
praetorian_cli/sdk/entities/preseeds.py,sha256=SeSY4K6diJMQzsjCBxYK3N9Lz0fUz3B_LMBOAAcBSLg,8890
|
|
46
|
-
praetorian_cli/sdk/entities/risks.py,sha256=
|
|
46
|
+
praetorian_cli/sdk/entities/risks.py,sha256=1dX7co6pSiU11KoFg2UaCe1MGebiGCqEpx5t0wQ5N0k,6183
|
|
47
47
|
praetorian_cli/sdk/entities/scanners.py,sha256=QCr5QlBy4jfBh8HRvZt9CoZTgNqLNnKNrI4sdfJf0jE,423
|
|
48
48
|
praetorian_cli/sdk/entities/schema.py,sha256=CPVws1CdRHyOAI7oT9A20WGOCZozTFqZnfo5ox3v0HQ,807
|
|
49
49
|
praetorian_cli/sdk/entities/search.py,sha256=9vTy9HZY2BTlqf5Zwpdl8HCRIfSEvWDRij2_-rAp2Ng,16938
|
|
@@ -96,9 +96,9 @@ praetorian_cli/ui/aegis/commands/set.py,sha256=ODa9u_6yW2dbKVQBuV9YeiS_ty_R_Xk_v
|
|
|
96
96
|
praetorian_cli/ui/aegis/commands/ssh.py,sha256=KGsNlN0i-Cwp6gWyr-cjML9_L13oE7xFenysF2pC8Rc,3045
|
|
97
97
|
praetorian_cli/ui/conversation/__init__.py,sha256=sNhNN_ZG1Va_7OLTaoXlIFL6ageKHWdufFVYw6F_aV8,90
|
|
98
98
|
praetorian_cli/ui/conversation/textual_chat.py,sha256=bvTaBm_ZCPI4Z1HDn3e-GfH2z4JVLcuFh3SX0BHtcGE,24403
|
|
99
|
-
praetorian_cli-2.2.
|
|
100
|
-
praetorian_cli-2.2.
|
|
101
|
-
praetorian_cli-2.2.
|
|
102
|
-
praetorian_cli-2.2.
|
|
103
|
-
praetorian_cli-2.2.
|
|
104
|
-
praetorian_cli-2.2.
|
|
99
|
+
praetorian_cli-2.2.6.dist-info/licenses/LICENSE,sha256=Zv97QripiVALv-WokW_Elsiz9vtOfbtNt1aLZhhk67I,1067
|
|
100
|
+
praetorian_cli-2.2.6.dist-info/METADATA,sha256=YEWfxNhUNwDJXjKlBNeHDyfVSJs4chgHGv3av4ZraSA,7751
|
|
101
|
+
praetorian_cli-2.2.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
102
|
+
praetorian_cli-2.2.6.dist-info/entry_points.txt,sha256=uJbDvZdkYaLiCh2DMvXPUGKFm2p5ZfzJCizUK3-PUEE,56
|
|
103
|
+
praetorian_cli-2.2.6.dist-info/top_level.txt,sha256=QbUdRPGEj_TyHO-E7AD5BxFfR8ore37i273jP4Gn43c,15
|
|
104
|
+
praetorian_cli-2.2.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|