diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml new file mode 100644 index 0000000..105c853 --- /dev/null +++ b/.pre-commit-hooks.yaml @@ -0,0 +1,6 @@ +- id: uv-secure + name: uv-secure + description: "Run 'uv-secure' to check uv.lock dependencies for known vulnerabilities" + entry: uv-secure + language: python + pass_filenames: false diff --git a/README.md b/README.md index aa8fba1..3153ef9 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,26 @@ Scan your uv.lock file for dependencies with known vulnerabilities +## Installation + +I recommend installing uv-secure as a uv tool or with pipx as it's intended to be used +as a CLI tool and it probably only makes sense to have one version installed globally. + +Installing with uv tool as follows: + +```shell +uv tool install uv-secure +``` + +or with pipx: + +```shell +pipx install uv-secure +``` + +you can optionally install uv-secure as a development dependency in a virtual +environment. + ## Usage After installation you can run uv-secure --help to see the options. @@ -31,11 +51,11 @@ working directory and scan that for known vulnerabilities. E.g. ```text >> uv-secure Checking dependencies for vulnerabilities... -╭──────────────────────────────────╮ -│ No vulnerabilities detected! │ -│ Checked: 160 dependencies │ -│ All dependencies appear safe! 🎉 │ -╰──────────────────────────────────╯ +╭───────────────────────────────╮ +│ No vulnerabilities detected! │ +│ Checked: 160 dependencies │ +│ All dependencies appear safe! │ +╰───────────────────────────────╯ ``` ## Related Work and Motivation diff --git a/src/uv_secure/run.py b/src/uv_secure/run.py index b25fe78..772100f 100644 --- a/src/uv_secure/run.py +++ b/src/uv_secure/run.py @@ -156,7 +156,7 @@ def check_dependencies(uv_lock_path: Path, ignore_ids: list[str]) -> int: Panel.fit( f"[bold green]No vulnerabilities detected![/]\n" f"Checked: [bold]{total_dependencies}[/] {total_plural}\n" - f"All dependencies appear safe! 🎉" + f"All dependencies appear safe!" ) ) return 0 # Exit successfully