vulnotes 0.1.0__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.
- vulnotes/__init__.py +42 -0
- vulnotes/_utils.py +65 -0
- vulnotes/_version.py +1 -0
- vulnotes/client.py +228 -0
- vulnotes/exceptions.py +122 -0
- vulnotes/resources/__init__.py +31 -0
- vulnotes/resources/_base.py +67 -0
- vulnotes/resources/ai.py +110 -0
- vulnotes/resources/api_keys.py +17 -0
- vulnotes/resources/attachments.py +75 -0
- vulnotes/resources/comments.py +98 -0
- vulnotes/resources/companies.py +77 -0
- vulnotes/resources/findings.py +62 -0
- vulnotes/resources/images.py +85 -0
- vulnotes/resources/notes.py +71 -0
- vulnotes/resources/planning.py +210 -0
- vulnotes/resources/report_templates.py +52 -0
- vulnotes/resources/reports.py +293 -0
- vulnotes/resources/snapshots.py +35 -0
- vulnotes/resources/vulnerabilities.py +82 -0
- vulnotes/resources/vulnerability_templates.py +132 -0
- vulnotes-0.1.0.dist-info/METADATA +166 -0
- vulnotes-0.1.0.dist-info/RECORD +25 -0
- vulnotes-0.1.0.dist-info/WHEEL +4 -0
- vulnotes-0.1.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: vulnotes
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Official Python SDK for the Vulnotes API
|
|
5
|
+
Project-URL: Homepage, https://vulnotes.com
|
|
6
|
+
Project-URL: Documentation, https://docs.vulnotes.com
|
|
7
|
+
Project-URL: Repository, https://github.com/vulnotes/vulnotes-python-sdk
|
|
8
|
+
Author: Vulnotes
|
|
9
|
+
License: MIT License
|
|
10
|
+
|
|
11
|
+
Copyright (c) 2026 Vulnotes
|
|
12
|
+
|
|
13
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
14
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
15
|
+
in the Software without restriction, including without limitation the rights
|
|
16
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
17
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
18
|
+
furnished to do so, subject to the following conditions:
|
|
19
|
+
|
|
20
|
+
The above copyright notice and this permission notice shall be included in all
|
|
21
|
+
copies or substantial portions of the Software.
|
|
22
|
+
|
|
23
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
24
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
25
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
26
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
27
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
28
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
29
|
+
SOFTWARE.
|
|
30
|
+
License-File: LICENSE
|
|
31
|
+
Keywords: api,pentest,reporting,sdk,vulnerability,vulnotes
|
|
32
|
+
Classifier: Development Status :: 4 - Beta
|
|
33
|
+
Classifier: Intended Audience :: Developers
|
|
34
|
+
Classifier: Intended Audience :: Information Technology
|
|
35
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
36
|
+
Classifier: Operating System :: OS Independent
|
|
37
|
+
Classifier: Programming Language :: Python :: 3
|
|
38
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
39
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
40
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
41
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
42
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
43
|
+
Classifier: Topic :: Security
|
|
44
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
45
|
+
Requires-Python: >=3.9
|
|
46
|
+
Requires-Dist: requests>=2.28
|
|
47
|
+
Provides-Extra: dev
|
|
48
|
+
Requires-Dist: pytest>=7; extra == 'dev'
|
|
49
|
+
Requires-Dist: ruff>=0.4; extra == 'dev'
|
|
50
|
+
Description-Content-Type: text/markdown
|
|
51
|
+
|
|
52
|
+
# vulnotes-python-sdk
|
|
53
|
+
|
|
54
|
+
Python client for the [Vulnotes](https://vulnotes.com) REST API.
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
pip install vulnotes
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Needs Python 3.9 or later. The only dependency is `requests`.
|
|
61
|
+
|
|
62
|
+
## Getting started
|
|
63
|
+
|
|
64
|
+
Create an API key in Vulnotes under Settings > API Keys, then:
|
|
65
|
+
|
|
66
|
+
```python
|
|
67
|
+
from vulnotes import VulnotesClient
|
|
68
|
+
|
|
69
|
+
client = VulnotesClient("https://acme.vulnotes.app", api_key="vuln_sk_...")
|
|
70
|
+
|
|
71
|
+
report = client.reports.create("External pentest Q3", language="EN")
|
|
72
|
+
|
|
73
|
+
client.findings.add(report["_id"], {
|
|
74
|
+
"title": "SQL Injection in /login",
|
|
75
|
+
"severity": "Critical",
|
|
76
|
+
"cvss": {"vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"},
|
|
77
|
+
"data": {"EN": {"title": "SQL Injection in /login", "description": "..."}},
|
|
78
|
+
})
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
If `VULNOTES_URL` and `VULNOTES_API_KEY` are set in the environment you can just do `VulnotesClient()`.
|
|
82
|
+
|
|
83
|
+
Methods return plain dicts and lists matching the API's JSON. File exports return bytes. If you're wondering what a key is allowed to do, `client.api_keys.me()` tells you.
|
|
84
|
+
|
|
85
|
+
## What's covered
|
|
86
|
+
|
|
87
|
+
Everything reachable with an API key: reports and findings, companies, the vulnerability library, vulnerability templates, report templates, snapshots and review comments, notes, image/attachment uploads, exports (PDF, DOCX, XLSX, ZIP, JSON), the planning calendar, and the AI endpoints. Full endpoint reference: [docs.vulnotes.com](https://docs.vulnotes.com).
|
|
88
|
+
|
|
89
|
+
Anything not wrapped yet can still be called directly:
|
|
90
|
+
|
|
91
|
+
```python
|
|
92
|
+
client.request("GET", f"/reports/{report_id}/snapshots")
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## A few common tasks
|
|
96
|
+
|
|
97
|
+
Iterating without dealing with pages:
|
|
98
|
+
|
|
99
|
+
```python
|
|
100
|
+
for report in client.reports.iter():
|
|
101
|
+
print(report["title"])
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Feeding scanner results into a report:
|
|
105
|
+
|
|
106
|
+
```python
|
|
107
|
+
for issue in results:
|
|
108
|
+
client.findings.add(report_id, {
|
|
109
|
+
"title": issue["name"],
|
|
110
|
+
"severity": issue["severity"],
|
|
111
|
+
"affectedSystems": issue["hosts"],
|
|
112
|
+
"data": {"EN": {"title": issue["name"], "description": issue["detail"]}},
|
|
113
|
+
})
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Downloading exports:
|
|
117
|
+
|
|
118
|
+
```python
|
|
119
|
+
client.reports.export_xlsx(report_id, finding_fields=["title", "severity"], path="findings.xlsx")
|
|
120
|
+
client.reports.archived_pdf(report_id, path="final.pdf") # PDF stored when the report was completed
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Uploading evidence:
|
|
124
|
+
|
|
125
|
+
```python
|
|
126
|
+
client.images.upload("screenshot.png", report_id=report_id)
|
|
127
|
+
client.attachments.upload("nmap-scan.xml", report_id=report_id)
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Dates can be passed as ISO strings or as `datetime.date`/`datetime.datetime`.
|
|
131
|
+
|
|
132
|
+
## Errors
|
|
133
|
+
|
|
134
|
+
Everything raised by the SDK inherits from `vulnotes.VulnotesError`. HTTP errors map to subclasses (`NotFoundError`, `PermissionDeniedError`, `RateLimitError`, ...) with `status_code`, `message` and the parsed body attached.
|
|
135
|
+
|
|
136
|
+
```python
|
|
137
|
+
from vulnotes import NotFoundError
|
|
138
|
+
|
|
139
|
+
try:
|
|
140
|
+
client.reports.get(report_id)
|
|
141
|
+
except NotFoundError:
|
|
142
|
+
# doesn't exist, or the key's owner can't see it
|
|
143
|
+
...
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
A key that lacks the permission an endpoint needs gets a `PermissionDeniedError` naming it. Reports outside the owner's visibility raise `NotFoundError`, not 403; that's intentional on the server side.
|
|
147
|
+
|
|
148
|
+
Idempotent requests are retried automatically on connection errors and 429/502/503/504. Tune with `max_retries`, `timeout` and `verify_ssl` on the client.
|
|
149
|
+
|
|
150
|
+
## Development
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
pip install -e ".[dev]"
|
|
154
|
+
pytest # offline, no instance needed
|
|
155
|
+
ruff check .
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
There's also an integration suite that runs against a real instance. It creates its own fixtures and removes them, but point it at a disposable instance anyway:
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
VULNOTES_TEST_URL=https://dev.example VULNOTES_TEST_API_KEY=vuln_sk_... pytest tests/integration
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## License
|
|
165
|
+
|
|
166
|
+
MIT
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
vulnotes/__init__.py,sha256=pzvYUV7ETWHsj6U_oGSMHT7fDKRXgoQTvfBOz7pLzN4,1012
|
|
2
|
+
vulnotes/_utils.py,sha256=BcJXb98bGHCvy0UdHitOAYoNLLaEN1q6RdflVDZPpCU,2573
|
|
3
|
+
vulnotes/_version.py,sha256=kUR5RAFc7HCeiqdlX36dZOHkUI5wI6V_43RpEcD8b-0,22
|
|
4
|
+
vulnotes/client.py,sha256=L4UjIE_6d_WBnFqNGOOf3GFCofipJffinU_If9uGnzc,8665
|
|
5
|
+
vulnotes/exceptions.py,sha256=oehLpkeUu3n9bhqATfRDqwEVfNiwq1lQwYqcUjgxDVs,3248
|
|
6
|
+
vulnotes/resources/__init__.py,sha256=wZY53VLhe4qVcFszLgBaEG4Ej4Q2t_iy4ACYyaI1K6k,736
|
|
7
|
+
vulnotes/resources/_base.py,sha256=LdB5brmxlyzvV1kbidudaqGQCpURhLShhzW9rtombWo,2129
|
|
8
|
+
vulnotes/resources/ai.py,sha256=k7-9uTOJAgEqY2DUHw-BnurIB-vCLhx7CsvFBrmeP6I,3783
|
|
9
|
+
vulnotes/resources/api_keys.py,sha256=jwAmMt7JX-Avw35J8pVxjkIYQcMQtFfEWe4xbLTWKzM,467
|
|
10
|
+
vulnotes/resources/attachments.py,sha256=4qIYxeNqRLbyL63C-qwcvGJ2-CyR7Lcl6LwNrdUF4Zw,2408
|
|
11
|
+
vulnotes/resources/comments.py,sha256=fXO1cl7vx6-RZgdfDu7UD8g68IznGDBvM-5mBO7bBd4,3360
|
|
12
|
+
vulnotes/resources/companies.py,sha256=JT7dIqeL1V05CRXKs_NkeSgXthjlgEiwzt8j97abgwo,2955
|
|
13
|
+
vulnotes/resources/findings.py,sha256=hd3FGGqr2H6uRJqof0kYWObzRfcCwBXIAq15OrwZwVU,2562
|
|
14
|
+
vulnotes/resources/images.py,sha256=bLDvUrvw3v7Pt32PkBryw3UJLGxMa2pDDjeVBZTbWVg,2995
|
|
15
|
+
vulnotes/resources/notes.py,sha256=XWfOqEwfmbvsw6d25eYNsXsW3vSclJqG8jE0qpFlbPA,2426
|
|
16
|
+
vulnotes/resources/planning.py,sha256=yHDbVjNKGloDHMapuZtEehOdYyP9s3ORx4x_p4GaU10,8056
|
|
17
|
+
vulnotes/resources/report_templates.py,sha256=0VIYIZNz3wjdq6mUAva-D66xkox09MC31xTfnNnErjk,2170
|
|
18
|
+
vulnotes/resources/reports.py,sha256=aTwSDwd875VYWGrkSG_gSUCvt0Oa7BySPHVjayKn_7Y,11073
|
|
19
|
+
vulnotes/resources/snapshots.py,sha256=BwR3BUXthRPBYs_-YJWjyFXTCTrlCWhFft0seIoDqqE,1427
|
|
20
|
+
vulnotes/resources/vulnerabilities.py,sha256=eJePfhy1JTpY_bit5Y-q62qZpgYwks3LfY-18VxA5jk,2933
|
|
21
|
+
vulnotes/resources/vulnerability_templates.py,sha256=kCQhk-nmzknGnFVf0OACR_GRmLmlOSEyTuNMPs5WpRQ,5076
|
|
22
|
+
vulnotes-0.1.0.dist-info/METADATA,sha256=E_640nLyeB5j830wupkmpKfwUmtt71V00x7pIGOR1mI,6065
|
|
23
|
+
vulnotes-0.1.0.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
|
|
24
|
+
vulnotes-0.1.0.dist-info/licenses/LICENSE,sha256=q1AGn8OHsj4hljBl6daSiCIPeP7KNNO7vaUK-GrdoBw,1065
|
|
25
|
+
vulnotes-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Vulnotes
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, 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,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|