depsdev 0.0.4__py3-none-any.whl → 0.0.5__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.
depsdev/__main__.py CHANGED
@@ -170,6 +170,7 @@ async def report(filename: str) -> None:
170
170
  depsdev report pom.xml
171
171
  depsdev report Pipfile.lock
172
172
  """
173
+ filename = os.path.abspath(filename)
173
174
  extractor = get_extractor(filename)
174
175
  packages = extractor.extract(filename)
175
176
  await main_helper([x.to_string() for x in packages])
depsdev/_version.py CHANGED
@@ -1,7 +1,14 @@
1
1
  # file generated by setuptools-scm
2
2
  # don't change, don't track in version control
3
3
 
4
- __all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
4
+ __all__ = [
5
+ "__version__",
6
+ "__version_tuple__",
7
+ "version",
8
+ "version_tuple",
9
+ "__commit_id__",
10
+ "commit_id",
11
+ ]
5
12
 
6
13
  TYPE_CHECKING = False
7
14
  if TYPE_CHECKING:
@@ -9,13 +16,19 @@ if TYPE_CHECKING:
9
16
  from typing import Union
10
17
 
11
18
  VERSION_TUPLE = Tuple[Union[int, str], ...]
19
+ COMMIT_ID = Union[str, None]
12
20
  else:
13
21
  VERSION_TUPLE = object
22
+ COMMIT_ID = object
14
23
 
15
24
  version: str
16
25
  __version__: str
17
26
  __version_tuple__: VERSION_TUPLE
18
27
  version_tuple: VERSION_TUPLE
28
+ commit_id: COMMIT_ID
29
+ __commit_id__: COMMIT_ID
19
30
 
20
- __version__ = version = '0.0.4'
21
- __version_tuple__ = version_tuple = (0, 0, 4)
31
+ __version__ = version = '0.0.5'
32
+ __version_tuple__ = version_tuple = (0, 0, 5)
33
+
34
+ __commit_id__ = commit_id = None
depsdev/cli/purl.py CHANGED
@@ -48,7 +48,7 @@ class MavenExtractor:
48
48
  """
49
49
  package, *rest = line.split()
50
50
  _is_optional = bool(rest)
