11# Vulnerability Report
22
33Pulp Python provides vulnerability scanning capabilities to help you identify known security
4- vulnerabilities in your Python packages. This feature integrates with the [ Open Source Vulnerabilities (OSV)] ( https://osv.dev/ )
4+ vulnerabilities in your Python packages.
5+ This feature integrates with the [ Open Source Vulnerabilities (OSV)] ( https://osv.dev/ )
56database to scan Pulp ` RepositoryVersions ` for vulnerable packages.
67
8+ !!! info "New in ` pulp_python>=3.21.0 ` "
9+ !!! info "New in ` pulp-cli>=0.37.0 ` (optional)"
10+
711## Prerequisites
812
913Before generating the vulnerability report, ensure that:
@@ -13,11 +17,14 @@ Before generating the vulnerability report, ensure that:
1317
1418## Generating a vulnerability report
1519
16- To scan a ` RepositoryVersion ` for vulnerabilities, you need to pass the name of the repository and
17- optionally the version:
20+ To scan a ` RepositoryVersion ` for vulnerabilities, call the ` scan ` command on a repository version.
1821
1922``` bash
20- pulp vulnerability-report create --repository my-repo --version 1
23+ # Use the latest version
24+ pulp python repository version scan --repository my-repo
25+
26+ # Or specify a version
27+ pulp python repository version scan --repository my-repo --version 1
2128```
2229
2330## Understanding Scan Results
@@ -70,7 +77,7 @@ To view the actual vulnerability data, retrieve the vulnerability report:
7077
7178``` bash
7279# Get vulnerability report details
73- pulp vulnerability-report show --href ${VULN_REPORT_HREF}
80+ pulp show --href ${VULN_REPORT_HREF}
7481```
7582
7683The report contains detailed information about each vulnerability, including:
@@ -101,9 +108,9 @@ pulp python repository sync \
101108 --remote pypi-remote
102109
103110# 4. Scan for vulnerabilities
104- pulp vulnerability-report create --repository security-scan-repo
111+ pulp python repository version scan --repository security-scan-repo
105112
106113# 5. View the vulnerability report
107114VULN_REPORT=$( pulp python repository version show --repository security-scan-repo | jq -r ' .vuln_report' )
108- pulp vulnerability-report show --href $VULN_REPORT
115+ pulp show --href $VULN_REPORT
109116```
0 commit comments