prelude-cli-beta 1446__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.
- prelude_cli_beta/__init__.py +0 -0
- prelude_cli_beta/cli.py +52 -0
- prelude_cli_beta/templates/__init__.py +0 -0
- prelude_cli_beta/views/__init__.py +0 -0
- prelude_cli_beta/views/auth.py +56 -0
- prelude_cli_beta/views/build.py +488 -0
- prelude_cli_beta/views/configure.py +29 -0
- prelude_cli_beta/views/detect.py +438 -0
- prelude_cli_beta/views/generate.py +130 -0
- prelude_cli_beta/views/iam.py +368 -0
- prelude_cli_beta/views/jobs.py +50 -0
- prelude_cli_beta/views/partner.py +181 -0
- prelude_cli_beta/views/scm.py +881 -0
- prelude_cli_beta/views/shared.py +37 -0
- prelude_cli_beta-1446.dist-info/METADATA +38 -0
- prelude_cli_beta-1446.dist-info/RECORD +20 -0
- prelude_cli_beta-1446.dist-info/WHEEL +5 -0
- prelude_cli_beta-1446.dist-info/entry_points.txt +3 -0
- prelude_cli_beta-1446.dist-info/licenses/LICENSE +9 -0
- prelude_cli_beta-1446.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
from functools import wraps
|
|
2
|
+
from rich import print_json
|
|
3
|
+
from rich.progress import Progress, TextColumn, SpinnerColumn
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def pretty_print(func):
|
|
7
|
+
@wraps(func)
|
|
8
|
+
def handler(*args, **kwargs):
|
|
9
|
+
try:
|
|
10
|
+
res = func(*args, **kwargs)
|
|
11
|
+
msg = None
|
|
12
|
+
if isinstance(res, tuple):
|
|
13
|
+
res, msg = res
|
|
14
|
+
if not isinstance(res, list):
|
|
15
|
+
res = [res]
|
|
16
|
+
return print_json(data=dict(status="complete", results=res, message=msg))
|
|
17
|
+
except Exception as e:
|
|
18
|
+
return print_json(
|
|
19
|
+
data=dict(
|
|
20
|
+
status="error",
|
|
21
|
+
results=None,
|
|
22
|
+
message=" ".join(str(arg) for arg in e.args),
|
|
23
|
+
)
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
return handler
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class Spinner(Progress):
|
|
30
|
+
def __init__(self, description="Loading"):
|
|
31
|
+
super().__init__(
|
|
32
|
+
SpinnerColumn(style="green", spinner_name="line"),
|
|
33
|
+
TextColumn("[green]{task.description}..."),
|
|
34
|
+
transient=True,
|
|
35
|
+
refresh_per_second=10,
|
|
36
|
+
)
|
|
37
|
+
self.add_task(description)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: prelude-cli-beta
|
|
3
|
+
Version: 1446
|
|
4
|
+
Summary: For interacting with the Prelude SDK
|
|
5
|
+
Home-page: https://github.com/preludeorg
|
|
6
|
+
Author: Prelude Research
|
|
7
|
+
Author-email: support@preludesecurity.com
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Requires-Python: >=3.10
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
License-File: LICENSE
|
|
14
|
+
Requires-Dist: prelude-sdk-beta==1446
|
|
15
|
+
Requires-Dist: click>8
|
|
16
|
+
Requires-Dist: rich
|
|
17
|
+
Requires-Dist: python-dateutil
|
|
18
|
+
Requires-Dist: pyyaml
|
|
19
|
+
Dynamic: license-file
|
|
20
|
+
|
|
21
|
+
# Prelude CLI
|
|
22
|
+
|
|
23
|
+
Interact with the full range of features in Prelude Detect, organized by:
|
|
24
|
+
|
|
25
|
+
- IAM: manage your account
|
|
26
|
+
- Build: write and maintain your collection of security tests
|
|
27
|
+
- Detect: schedule security tests for your endpoints
|
|
28
|
+
|
|
29
|
+
## Quick start
|
|
30
|
+
```bash
|
|
31
|
+
pip install prelude-cli
|
|
32
|
+
prelude --help
|
|
33
|
+
prelude --interactive
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Documentation
|
|
37
|
+
|
|
38
|
+
https://docs.preludesecurity.com/docs/prelude-cli
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
prelude_cli_beta/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
prelude_cli_beta/cli.py,sha256=H3JbHuFxb46JbhsLZpH2I_5Vt9airCxUVGhqBAW6lIM,1454
|
|
3
|
+
prelude_cli_beta/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
+
prelude_cli_beta/views/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
+
prelude_cli_beta/views/auth.py,sha256=W-Bc6p3CXpHiQXJCQ4FoB3SdB9xIoeJlV4WMUezSBZ4,1864
|
|
6
|
+
prelude_cli_beta/views/build.py,sha256=olBRS2zjqxkvXKFmWLbqjKbbP_MDkwyjeAimHGRyfvw,16508
|
|
7
|
+
prelude_cli_beta/views/configure.py,sha256=saj0kR9mQqBp7cCmq-yfEr3UwZCZIV1vL8WDQLDAO7o,991
|
|
8
|
+
prelude_cli_beta/views/detect.py,sha256=jhx38nTRjZwxPAN4QbjyMkmk1mZDqZGh4uKPyG_FZ1s,13012
|
|
9
|
+
prelude_cli_beta/views/generate.py,sha256=zkdzBaBO7K5tXarnKfzZjo9-WaG5i80y1ZbQk0398sA,4904
|
|
10
|
+
prelude_cli_beta/views/iam.py,sha256=J8y6kJGbQkEexcia69q6vLJ3aEhLyUFteCylTptBHBQ,10013
|
|
11
|
+
prelude_cli_beta/views/jobs.py,sha256=2FeiJxHrw4zfgtUJq_bEoG84i_9TqZ5w6CulA80WoNA,1455
|
|
12
|
+
prelude_cli_beta/views/partner.py,sha256=Rt9ecl6239redsMi6NhQjqsiWw7Z7WsKvjqVAiXYmJM,6085
|
|
13
|
+
prelude_cli_beta/views/scm.py,sha256=dMBjIZjGXKH1aDsMNX_cbsYck5qbubZ1VwjRanosEbo,25557
|
|
14
|
+
prelude_cli_beta/views/shared.py,sha256=ZKvY8N1Vi6RtEbJli5PDzJ9R6L_bX2F27n1tm6Knvgs,1101
|
|
15
|
+
prelude_cli_beta-1446.dist-info/licenses/LICENSE,sha256=ttdT5omfN6LNmtQoIjUhkkFhz6i44SDMRNwKrbfyTf8,1069
|
|
16
|
+
prelude_cli_beta-1446.dist-info/METADATA,sha256=ZBeI6F3jaOOmFUSrgAk1Jynxenl8K1w4dgbivcGClzM,993
|
|
17
|
+
prelude_cli_beta-1446.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
18
|
+
prelude_cli_beta-1446.dist-info/entry_points.txt,sha256=WowrC6fz2D6S8S-5OY0g-bxUGGSZZ_Z6KzSXXd34pC4,88
|
|
19
|
+
prelude_cli_beta-1446.dist-info/top_level.txt,sha256=j50aCGsQamLMiQh9PcolDBCAeUJzi9y08e0i9Gqshkk,17
|
|
20
|
+
prelude_cli_beta-1446.dist-info/RECORD,,
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT LICENSE
|
|
2
|
+
|
|
3
|
+
Copyright 2022, Prelude Research
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
prelude_cli_beta
|