51
- group, artifact, _type, version, *classifier = package.split(":")
51
+ group, artifact, _type, version, *_classifier = package.split(":")
52
52
  return PackageURL(
53
53
  type="maven",
54
54
  namespace=group,
@@ -118,6 +118,7 @@ class RequirementsExtractor:
118
118
  parts = _line.split(";")[0].split("==")
119
119
  if len(parts) == 2: # noqa: PLR2004
120
120
  name, version = parts
121
+ version = version.strip(" \\")
121
122
  yield PackageURL(
122
123
  type="pypi",
123
124
  namespace=None,
depsdev/cli/vuln.py CHANGED
@@ -64,7 +64,7 @@ async def main_helper(packages: list[str]) -> int:
64
64
  for vuln in advisories:
65
65
  table.add_row(
66
66
  f"[link=https://github.com/advisories/{vuln['id']}]{vuln['id']}[/link]",
67
- vuln["summary"],
67
+ vuln.get("summary"),
68
68
  get_version_fix(vuln) or "unknown",
69
69
  )
70
70
  console.print(table)
@@ -0,0 +1,143 @@
1
+ Metadata-Version: 2.4
2
+ Name: depsdev
3
+ Version: 0.0.5
4
+ Summary: Python wrapper for https://deps.dev/ API
5
+ Project-URL: Documentation, https://github.com/FlavioAmurrioCS/depsdev#readme
6
+ Project-URL: Issues, https://github.com/FlavioAmurrioCS/depsdev/issues
7
+ Project-URL: Source, https://github.com/FlavioAmurrioCS/depsdev
8
+ Author-email: Flavio Amurrio <25621374+FlavioAmurrioCS@users.noreply.github.com>
9
+ License-Expression: MIT
10
+ License-File: LICENSE.txt
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Programming Language :: Python
13
+ Classifier: Programming Language :: Python :: 3.9
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Programming Language :: Python :: 3.14
19
+ Classifier: Programming Language :: Python :: Implementation :: CPython
20
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
21
+ Requires-Python: >=3.9
22
+ Requires-Dist: httpx
23
+ Requires-Dist: packageurl-python
24
+ Provides-Extra: cli
25
+ Requires-Dist: rich; extra == 'cli'
26
+ Requires-Dist: typer-slim; extra == 'cli'
27
+ Provides-Extra: tests
28
+ Requires-Dist: pytest; extra == 'tests'
29
+ Requires-Dist: pytest-asyncio; extra == 'tests'
30
+ Requires-Dist: rich; extra == 'tests'
31
+ Requires-Dist: tomli; (python_version < '3.11') and extra == 'tests'
32
+ Requires-Dist: typer-slim; extra == 'tests'
33
+ Provides-Extra: types
34
+ Requires-Dist: mypy; extra == 'types'
35
+ Requires-Dist: pyrefly; extra == 'types'
36
+ Requires-Dist: pyright[nodejs]; extra == 'types'
37
+ Requires-Dist: pytest; extra == 'types'
38
+ Requires-Dist: pytest-asyncio; extra == 'types'
39
+ Requires-Dist: rich; extra == 'types'
40
+ Requires-Dist: tomli; (python_version < '3.11') and extra == 'types'
41
+ Requires-Dist: ty; extra == 'types'
42
+ Requires-Dist: typer-slim; extra == 'types'
43
+ Requires-Dist: typing-extensions; extra == 'types'
44
+ Description-Content-Type: text/markdown
45
+
46
+ # depsdev
47
+
48
+ [![PyPI - Version](https://img.shields.io/pypi/v/depsdev.svg)](https://pypi.org/project/depsdev)
49
+ [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/depsdev.svg)](https://pypi.org/project/depsdev)
50
+ [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/FlavioAmurrioCS/depsdev/main.svg)](https://results.pre-commit.ci/latest/github/FlavioAmurrioCS/depsdev/main)
51
+
52
+ -----
53
+
54
+ ## Table of Contents
55
+
56
+ - [depsdev](#depsdev)
57
+ - [Table of Contents](#table-of-contents)
58
+ - [Overview](#overview)
59
+ - [Installation](#installation)
60
+ - [CLI Usage](#cli-usage)
61
+ - [Report mode](#report-mode)
62
+ - [License](#license)
63
+
64
+ ## Overview
65
+
66
+ Thin Python wrapper (async-first) around the public [deps.dev REST API](https://deps.dev) plus an optional Typer-based CLI. Provides straightforward methods mapping closely to the documented endpoints; responses are returned as decoded JSON (dict / list). Alpha endpoints can be enabled via `DEPSDEV_V3_ALPHA=true` and may change without notice.
67
+
68
+ ## Installation
69
+
70
+ ```bash
71
+ pip install depsdev # library only
72
+ pipx install depsdev[cli] # CLI
73
+ uv tool install depsdev[cli] # CLI
74
+ ```
75
+
76
+ ## CLI Usage
77
+
78
+ ```bash
79
+ [flavio@Mac ~/dev/github.com/FlavioAmurrioCS/depsdev][main ✗]
80
+ $ depsdev --help
81
+
82
+ Usage: depsdev [OPTIONS] COMMAND [ARGS]...
83
+
84
+ ╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
85
+ │ --install-completion [bash|zsh|fish|powershell|pwsh] Install completion for the specified shell. │
86
+ │ --show-completion [bash|zsh|fish|powershell|pwsh] Show completion for the specified shell, to copy it or customize the installation. │
87
+ │ --help Show this message and exit. │
88
+ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
89
+ ╭─ Commands ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
90
+ │ report Show vulnerabilities for packages in a file. │
91
+ │ api A CLI tool to interact with the https://docs.deps.dev/api/ │
92
+ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
93
+ ╭─ Utils ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
94
+ │ purl Extract package URLs from various formats. │
95
+ │ vuln Main function to analyze packages for vulnerabilities. │
96
+ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
97
+
98
+ ```
99
+
100
+ ### Report mode
101
+
102
+ Parses depedency file and reports the vulnerabilities and the version where it was fixed.
103
+
104
+ ```bash
105
+ [flavio@Mac ~/dev/github.com/FlavioAmurrioCS/depsdev][main ✗]
106
+ $ depsdev report --help
107
+
108
+ Usage: depsdev report [OPTIONS] FILENAME
109
+
110
+ Show vulnerabilities for packages in a file.
111
+
112
+ Example usage:
113
+ depsdev report requirements.txt
114
+ depsdev report pom.xml
115
+ depsdev report Pipfile.lock
116
+
117
+ ╭─ Arguments ────────────────────────────────────────────────╮
118
+ │ * filename TEXT [required] │
119
+ ╰────────────────────────────────────────────────────────────╯
120
+ ╭─ Options ──────────────────────────────────────────────────╮
121
+ │ --help Show this message and exit. │
122
+ ╰────────────────────────────────────────────────────────────╯
123
+
124
+ [flavio@Mac ~/dev/github.com/FlavioAmurrioCS/depsdev][main ✗]
125
+ $ uv export > requirements.txt
126
+ Resolved 34 packages in 6ms
127
+
128
+ [flavio@Mac ~/dev/github.com/FlavioAmurrioCS/depsdev][main ✗]
129
+ $ depsdev report requirements.txt
130
+ Analysing 10 packages...
131
+ Found 1 packages with advisories.
132
+ pkg:pypi/idna@3.6
133
+ ┏━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
134
+ ┃ Id ┃ Summary ┃ Fixed ┃
135
+ ┡━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
136
+ │ GHSA-jjg7-2v4v-x38h │ Internationalized Domain Names in Applications (IDNA) vulnerable to denial of service from specially crafted inputs to idna.encode │ 3.7 │
137
+ │ PYSEC-2024-60 │ │ 1d365e17e10d72d0b7876316fc7b9… │
138
+ └─────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴────────────────────────────────┘
139
+ ```
140
+
141
+ ## License
142
+
143
+ `depsdev` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
@@ -0,0 +1,16 @@
1
+ depsdev/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ depsdev/__main__.py,sha256=BefEx7haQe2q0GuzIjg7aIeDBElmf4HCOenflZJiKc4,5649
3
+ depsdev/_version.py,sha256=YRV1ohn6CdKEhsUOmFFMmr5UTjMv4Ydw3WJGxF2BHBs,704
4
+ depsdev/base.py,sha256=knP1QrgtLQbwgZYqe5B-QNecYpBGQCLsQeIQRprPQKk,1314
5
+ depsdev/osv.py,sha256=AWP3E1_LmUTbXGmA15yZazTrEU-uPf1f5TW69o8LW04,5983
6
+ depsdev/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
+ depsdev/v3.py,sha256=vLkOYzT3wx5YuEnjwI1t7mcXXCbGmSVsoK4V1GbUGLc,7896
8
+ depsdev/v3alpha.py,sha256=KUl8Fq9mLExAfrU5T43vAc1dlRBbugN3H2Eg4Tv5XxE,13908
9
+ depsdev/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
+ depsdev/cli/purl.py,sha256=vl6Ix3r0mgvuy8MxQ_ayVYDmLNpok3qLqsXIMlJ9IgI,4967
11
+ depsdev/cli/vuln.py,sha256=sTdeFpthSEhavzbfvSZ5PxBQltDGdVBcmscPZO9dkS8,2206
12
+ depsdev-0.0.5.dist-info/METADATA,sha256=UekH3aUH-CYSIkTWQQGeoOC9JL-Hf4nzSCGq-Rgxxgw,10947
13
+ depsdev-0.0.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
14
+ depsdev-0.0.5.dist-info/entry_points.txt,sha256=yVCFtXda2xhj-7SmKEw7ynA_8QJrmKi9tORDw2uco9Q,50
15
+ depsdev-0.0.5.dist-info/licenses/LICENSE.txt,sha256=jpNC8_qYxlJENCgo7GKooe4rsIx-t_wIWl7ngr03F2k,1131
16
+ depsdev-0.0.5.dist-info/RECORD,,
@@ -1,73 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: depsdev
3
- Version: 0.0.4
4
- Summary: Python wrapper for https://deps.dev/ API
5
- Project-URL: Documentation, https://github.com/FlavioAmurrioCS/depsdev#readme
6
- Project-URL: Issues, https://github.com/FlavioAmurrioCS/depsdev/issues
7
- Project-URL: Source, https://github.com/FlavioAmurrioCS/depsdev
8
- Author-email: Flavio Amurrio <25621374+FlavioAmurrioCS@users.noreply.github.com>
9
- License-Expression: MIT
10
- License-File: LICENSE.txt
11
- Classifier: Development Status :: 4 - Beta
12
- Classifier: Programming Language :: Python
13
- Classifier: Programming Language :: Python :: 3.9
14
- Classifier: Programming Language :: Python :: 3.10
15
- Classifier: Programming Language :: Python :: 3.11
16
- Classifier: Programming Language :: Python :: 3.12
17
- Classifier: Programming Language :: Python :: 3.13
18
- Classifier: Programming Language :: Python :: 3.14
19
- Classifier: Programming Language :: Python :: Implementation :: CPython
20
- Classifier: Programming Language :: Python :: Implementation :: PyPy
21
- Requires-Python: >=3.9
22
- Requires-Dist: httpx
23
- Requires-Dist: packageurl-python
24
- Provides-Extra: cli
25
- Requires-Dist: rich; extra == 'cli'
26
- Requires-Dist: typer-slim; extra == 'cli'
27
- Provides-Extra: tests
28
- Requires-Dist: pytest; extra == 'tests'
29
- Requires-Dist: pytest-asyncio; extra == 'tests'
30
- Requires-Dist: rich; extra == 'tests'
31
- Requires-Dist: tomli; (python_version < '3.11') and extra == 'tests'
32
- Requires-Dist: typer-slim; extra == 'tests'
33
- Provides-Extra: types
34
- Requires-Dist: mypy; extra == 'types'
35
- Requires-Dist: pyrefly; extra == 'types'
36
- Requires-Dist: pyright[nodejs]; extra == 'types'
37
- Requires-Dist: pytest; extra == 'types'
38
- Requires-Dist: pytest-asyncio; extra == 'types'
39
- Requires-Dist: rich; extra == 'types'
40
- Requires-Dist: tomli; (python_version < '3.11') and extra == 'types'
41
- Requires-Dist: ty; extra == 'types'
42
- Requires-Dist: typer-slim; extra == 'types'
43
- Requires-Dist: typing-extensions; extra == 'types'
44
- Description-Content-Type: text/markdown
45
-
46
- # depsdev
47
-
48
- [![PyPI - Version](https://img.shields.io/pypi/v/depsdev.svg)](https://pypi.org/project/depsdev)
49
- [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/depsdev.svg)](https://pypi.org/project/depsdev)
50
- [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/FlavioAmurrioCS/depsdev/main.svg)](https://results.pre-commit.ci/latest/github/FlavioAmurrioCS/depsdev/main)
51
-
52
- -----
53
-
54
- ## Table of Contents
55
-
56
- - [Overview](#overview)
57
- - [Installation](#installation)
58
- - [License](#license)
59
-
60
- ## Overview
61
-
62
- Thin Python wrapper (async-first) around the public [deps.dev REST API](https://deps.dev) plus an optional Typer-based CLI. Provides straightforward methods mapping closely to the documented endpoints; responses are returned as decoded JSON (dict / list). Alpha endpoints can be enabled via `DEPSDEV_V3_ALPHA=true` and may change without notice.
63
-
64
- ## Installation
65
-
66
- ```bash
67
- pip install depsdev # library only
68
- pip install depsdev[cli] # library + CLI
69
- ```
70
-
71
- ## License
72
-
73
- `depsdev` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
@@ -1,16 +0,0 @@
1
- depsdev/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- depsdev/__main__.py,sha256=h_r25lhyipQ2PLzuLYsmlIsKmkIfcNx4tnLWi_tXPUk,5608
3
- depsdev/_version.py,sha256=EY1c6JeG6uVHQoQcoxYAagjmJgQQxJk7iQ23gAoevU4,511
4
- depsdev/base.py,sha256=knP1QrgtLQbwgZYqe5B-QNecYpBGQCLsQeIQRprPQKk,1314
5
- depsdev/osv.py,sha256=AWP3E1_LmUTbXGmA15yZazTrEU-uPf1f5TW69o8LW04,5983
6
- depsdev/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
- depsdev/v3.py,sha256=vLkOYzT3wx5YuEnjwI1t7mcXXCbGmSVsoK4V1GbUGLc,7896
8
- depsdev/v3alpha.py,sha256=KUl8Fq9mLExAfrU5T43vAc1dlRBbugN3H2Eg4Tv5XxE,13908
9
- depsdev/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
- depsdev/cli/purl.py,sha256=3zRX8SVCXdZ9guQKAS7Y7FD3Itjjk_oXr-NKPrzw4O4,4915
11
- depsdev/cli/vuln.py,sha256=V1RRpZjYXBkRylv3tzBwV1yXA9G66IWDt4JspA2g9R4,2202
12
- depsdev-0.0.4.dist-info/METADATA,sha256=xV4VlqXYBlFXCqCOqc5Hus00m554-VELau5oFvtVbxw,3031
13
- depsdev-0.0.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
14
- depsdev-0.0.4.dist-info/entry_points.txt,sha256=yVCFtXda2xhj-7SmKEw7ynA_8QJrmKi9tORDw2uco9Q,50
15
- depsdev-0.0.4.dist-info/licenses/LICENSE.txt,sha256=jpNC8_qYxlJENCgo7GKooe4rsIx-t_wIWl7ngr03F2k,1131
16
- depsdev-0.0.4.dist-info/RECORD,,