| 加固项 | 更新源可信 |
|---|---|
| 适用平台 | Linux |
| 风险等级 | 中 |
| 基线 | gpgcheck=1、无野源 |
RHEL 系
RHEL 系
grep -rE '^(gpgcheck|repo_gpgcheck|baseurl|enabled)' /etc/yum.repos.d/*.repo | head -30
rpm -q gpg-pubkey | head
dnf repolist -v 2>/dev/null | grep -i gpgDebian 系
Debian 系
grep -R 'signed-by\|trusted=yes' /etc/apt/sources.list /etc/apt/sources.list.d/ | head
apt-key list 2>/dev/null | head -20为了装第三方包临时加 trusted=yes/gpgcheck=0:用完必须移除,否则留下长期信任缺口。