squarecloud-api 3.8.0__tar.gz → 4.0.0__tar.gz
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.
- {squarecloud_api-3.8.0 → squarecloud_api-4.0.0}/LICENSE +19 -19
- {squarecloud_api-3.8.0 → squarecloud_api-4.0.0}/PKG-INFO +7 -9
- {squarecloud_api-3.8.0 → squarecloud_api-4.0.0}/README.md +54 -54
- {squarecloud_api-3.8.0 → squarecloud_api-4.0.0}/pyproject.toml +148 -146
- {squarecloud_api-3.8.0 → squarecloud_api-4.0.0/src}/squarecloud/__init__.py +50 -48
- {squarecloud_api-3.8.0 → squarecloud_api-4.0.0/src}/squarecloud/app.py +764 -769
- {squarecloud_api-3.8.0 → squarecloud_api-4.0.0/src}/squarecloud/client.py +1149 -870
- squarecloud_api-4.0.0/src/squarecloud/data/__init__.py +44 -0
- squarecloud_api-4.0.0/src/squarecloud/data/app.py +41 -0
- squarecloud_api-4.0.0/src/squarecloud/data/base.py +15 -0
- squarecloud_api-4.0.0/src/squarecloud/data/base_database.py +8 -0
- squarecloud_api-4.0.0/src/squarecloud/data/certificate.py +58 -0
- squarecloud_api-4.0.0/src/squarecloud/data/database.py +10 -0
- squarecloud_api-4.0.0/src/squarecloud/data/database_info.py +17 -0
- squarecloud_api-4.0.0/src/squarecloud/data/deploy_data.py +11 -0
- squarecloud_api-4.0.0/src/squarecloud/data/dns_record.py +8 -0
- squarecloud_api-4.0.0/src/squarecloud/data/domain_analytics.py +62 -0
- squarecloud_api-4.0.0/src/squarecloud/data/file_info.py +30 -0
- squarecloud_api-4.0.0/src/squarecloud/data/language.py +6 -0
- squarecloud_api-4.0.0/src/squarecloud/data/logs.py +15 -0
- squarecloud_api-4.0.0/src/squarecloud/data/plan.py +23 -0
- squarecloud_api-4.0.0/src/squarecloud/data/snapshot.py +34 -0
- squarecloud_api-4.0.0/src/squarecloud/data/snapshot_info.py +16 -0
- squarecloud_api-4.0.0/src/squarecloud/data/status.py +46 -0
- squarecloud_api-4.0.0/src/squarecloud/data/upload.py +37 -0
- squarecloud_api-4.0.0/src/squarecloud/data/user.py +26 -0
- squarecloud_api-4.0.0/src/squarecloud/data/workspace.py +53 -0
- {squarecloud_api-3.8.0 → squarecloud_api-4.0.0/src}/squarecloud/errors.py +238 -229
- {squarecloud_api-3.8.0 → squarecloud_api-4.0.0/src}/squarecloud/file.py +60 -60
- {squarecloud_api-3.8.0 → squarecloud_api-4.0.0/src}/squarecloud/http/__init__.py +4 -4
- {squarecloud_api-3.8.0 → squarecloud_api-4.0.0/src}/squarecloud/http/endpoints.py +584 -358
- {squarecloud_api-3.8.0 → squarecloud_api-4.0.0/src}/squarecloud/http/http_client.py +1121 -823
- {squarecloud_api-3.8.0 → squarecloud_api-4.0.0/src}/squarecloud/listeners/__init__.py +140 -171
- {squarecloud_api-3.8.0 → squarecloud_api-4.0.0/src}/squarecloud/listeners/capture_listener.py +115 -160
- {squarecloud_api-3.8.0 → squarecloud_api-4.0.0/src}/squarecloud/listeners/request_listener.py +74 -114
- {squarecloud_api-3.8.0 → squarecloud_api-4.0.0/src}/squarecloud/logger.py +58 -58
- {squarecloud_api-3.8.0 → squarecloud_api-4.0.0/src}/squarecloud/utils.py +75 -75
- squarecloud_api-3.8.0/squarecloud/_internal/constants.py +0 -3
- squarecloud_api-3.8.0/squarecloud/_internal/decorators.py +0 -16
- squarecloud_api-3.8.0/squarecloud/data.py +0 -345
- {squarecloud_api-3.8.0 → squarecloud_api-4.0.0/src}/squarecloud/py.typed +0 -0
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2022 Robert Nogueira
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
|
-
this software and associated documentation files (the "Software"), to deal in
|
|
7
|
-
the Software without restriction, including without limitation the rights to
|
|
8
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
9
|
-
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
10
|
-
subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
17
|
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
18
|
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
19
|
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 Robert Nogueira
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
7
|
+
the Software without restriction, including without limitation the rights to
|
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
9
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
10
|
+
subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
17
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
18
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
19
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
20
20
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -1,20 +1,18 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: squarecloud-api
|
|
3
|
-
Version:
|
|
3
|
+
Version: 4.0.0
|
|
4
4
|
Summary: SquareCloud API wrapper
|
|
5
5
|
License: MIT
|
|
6
|
+
License-File: LICENSE
|
|
6
7
|
Author: Robert Nogueira
|
|
7
8
|
Author-email: robertlucasnogueira@gmail.com
|
|
8
|
-
Requires-Python: >=3.13,<
|
|
9
|
+
Requires-Python: >=3.13,<3.15
|
|
9
10
|
Classifier: License :: OSI Approved :: MIT License
|
|
10
11
|
Classifier: Programming Language :: Python :: 3
|
|
11
12
|
Classifier: Programming Language :: Python :: 3.13
|
|
12
|
-
|
|
13
|
-
Requires-Dist: aiohttp (>=3.
|
|
14
|
-
Requires-Dist:
|
|
15
|
-
Requires-Dist: typing-extensions (>=4.12.2,<5.0.0)
|
|
16
|
-
Project-URL: Documentation, https://docs.squarecloud.app/sdks/py
|
|
17
|
-
Project-URL: Repository, https://github.com/squarecloudofc/wrapper-api-py
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
14
|
+
Requires-Dist: aiohttp (>=3.13.2,<3.14.0)
|
|
15
|
+
Requires-Dist: typing-extensions (>=4.15.0,<4.16.0)
|
|
18
16
|
Description-Content-Type: text/markdown
|
|
19
17
|
|
|
20
18
|
[Square Cloud]: https://squarecloud.app
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
[Square Cloud]: https://squarecloud.app
|
|
2
|
-
|
|
3
|
-
[Square Cloud API]: https://docs.squarecloud.app/api-reference/
|
|
4
|
-
|
|
5
|
-
[@allma]: https://github.com/Robert-Nogueira
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
<div align="center">
|
|
9
|
-
<img alt="Square Cloud Banner" src="https://cdn.squarecloud.app/png/github-readme.png">
|
|
10
|
-
</div>
|
|
11
|
-
|
|
12
|
-
<h1 align="center">squarecloud-api</h1>
|
|
13
|
-
|
|
14
|
-
<p align="center">A Python SDK for consuming the <a href="https://squarecloud.app" target="_blank">Square Cloud</a> API.</p>
|
|
15
|
-
|
|
16
|
-
## Installation
|
|
17
|
-
|
|
18
|
-
````shell
|
|
19
|
-
pip install squarecloud-api
|
|
20
|
-
````
|
|
21
|
-
|
|
22
|
-
## Getting api key
|
|
23
|
-
|
|
24
|
-
to get your api key/token just go to the [Square Cloud] website and
|
|
25
|
-
register/login, after that go
|
|
26
|
-
to `dashboard` > `my account` > `Regenerate API/CLI KEY` and copy the key.
|
|
27
|
-
|
|
28
|
-
## Documentation
|
|
29
|
-
Visit our [official documentation](https://docs.squarecloud.app/sdks/py) for more information about how to use this library.
|
|
30
|
-
|
|
31
|
-
## Getting started
|
|
32
|
-
|
|
33
|
-
```python
|
|
34
|
-
import asyncio
|
|
35
|
-
import squarecloud as square
|
|
36
|
-
|
|
37
|
-
client = square.Client('API_KEY')
|
|
38
|
-
|
|
39
|
-
async def main():
|
|
40
|
-
status = await client.app_status(app_id='application_id')
|
|
41
|
-
print(status)
|
|
42
|
-
print(status.ram)
|
|
43
|
-
print(status.cpu)
|
|
44
|
-
|
|
45
|
-
asyncio.run(main())
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
## Contributing
|
|
49
|
-
|
|
50
|
-
Feel free to contribute with suggestions or bug reports at our [GitHub repository](https://github.com/squarecloudofc/wrapper-api-py).
|
|
51
|
-
|
|
52
|
-
## Authors
|
|
53
|
-
|
|
54
|
-
- [@allma]
|
|
1
|
+
[Square Cloud]: https://squarecloud.app
|
|
2
|
+
|
|
3
|
+
[Square Cloud API]: https://docs.squarecloud.app/api-reference/
|
|
4
|
+
|
|
5
|
+
[@allma]: https://github.com/Robert-Nogueira
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
<div align="center">
|
|
9
|
+
<img alt="Square Cloud Banner" src="https://cdn.squarecloud.app/png/github-readme.png">
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
<h1 align="center">squarecloud-api</h1>
|
|
13
|
+
|
|
14
|
+
<p align="center">A Python SDK for consuming the <a href="https://squarecloud.app" target="_blank">Square Cloud</a> API.</p>
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
````shell
|
|
19
|
+
pip install squarecloud-api
|
|
20
|
+
````
|
|
21
|
+
|
|
22
|
+
## Getting api key
|
|
23
|
+
|
|
24
|
+
to get your api key/token just go to the [Square Cloud] website and
|
|
25
|
+
register/login, after that go
|
|
26
|
+
to `dashboard` > `my account` > `Regenerate API/CLI KEY` and copy the key.
|
|
27
|
+
|
|
28
|
+
## Documentation
|
|
29
|
+
Visit our [official documentation](https://docs.squarecloud.app/sdks/py) for more information about how to use this library.
|
|
30
|
+
|
|
31
|
+
## Getting started
|
|
32
|
+
|
|
33
|
+
```python
|
|
34
|
+
import asyncio
|
|
35
|
+
import squarecloud as square
|
|
36
|
+
|
|
37
|
+
client = square.Client('API_KEY')
|
|
38
|
+
|
|
39
|
+
async def main():
|
|
40
|
+
status = await client.app_status(app_id='application_id')
|
|
41
|
+
print(status)
|
|
42
|
+
print(status.ram)
|
|
43
|
+
print(status.cpu)
|
|
44
|
+
|
|
45
|
+
asyncio.run(main())
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Contributing
|
|
49
|
+
|
|
50
|
+
Feel free to contribute with suggestions or bug reports at our [GitHub repository](https://github.com/squarecloudofc/wrapper-api-py).
|
|
51
|
+
|
|
52
|
+
## Authors
|
|
53
|
+
|
|
54
|
+
- [@allma]
|
|
@@ -1,146 +1,148 @@
|
|
|
1
|
-
[
|
|
2
|
-
name =
|
|
3
|
-
version =
|
|
4
|
-
description =
|
|
5
|
-
authors = [
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
[tool.poetry
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
[
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
'
|
|
51
|
-
'
|
|
52
|
-
'
|
|
53
|
-
'
|
|
54
|
-
'
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
[
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
#
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
#
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
#
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
#
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
#
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
#
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
#
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
#
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
1
|
+
[project]
|
|
2
|
+
name = "squarecloud-api"
|
|
3
|
+
version = "4.0.0"
|
|
4
|
+
description = "SquareCloud API wrapper"
|
|
5
|
+
authors = [
|
|
6
|
+
{name = "Robert Nogueira",email = "robertlucasnogueira@gmail.com"}
|
|
7
|
+
]
|
|
8
|
+
repository = 'https://github.com/squarecloudofc/wrapper-api-py'
|
|
9
|
+
documentation = 'https://docs.squarecloud.app/en/sdks/py/client'
|
|
10
|
+
license = {text = "MIT License"}
|
|
11
|
+
readme = "README.md"
|
|
12
|
+
requires-python = ">=3.13,<3.15"
|
|
13
|
+
|
|
14
|
+
dependencies = [
|
|
15
|
+
"aiohttp~=3.13.2",
|
|
16
|
+
"typing-extensions~=4.15.0",
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
[tool.poetry]
|
|
20
|
+
packages = [{ from= "src", include = "squarecloud" }]
|
|
21
|
+
|
|
22
|
+
[build-system]
|
|
23
|
+
requires = ["poetry-core>=2.0.0,<3.0.0"]
|
|
24
|
+
build-backend = "poetry.core.masonry.api"
|
|
25
|
+
|
|
26
|
+
[dependency-groups]
|
|
27
|
+
dev = [
|
|
28
|
+
"bandit[toml]~=1.9.2",
|
|
29
|
+
"commitizen~=4.10.1",
|
|
30
|
+
"cz-conventional-gitmoji~=0.7.0",
|
|
31
|
+
"isort~=7.0.0",
|
|
32
|
+
"memory-profiler~=0.61.0",
|
|
33
|
+
"mypy-extensions~=1.1.0",
|
|
34
|
+
"pre-commit~=4.5.0",
|
|
35
|
+
"pytest~=9.0.2",
|
|
36
|
+
"pytest-asyncio~=1.3.0",
|
|
37
|
+
"pytest-cov~=7.1.0",
|
|
38
|
+
"pytest-rerunfailures~=16.1",
|
|
39
|
+
"python-dotenv~=1.2.1",
|
|
40
|
+
"requests~=2.32.5",
|
|
41
|
+
"ruff~=0.14.9",
|
|
42
|
+
"safety~=3.7.0",
|
|
43
|
+
"taskipy~=1.14.1",
|
|
44
|
+
"vulture~=2.14",
|
|
45
|
+
]
|
|
46
|
+
|
|
47
|
+
[tool.pytest.ini_options]
|
|
48
|
+
asyncio_mode = 'auto'
|
|
49
|
+
markers = [
|
|
50
|
+
'app',
|
|
51
|
+
'app_data',
|
|
52
|
+
'listeners',
|
|
53
|
+
'capture_listener',
|
|
54
|
+
'request_listener',
|
|
55
|
+
'files',
|
|
56
|
+
'upload',
|
|
57
|
+
]
|
|
58
|
+
|
|
59
|
+
[tool.isort]
|
|
60
|
+
profile = 'black'
|
|
61
|
+
line_length = 79
|
|
62
|
+
|
|
63
|
+
[tool.taskipy.tasks]
|
|
64
|
+
lint = 'isort . && ruff check .'
|
|
65
|
+
pre_test = 'task lint'
|
|
66
|
+
test = 'pytest -vv -s --reruns 5 --only-rerun TooManyRequests --reruns-delay 90 -x --cov=tests tests'
|
|
67
|
+
post_test = 'coverage html'
|
|
68
|
+
publish-test = 'poetry publish -r pypi-test --build'
|
|
69
|
+
install-test = 'pip install -i https://test.pypi.org/pypi/ --extra-index-url https://pypi.org/simple --upgrade squarecloud-api'
|
|
70
|
+
clear-test-apps = 'python -m scripts.clear_test_apps'
|
|
71
|
+
|
|
72
|
+
[tool.ruff]
|
|
73
|
+
line-length = 79
|
|
74
|
+
exclude = ['env', 'tests']
|
|
75
|
+
|
|
76
|
+
[tool.bandit]
|
|
77
|
+
exclude_dirs = ["docs", "venv", "migrations", "examples", "tests"]
|
|
78
|
+
skips = ["B101", "B311"]
|
|
79
|
+
severity_threshold = "low"
|
|
80
|
+
confidence_threshold = "low"
|
|
81
|
+
recursive = true
|
|
82
|
+
quiet = false
|
|
83
|
+
|
|
84
|
+
[tool.bandit.tests]
|
|
85
|
+
B102 = "exec_used" # Use of 'exec' detected
|
|
86
|
+
B103 = "set_bad_file_permissions" # Insecure file permissions
|
|
87
|
+
B104 = "hardcoded_bind_all_interfaces" # Binding to all interfaces
|
|
88
|
+
B105 = "hardcoded_password_string" # Hardcoded password in a string
|
|
89
|
+
B106 = "hardcoded_password_funcarg" # Hardcoded password in function argument
|
|
90
|
+
B107 = "hardcoded_password_default" # Hardcoded password in a default argument
|
|
91
|
+
B108 = "hardcoded_tmp_directory" # Use of hardcoded temporary directory
|
|
92
|
+
B109 = "password_config_option_not_marked_secret" # Password config not marked as secret
|
|
93
|
+
B110 = "try_except_pass" # 'try-except-pass' pattern detected
|
|
94
|
+
B111 = "execute_with_run_as_root_equals_true" # Executing with 'run_as_root=True'
|
|
95
|
+
B112 = "try_except_continue" # 'try-except-continue' pattern detected
|
|
96
|
+
B113 = "request_without_timeout" # HTTP request without a timeout
|
|
97
|
+
|
|
98
|
+
# Security vulnerabilities in web applications
|
|
99
|
+
B201 = "flask_debug_true" # Flask app running with 'debug=True'
|
|
100
|
+
B202 = "tarfile_unsafe_members" # Tarfile extract with unsafe members
|
|
101
|
+
|
|
102
|
+
# Cryptography-related issues
|
|
103
|
+
B324 = "hashlib" # Weak or insecure hash function
|
|
104
|
+
|
|
105
|
+
# SSL/TLS issues
|
|
106
|
+
B501 = "request_with_no_cert_validation" # Requests without certificate validation
|
|
107
|
+
B502 = "ssl_with_bad_version" # Use of outdated SSL versions
|
|
108
|
+
B503 = "ssl_with_bad_defaults" # Insecure SSL defaults
|
|
109
|
+
B504 = "ssl_with_no_version" # SSL/TLS without specifying a version
|
|
110
|
+
B505 = "weak_cryptographic_key" # Weak cryptographic key detected
|
|
111
|
+
|
|
112
|
+
# Serialization & data handling
|
|
113
|
+
B506 = "yaml_load" # Use of unsafe 'yaml.load'
|
|
114
|
+
B507 = "ssh_no_host_key_verification" # SSH without host key verification
|
|
115
|
+
B508 = "snmp_insecure_version" # Insecure SNMP version used
|
|
116
|
+
B509 = "snmp_weak_cryptography" # Weak SNMP cryptography used
|
|
117
|
+
|
|
118
|
+
# Process execution risks
|
|
119
|
+
B601 = "paramiko_calls" # Use of Paramiko library detected
|
|
120
|
+
B602 = "subprocess_popen_with_shell_equals_true" # Popen with 'shell=True'
|
|
121
|
+
B603 = "subprocess_without_shell_equals_true" # Popen without 'shell=True'
|
|
122
|
+
B604 = "any_other_function_with_shell_equals_true" # Dangerous shell execution function
|
|
123
|
+
B605 = "start_process_with_a_shell" # Starting a process with a shell
|
|
124
|
+
B606 = "start_process_with_no_shell" # Process started without shell
|
|
125
|
+
B607 = "start_process_with_partial_path" # Process started with a partial path
|
|
126
|
+
|
|
127
|
+
# Database security
|
|
128
|
+
B608 = "hardcoded_sql_expressions" # Hardcoded SQL expressions detected
|
|
129
|
+
B609 = "linux_commands_wildcard_injection" # Linux command injection via wildcards
|
|
130
|
+
B610 = "django_extra_used" # Use of Django's 'extra()' method
|
|
131
|
+
B611 = "django_rawsql_used" # Use of raw SQL in Django
|
|
132
|
+
B612 = "logging_config_insecure_listen" # Insecure logging configuration
|
|
133
|
+
|
|
134
|
+
# Miscellaneous security issues
|
|
135
|
+
B613 = "trojansource" # Trojan Source attack patterns detected
|
|
136
|
+
B614 = "pytorch_load" # Use of 'torch.load', which can be unsafe
|
|
137
|
+
|
|
138
|
+
# Template security risks
|
|
139
|
+
B701 = "jinja2_autoescape_false" # Jinja2 autoescape disabled
|
|
140
|
+
B702 = "use_of_mako_templates" # Use of Mako templates detected
|
|
141
|
+
B703 = "django_mark_safe" # Use of Django's 'mark_safe'
|
|
142
|
+
B704 = "markupsafe_markup_xss" # Potential XSS via MarkupSafe
|
|
143
|
+
|
|
144
|
+
[tool.commitizen]
|
|
145
|
+
name = "cz_gitmoji"
|
|
146
|
+
|
|
147
|
+
[tool.ruff.lint.per-file-ignores]
|
|
148
|
+
'__init__.py' = ['F401']
|
|
@@ -1,48 +1,50 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
from . import errors, utils
|
|
4
|
-
from .app import Application
|
|
5
|
-
from .client import Client
|
|
6
|
-
from .data import (
|
|
7
|
-
AppData,
|
|
8
|
-
DeployData,
|
|
9
|
-
DNSRecord,
|
|
10
|
-
DomainAnalytics,
|
|
11
|
-
FileInfo,
|
|
12
|
-
LogsData,
|
|
13
|
-
PlanData,
|
|
14
|
-
ResumedStatus,
|
|
15
|
-
Snapshot,
|
|
16
|
-
SnapshotInfo,
|
|
17
|
-
StatusData,
|
|
18
|
-
UploadData,
|
|
19
|
-
UserData,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
from .
|
|
23
|
-
from .http.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
'
|
|
28
|
-
'
|
|
29
|
-
'
|
|
30
|
-
'
|
|
31
|
-
'
|
|
32
|
-
'
|
|
33
|
-
'
|
|
34
|
-
'
|
|
35
|
-
'
|
|
36
|
-
'
|
|
37
|
-
'
|
|
38
|
-
'
|
|
39
|
-
'
|
|
40
|
-
'
|
|
41
|
-
'
|
|
42
|
-
'
|
|
43
|
-
'
|
|
44
|
-
'
|
|
45
|
-
'
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from . import errors, utils
|
|
4
|
+
from .app import Application
|
|
5
|
+
from .client import Client
|
|
6
|
+
from .data import (
|
|
7
|
+
AppData,
|
|
8
|
+
DeployData,
|
|
9
|
+
DNSRecord,
|
|
10
|
+
DomainAnalytics,
|
|
11
|
+
FileInfo,
|
|
12
|
+
LogsData,
|
|
13
|
+
PlanData,
|
|
14
|
+
ResumedStatus,
|
|
15
|
+
Snapshot,
|
|
16
|
+
SnapshotInfo,
|
|
17
|
+
StatusData,
|
|
18
|
+
UploadData,
|
|
19
|
+
UserData,
|
|
20
|
+
Workspace,
|
|
21
|
+
)
|
|
22
|
+
from .file import File
|
|
23
|
+
from .http.endpoints import Endpoint
|
|
24
|
+
from .http.http_client import Response
|
|
25
|
+
|
|
26
|
+
__all__ = [
|
|
27
|
+
'Application',
|
|
28
|
+
'Client',
|
|
29
|
+
'File',
|
|
30
|
+
'Endpoint',
|
|
31
|
+
'Response',
|
|
32
|
+
'AppData',
|
|
33
|
+
'Snapshot',
|
|
34
|
+
'SnapshotInfo',
|
|
35
|
+
'DeployData',
|
|
36
|
+
'DNSRecord',
|
|
37
|
+
'DomainAnalytics',
|
|
38
|
+
'FileInfo',
|
|
39
|
+
'LogsData',
|
|
40
|
+
'PlanData',
|
|
41
|
+
'ResumedStatus',
|
|
42
|
+
'StatusData',
|
|
43
|
+
'UploadData',
|
|
44
|
+
'UserData',
|
|
45
|
+
'Workspace',
|
|
46
|
+
'errors',
|
|
47
|
+
'utils',
|
|
48
|
+
]
|
|
49
|
+
|
|
50
|
+
__version__ = '4.0.0'
|