|
| 1 | +documentation_complete: true |
| 2 | + |
| 3 | +title: 'Remove dnf and python3-dnf Packages' |
| 4 | + |
| 5 | +description: |- |
| 6 | + The dnf and python3-dnf packages provide package management utilities and Python bindings |
| 7 | + for installing, updating, and removing software on Linux systems. CoreOS is designed to be |
| 8 | + an immutable operating system, where software installation and updates are managed through |
| 9 | + atomic upgrades and containerization, rather than traditional package management. |
| 10 | + Retaining these utilities can introduce risks by allowing direct package installation, |
| 11 | + which may compromise system integrity and increase the attack surface. |
| 12 | + It is recommended to remove these packages to maintain the intended security posture of CoreOS. |
| 13 | +
|
| 14 | +rationale: |- |
| 15 | + Retaining dnf and python3-dnf on CoreOS allows anyone with access to the system to install |
| 16 | + or modify packages, potentially altering the operating system and undermining its immutability. |
| 17 | + Attackers or unauthorized users could also reconfigure DNF to use untrusted repositories, |
| 18 | + introducing malicious software or vulnerabilities. Removing dnf and python3-dnf prevents |
| 19 | + unauthorized changes and maintains system integrity. |
| 20 | +
|
| 21 | +severity: high |
| 22 | + |
| 23 | +ocil_clause: 'the packages are installed' |
| 24 | + |
| 25 | +ocil: |- |
| 26 | + To verify that the <tt>dnf</tt> and <tt>python3-dnf</tt> packages are not installed, |
| 27 | + run the following command: |
| 28 | + <pre>$ rpm -q dnf python3-dnf</pre> |
| 29 | + The output should indicate that both packages are not installed. |
| 30 | +
|
| 31 | +fixtext: |- |
| 32 | + To remove the dnf and python3-dnf packages, execute the following command: |
| 33 | +
|
| 34 | + $ rpm-ostree override remove dnf python3-dnf |
| 35 | +
|
| 36 | + A reboot is required for the changes to take effect. |
| 37 | +
|
| 38 | +template: |
| 39 | + name: package_removed |
| 40 | + vars: |
| 41 | + pkgname: |
| 42 | + - dnf |
| 43 | + - python3-dnf |
0 commit comments