Skip to main content
Version: Next

DNF (RHEL /RPM)

Collect an SBOM component using the DNF Package Manager.

Details

Transfer Tag

hoppr.core_plugins.collect_dnf_plugin

Supported PURLs

rpm

System Dependencies

Transfer File Example

---
schemaVersion: v1
kind: transfer

stages:
collect:
plugins:
- name: hoppr.core_plugins.collect_dnf_plugin
config:
process_timeout: 60

max_processes: 3

Configuration Options​

OptionDetails
dnf_commandString. Defaults to dnf. Command to be used to execute dnf commands. May be overridden with another command that uses the same syntax, or a fully qualified path if dnf is not on the default $PATH.
process_timeoutNumber of seconds to attempt collect before timeout. Default: 60
base_archString. Value for the $base_arch dnf variable to parse to in local repositories. Default: None
release_verString. Value for the $release_ver dnf variable to parse to in local repositories. Default: None
vars_dirPath. Directory to look for dnf variable files when parsing local repositories.Default: /etc/dnf/vars, /etc/yum/vars

Proxy and Certificate Configuration​

To configure proxies, set the following environment variables:

Environment Variable NameDescription
http_proxyProxy for the HTTP protocol.
https_proxyProxy for the HTTPS protocol.
no_proxyComma-separated list of domains where proxies won't be used.

By default all certificates trusted by the system are used for the verification of the server certificate by DNF. For information on how to install a root CA certificate in Certificate System, see [https://access.redhat.com/documentation/en-us/red_hat_certificate_system/9/html/planning_installation_and_deployment_guide/setting_up_a_root_certificate_authority].

Authentication Configuration​

If using cert authentication, you can set paths to your cert and key in the repo config file. To specify credentials, you need a credentials file.

Sample credentials file:

---
schemaVersion: v1
kind: Credentials

metadata:
name: Registry Credentials
version: v1
description: Sample credentials file

credential_required_services:
- url: registry.gitlab.com
user_env: CI_REGISTRY_USER
pass_env: CI_REGISTRY_PASSWORD

SBOM Generation Tools​

note

For more tools visit the CycloneDX Tool Center