我们有机器运行基于RedHat的发行版,如CentOS或科学Linux。如果安装的软件包有任何已知的漏洞,我们希望系统自动通知我们。FreeBSD使用端口-mgmt/端口审计端口来实现这一点。
RedHat提供百胜插件-安全性,它可以通过Bugzilla ID、CVE ID或咨询ID检查漏洞。此外,Fedora最近开始支持百胜插件-安全性。我相信这是在Fedora 16中添加的。
科学的Linux6没有支持yum-插件-截至2011年底的安全性。它确实随/etc/cron.daily/yum-autoupdate一起发布,它每天更新RPM。不过,我不认为这只处理安全性更新。
CentOS做不支持yum-plugin-security。
我监视CentOS和科学Linux邮件列表的更新,但是这很乏味,我想要一些可以自动化的东西。
对于那些维护CentOS和SL系统的人,有什么工具可以:
yum update-minimal --security吗?我已经考虑过使用yum-plugin-changelog输出每个包的变更量,然后解析特定字符串的输出。有什么工具可以做到这一点吗?
发布于 2013-11-13 00:18:30
科学Linux现在可以列出命令行的安全更新。此外,我还可以更新一个系统,使其只应用安全更新,这比默认更新要好(“只需更新所有内容!包括您不关心的错误修复,并引入回归)”。
我已经在科学Linux 6.1和6.4上测试了这一点。我不知道这是什么时候正式宣布,但我会张贴更多,当我发现。
这里有一些例子。
列出安全更新摘要:
[root@node1 ~]# yum updateinfo
Loaded plugins: changelog, downloadonly, fastestmirror, priorities, security
Loading mirror speeds from cached hostfile
Updates Information Summary: available
4 Security notice(s)
1 important Security notice(s)
3 moderate Security notice(s)
2 Bugfix notice(s)
updateinfo summary done
root@node1 ~]# yum list-sec
Loaded plugins: changelog, downloadonly, fastestmirror, priorities, security
Loading mirror speeds from cached hostfile
SLSA-2013:1459-1 moderate/Sec. gnupg2-2.0.14-6.el6_4.x86_64
SLSA-2013:1436-1 moderate/Sec. kernel-2.6.32-358.23.2.el6.x86_64
SLSA-2013:1436-1 moderate/Sec. kernel-devel-2.6.32-358.23.2.el6.x86_64
SLSA-2013:1436-1 moderate/Sec. kernel-firmware-2.6.32-358.23.2.el6.noarch
SLSA-2013:1436-1 moderate/Sec. kernel-headers-2.6.32-358.23.2.el6.x86_64
SLSA-2013:1457-1 moderate/Sec. libgcrypt-1.4.5-11.el6_4.x86_64
SLSA-2013:1270-1 important/Sec. polkit-0.96-5.el6_4.x86_64
SLBA-2013:1486-1 bugfix selinux-policy-3.7.19-195.el6_4.13.noarch
SLBA-2013:1491-1 bugfix selinux-policy-3.7.19-195.el6_4.18.noarch
SLBA-2013:1486-1 bugfix selinux-policy-targeted-3.7.19-195.el6_4.13.noarch
SLBA-2013:1491-1 bugfix selinux-policy-targeted-3.7.19-195.el6_4.18.noarch
updateinfo list done由CVE列出:
[root@node2 ~]# yum list-sec cves
Loaded plugins: changelog, downloadonly, fastestmirror, priorities, security
Loading mirror speeds from cached hostfile
* epel: mirrors.kernel.org
* sl6x: ftp.scientificlinux.org
* sl6x-security: ftp.scientificlinux.org
7404 packages excluded due to repository priority protections
CVE-2012-6085 moderate/Sec. gnupg2-2.0.14-6.el6_4.x86_64
CVE-2013-4351 moderate/Sec. gnupg2-2.0.14-6.el6_4.x86_64
CVE-2013-4402 moderate/Sec. gnupg2-2.0.14-6.el6_4.x86_64
CVE-2013-4162 moderate/Sec. kernel-2.6.32-358.23.2.el6.x86_64
CVE-2013-4299 moderate/Sec. kernel-2.6.32-358.23.2.el6.x86_64
CVE-2013-4162 moderate/Sec. kernel-firmware-2.6.32-358.23.2.el6.noarch
CVE-2013-4299 moderate/Sec. kernel-firmware-2.6.32-358.23.2.el6.noarch
CVE-2013-4242 moderate/Sec. libgcrypt-1.4.5-11.el6_4.x86_64
updateinfo list done然后,我可以将所需的最小更改集应用到
[root@node1 ~]# yum update-minimal --security或者,修补所有的东西:
[root@node1 ~]# yum --quiet --security check-update
gnutls.x86_64 2.8.5-14.el6_5 sl-security
libtasn1.x86_64 2.3-6.el6_5 sl-security
[root@node1 ~]# yum --quiet --security update
=================================================================================================================
Package Arch Version Repository Size
=================================================================================================================
Updating:
gnutls x86_64 2.8.5-14.el6_5 sl-security 345 k
libtasn1 x86_64 2.3-6.el6_5 sl-security 237 k
Transaction Summary
=================================================================================================================
Upgrade 2 Package(s)
Is this ok [y/N]: Y
[root@node1 ~]#如果我在CentOS6框上尝试使用相同的命令,就不会得到任何结果。我知道,一些“137个可用包”包含安全修复,因为昨天我通过CentOS邮件列表收到了错误通知。
[root@node1 ~]# yum --security check-update
Loaded plugins: downloadonly, fastestmirror, security
Loading mirror speeds from cached hostfile
* base: mirrors.usc.edu
* epel: mirrors.kernel.org
* extras: mirror.web-ster.com
* updates: mirrors.kernel.org
Limiting package lists to security relevant ones
No packages needed for security; 137 packages available
[root@node1 ~]#发布于 2012-03-15 18:47:17
如果您绝对希望使用yum security plugin,那么有一种方法可以做到这一点,尽管有点复杂。但是一旦你设置好它,它就会自动完成。
唯一的要求是,您将需要-至少一个订阅RHN。这是一项很好的投资,但让我们坚持到底。
yum security。modifyrepo命令,如这里所示,将updateinfo.xml注入repomd.xml。在此之前,您必须修改perl脚本,将xml中的Rpm MD5和从RHN更改为Centos和。而且您必须确保CentOS repos实际上是否有updateinfo.xml中提到的所有Rpms,因为它们有时是RHN后面的。但没关系,您可以忽略CentOS没有赶上的更新,因为除了从SRPM构建更新之外,您几乎无能为力。使用选项2,您可以在所有客户端上安装yum security插件,并且它将工作。
编辑:这也适用于Redhat RHEL 5和6机器。而且比使用像太空行走或纸浆之类的重物溶液更简单。
发布于 2014-09-28 21:14:09
我也有同样的问题。我尝试创建一些Python代码,将上面提到的站点上的Yum更新和建议(我根据已安装的软件包对其进行过滤)。
如果有帮助的话,下面是源代码:https://github.com/wied03/centos-package-cron
https://serverfault.com/questions/369833
复制相似问题