rspm create blocklist-rule#
EnhancedAdvanced
Command to create blocklist rules.
Examples#
#
# Examples for Advanced License
#
# Block packages by name and version globally.
rspm create blocklist-rule --package-name=[package name] --description=[text]
rspm create blocklist-rule --package-name=[package name] --version=[version]
# Block packages by name for a specific source.
rspm create blocklist-rule --package-name=[package name] --source=pypi --description=[text]
# Add an exception for a specific source.
rspm create blocklist-rule --source=[source name] --exception --description=[text]
# Block packages by name for a specific repository.
rspm create blocklist-rule --package-name=[package name] --repo=pypi --description=[text]
# Block all 'ggplot2' package versions less than 1.0.0.
# Note that special characters like '<' and '>' must be escaped in quotes.
rspm create blocklist-rule --package-name=ggplot2 --version='<1.0.0' --description="Block 'ggplot2' versions <1.0.0"
# Test the blocklist rules for package 'ggplot2' with version 0.9.0 in the 'cran' repo
rspm test blocklist-rules --repo=cran --package-name=ggplot2 --version=0.9.0
# Block all versions of the 'Django' package in the 'pypi' source
rspm create blocklist-rule --source=pypi --package-name=Django --description="Block 'Django' from PyPI"
# Block the 'a4' package across all Bioconductor versions, including future versions
rspm create blocklist-rule --bioconductor --package-name=a4 --description="Block 'a4' across all Bioconductor versions"
# List all license types for package blocking
rspm list license-types
# Block all packages licensed under AGPL v3 or later
rspm create blocklist-rule --license-types=AGPL-3.0-only,AGPL-3.0-or-later --description="Block all packages licensed under AGPL v3 or later"
# Block all packages with an unknown or missing license
rspm create blocklist-rule --license-types=Unknown --description="Block all packages with an unknown or missing license"
# Make an exception for the 'guesser' PyPI package, which has an unknown license
rspm create blocklist-rule --source=pypi --package-name=guesser --exception --description="Allow 'guesser' PyPI package with an unknown license"
# Block a package if it was deleted from the latest snapshot
rspm create blocklist-rule --deleted-packages --description="Block packages deleted from CRAN or PyPI"
#
# Examples for Enhanced License
#
# Block all packages with known security vulnerabilities
rspm create blocklist-rule --vulns --description="Block all packages with known security vulnerabilities"
Options#
--bioconductor Block in all Bioconductor sources. Advanced licenses only.
--deleted-packages Block a package if it was deleted from the latest CRAN or PyPI snapshot. Advanced licenses only.
--description string Description text. Optional.
--exception Allow package if any of the rules match. Advanced licenses only.
-h, --help help for blocklist-rule
--license string Case-insensitive substring for matching package licenses. Advanced licenses only.
--license-types string A comma-separated list of package license types. License types are either a license identifier in the SPDX License List (non-deprecated), or "Unknown" for an unknown or missing license. Use the 'rspm list license-types' command to display available license types, or see https://spdx.org/licenses/ for a detailed list of SPDX license identifiers. Advanced licenses only.
--package-name string The name of the package. Advanced licenses only.
--priority uint Execution priority, lower is executed earlier. Advanced licenses only. (default 100)
--repo string The name of the repository. Advanced licenses only.
--source string The name of the source. Advanced licenses only.
--succeed-on-existing Do not return an error if rule already exists.
--version string Version string with optional operator for matching like '<1.0.0'. Valid operators include: >, >=, <, and <=. Advanced licenses only.
--vulns Block the package if it contains any known security vulnerabilities.
Options inherited from parent commands#
-a, --address string The address of the remote server. If not specified, the PACKAGEMANAGER_ADDRESS environment variable is used.
-c, --config string Path to config file
--insecure-ssl-skip-verify If true, skip SSL certificate validation. This reduces the security that SSL normally provides.
-o, --output-format string Specify the output format 'human' for human-readable output or 'json' for JSON-encoded output. (default "human")
-v, --verbose Provide additional output