Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES/+python-remote-vulnerabilities.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added `--vulnerabilities`/`--no-vulnerabilities` options to Python remotes to control automatic vulnerability scans after sync.
6 changes: 6 additions & 0 deletions src/pulpcore/cli/python/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@ def remote() -> None:
help=_("Sync available package provenances"),
needs_plugins=[PluginRequirement("python", specifier=">=3.22.0")],
),
pulp_option(
"--vulnerabilities/--no-vulnerabilities",
default=None,
help=_("Scan new repository versions for vulnerabilities after each successful sync"),
needs_plugins=[PluginRequirement("python", specifier=">=3.37.0")],
),
]

remote.add_command(list_command(decorators=remote_filter_options))
Expand Down
8 changes: 7 additions & 1 deletion tests/scripts/pulp_python/test_remote.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,15 @@ test "$(echo "$OUTPUT" | jq -r .includes[1])" = "shelf-reader"
test "$(echo "$OUTPUT" | jq -r .includes[2])" = "pulp_python"
expect_succ pulp python remote list

expect_succ pulp python remote create --name "cli_test_complex_remote" --url "$PYTHON_REMOTE_URL" --keep-latest-packages 3 --package-types '["sdist", "bdist_wheel"]' --exclude-platforms '["windows"]'
expect_succ pulp python remote create --name "cli_test_complex_remote" \
--url "$PYTHON_REMOTE_URL" --keep-latest-packages 3 \
--package-types '["sdist", "bdist_wheel"]' --exclude-platforms '["windows"]'
if pulp debug has-plugin --name "python" --specifier ">=3.22.0"
then
expect_succ pulp python remote update --remote "cli_test_complex_remote" --provenance
fi
if pulp debug has-plugin --name "python" --specifier ">=3.37.0"
then
expect_succ pulp python remote update --remote "cli_test_complex_remote" --vulnerabilities
fi
expect_succ pulp python remote destroy --remote "cli_test_python_remote"
Loading