From 36e469b967f2d52e363b156f42f2f2c2b7e7c29d Mon Sep 17 00:00:00 2001 From: Pedro Brochado Date: Fri, 12 Jun 2026 16:01:17 -0300 Subject: [PATCH] Fix pulp-cli commands on vuln report docs It was using a non-existent command before. --- CHANGES/+fix-vuln-report-cli-commands.doc | 2 ++ docs/user/guides/vulnerability_report.md | 21 ++++++++++++++------- 2 files changed, 16 insertions(+), 7 deletions(-) create mode 100644 CHANGES/+fix-vuln-report-cli-commands.doc diff --git a/CHANGES/+fix-vuln-report-cli-commands.doc b/CHANGES/+fix-vuln-report-cli-commands.doc new file mode 100644 index 000000000..d69afca79 --- /dev/null +++ b/CHANGES/+fix-vuln-report-cli-commands.doc @@ -0,0 +1,2 @@ +Fixed CLI commands in the vulnerability report documentation to use `pulp repository version scan`. +The command previously shown there (`pulp vulnerability-report create`) doesn't exit. diff --git a/docs/user/guides/vulnerability_report.md b/docs/user/guides/vulnerability_report.md index 234b7f8ac..b148d3318 100644 --- a/docs/user/guides/vulnerability_report.md +++ b/docs/user/guides/vulnerability_report.md @@ -1,9 +1,13 @@ # Vulnerability Report Pulp Python provides vulnerability scanning capabilities to help you identify known security -vulnerabilities in your Python packages. This feature integrates with the [Open Source Vulnerabilities (OSV)](https://osv.dev/) +vulnerabilities in your Python packages. +This feature integrates with the [Open Source Vulnerabilities (OSV)](https://osv.dev/) database to scan Pulp `RepositoryVersions` for vulnerable packages. +!!! info "New in `pulp_python>=3.21.0`" +!!! info "New in `pulp-cli>=0.37.0` (optional)" + ## Prerequisites Before generating the vulnerability report, ensure that: @@ -13,11 +17,14 @@ Before generating the vulnerability report, ensure that: ## Generating a vulnerability report -To scan a `RepositoryVersion` for vulnerabilities, you need to pass the name of the repository and -optionally the version: +To scan a `RepositoryVersion` for vulnerabilities, call the `scan` command on a repository version. ```bash -pulp vulnerability-report create --repository my-repo --version 1 +# Use the latest version +pulp python repository version scan --repository my-repo + +# Or specify a version +pulp python repository version scan --repository my-repo --version 1 ``` ## Understanding Scan Results @@ -70,7 +77,7 @@ To view the actual vulnerability data, retrieve the vulnerability report: ```bash # Get vulnerability report details -pulp vulnerability-report show --href ${VULN_REPORT_HREF} +pulp show --href ${VULN_REPORT_HREF} ``` The report contains detailed information about each vulnerability, including: @@ -101,9 +108,9 @@ pulp python repository sync \ --remote pypi-remote # 4. Scan for vulnerabilities -pulp vulnerability-report create --repository security-scan-repo +pulp python repository version scan --repository security-scan-repo # 5. View the vulnerability report VULN_REPORT=$(pulp python repository version show --repository security-scan-repo | jq -r '.vuln_report') -pulp vulnerability-report show --href $VULN_REPORT +pulp show --href $VULN_REPORT ```