Skip to content

Commit cc23702

Browse files
committed
Fix pulp-cli commands on vuln report docs
It was using a non-existent command before.
1 parent dc5cfb4 commit cc23702

2 files changed

Lines changed: 16 additions & 7 deletions

File tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fixed CLI commands in the vulnerability report documentation to use `pulp repository version scan`.
2+
The command previously shown there (`pulp vulnerability-report create`) doesn't exit.

docs/user/guides/vulnerability_report.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
# Vulnerability Report
22

33
Pulp 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/)
56
database 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

913
Before 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 repository version scan --repository my-repo
25+
26+
# Or specify a version
27+
pulp 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

7683
The 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 repository version scan --repository security-scan-repo
105112

106113
# 5. View the vulnerability report
107114
VULN_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

Comments
 (0)