@@ -9,6 +9,7 @@ In previous chapters, we have already provided some tips designed to help ensure
99safer operation.
1010
1111.. seealso ::
12+ * :ref: `uv-audit `
1213 * :ref: `secure-release-workflow `
1314 * :ref: `zizmorcore `
1415 * :ref: `add_2fa `
@@ -29,26 +30,37 @@ This check determines whether the project has open, unfixed vulnerabilities in
2930its own code base or in its dependencies. An open vulnerability can be easily
3031exploited and should be closed as soon as possible.
3132
32- For such a check, you can use for example `uv-secure
33- <https://pypi.org/project/uv-secure/> `_. Alternatively, you can use `osv
34- <https://pypi.org/project/osv/> `_ or `pip-audit
35- <https://pypi.org/project/pip-audit/> `_, which uses the `Open Source
33+ For such a check, you can use for example :ref: `uv audit <uv-audit >`.
34+ Alternatively, you can use `osv <https://pypi.org/project/osv/ >`_ or `pip-audit
35+ <https://pypi.org/project/pip-audit/> `_.They usually refer to the `Open Source
3636Vulnerability Database <https://osv.dev> `_.
3737
3838If a vulnerability is found in a dependency, you should update to a
3939non-vulnerable version; if no update is available, you should consider removing
4040the dependency.
4141
42- If you believe that the vulnerability does not affect your project, an
43- :file: ` osv-scanner.toml ` file can be created for ``osv ``, including the ID to
44- ignore and a reason, for example:
42+ If you believe that the security vulnerability does not affect your project, you
43+ can define exceptions for ``uv audit `` in the :file: ` pyproject.toml ` file, for
44+ example:
4545
4646.. code-block :: toml
47+ :caption: pyproject.toml
4748
48- [[IgnoredVulns]]
49- id = "GO-2022-1059"
50- # ignoreUntil = 2022-11-09 # Optional exception expiry date
51- reason = "No external http servers are written in Go lang."
49+ [tool.uv.audit]
50+ ignore = ["PYSEC-2022-43017", "GHSA-5239-wwwm-4pmq"]
51+
52+ or better still:
53+
54+ .. code-block :: toml
55+ :caption: pyproject.toml
56+
57+ [tool.uv.audit]
58+ ignore-until-fixed = ["PYSEC-2022-43017"]
59+
60+ .. seealso ::
61+ * `ignore <https://docs.astral.sh/uv/reference/settings/#audit_ignore >`_
62+ * `ignore-until-fixed
63+ <https://docs.astral.sh/uv/reference/settings/#audit_ignore-until-fixed> `_
5264
5365Maintenance
5466-----------
0 commit comments