---
title: "HOST-PKG-002 Repository Signature Checks Disabled"
canonical: https://openvapt.com/checks/HOST-PKG-002.html
html: https://openvapt.com/checks/HOST-PKG-002.html
site: OpenVAPT, https://openvapt.com/
license: OpenVAPT Source-Available Licence 1.3, https://openvapt.com/legal/licence-text.html
modified: 2026-10-14
version: 0.1.0-alpha.6
---

# HOST-PKG-002 Repository Signature Checks Disabled

Checks that the package manager verifies repository signatures, so a tampered mirror or intercepted download cannot install code as root.

- Domain: Server
- Severity: High
- Control category: Patch and Vulnerability Management
- Fix effort: low
- CVSS v3.1 vector: `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- CIS Controls v8: 7.3
- NIST CSF 2.0: ID.RA-01, PR.PS-02
- CWE: CWE-494, CWE-347
- OWASP Top 10 2021: A08:2021
- NIST SP 800-53 Rev. 5: SI-7, CM-14, SR-3, SR-11
- Benchmark topic: Package manager repositories and GPG keys are configured (topic only, no benchmark text)

## Why It Matters

Package installation runs as root. apt and dnf verify a signature over the repository index before trusting any package in it; an entry marked trusted=yes, AllowUnauthenticated or gpgcheck=0 switches that off, and a mirror operator or anyone on the network path can then deliver a modified package at the next update.

## How It Detects

apt: reads /etc/apt/sources.list, /etc/apt/sources.list.d/*.list (entries with [trusted=yes]) and *.sources (Trusted: yes), plus /etc/apt/apt.conf and /etc/apt/apt.conf.d/* for AllowUnauthenticated or AllowInsecureRepositories set to true. dnf and yum: reads /etc/yum.repos.d/*.repo, /etc/dnf/dnf.conf and /etc/yum.conf for gpgcheck=0 in any section. Skipped when no repository files exist; Incomplete when some exist but cannot be read.

## How to Fix

Remove trusted=yes (or Trusted: yes) from the listed source, install the repository's signing key under /etc/apt/keyrings and reference it with signed-by=; remove AllowUnauthenticated and AllowInsecureRepositories settings. On dnf and yum set gpgcheck=1 (and repo_gpgcheck=1 where supported) in each listed repository and import its key with rpm --import.

## How to Verify

```
grep -r 'trusted=yes' /etc/apt/ ; grep -r 'gpgcheck=0' /etc/yum.repos.d/ /etc/dnf/dnf.conf 2>/dev/null
```

## Learn the Theory

- [P1 Linux Server Hardening](https://openvapt.com/academy/p1.md)
- [P22 Authentication Policy and Package Hygiene](https://openvapt.com/academy/p22.md)

## References

- [apt-secure(8), Debian manual pages](https://manpages.debian.org/trixie/apt/apt-secure.8.en.html)
- [dnf.conf(5), Ubuntu noble manual pages (gpgcheck)](https://manpages.ubuntu.com/manpages/noble/en/man5/dnf.conf.5.html)
- [NIST SP 800-40 Rev. 4, Guide to Enterprise Patch Management Planning](https://csrc.nist.gov/pubs/sp/800/40/r4/final)

## Source Code

https://github.com/OpenVAPT/openvapt/blob/574f7f3333c44b75a3c649e2d93a76d507f75adf/internal/checks/host/pkg_depth.go

Run it: `openvapt scan --only HOST-PKG-002`. Read it offline: `openvapt explain HOST-PKG-002`.

---

OpenVAPT is academic, non-commercial, source-available and built by AI Cybersecurity Engineers (AI systems, not people). Free for your own use on machines you own or control, 100% at your own risk; not for sale and not for providing services. This page in HTML: https://openvapt.com/checks/HOST-PKG-002.html. Part of OpenVAPT Check Catalogue. How to cite: https://openvapt.com/cite.html. Site summary for models: https://openvapt.com/llms.txt.
