# 16.15.监控第三方安全问题

近年来，安全领域在处理漏洞评估方面取得了许多进展。随着几乎所有操作系统的第三方工具被安装和配置，系统被入侵的风险也在增加。

漏洞评估是安全中的一个关键因素。虽然 FreeBSD 会发布基本系统的安全公告，但对每款第三方工具都发布安全公告超出了 FreeBSD 项目的能力范围。不过，有一种方法可以减轻第三方漏洞的风险，并警告管理员已知的安全问题。名为 pkg 的 FreeBSD 附加工具专门为此目的提供了选项。

pkg 会轮询一个数据库以检查安全问题。该数据库由 FreeBSD 安全团队和 Port 开发人员更新和维护。

安装时会提供 [periodic(8)](https://man.freebsd.org/cgi/man.cgi?query=periodic\&sektion=8\&format=html) 配置文件，用于维护 pkg 审计数据库，并提供了一种编程方法来保持其更新。

安装完成后，管理员可以随时更新数据库并查看已安装软件包的已知漏洞，方法是执行以下命令：

```sh
% pkg audit -F
```

输出应类似于以下内容：

```sh
vulnxml file up-to-date
chromium-116.0.5845.96_1 is vulnerable:
  chromium -- multiple vulnerabilities
  CVE: CVE-2023-4431
  CVE: CVE-2023-4427
  CVE: CVE-2023-4428
  CVE: CVE-2023-4429
  CVE: CVE-2023-4430
  WWW: https://vuxml.FreeBSD.org/freebsd/5fa332b9-4269-11ee-8290-a8a1599412c6.html

samba413-4.13.17_5 is vulnerable:
  samba -- multiple vulnerabilities
  CVE: CVE-2023-3347
  CVE: CVE-2023-34966
  CVE: CVE-2023-34968
  CVE: CVE-2022-2127
  CVE: CVE-2023-34967
  WWW: https://vuxml.FreeBSD.org/freebsd/441e1e1a-27a5-11ee-a156-080027f5fec9.html

2 problem(s) in 2 installed package(s) found.
```

管理员可以通过访问显示的 URL 来获得有关漏洞的更多信息。

这将包括受影响的版本，按 FreeBSD Port 版本列出，并提供可能包含安全公告的其他网站链接。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://book.bsdcn.org/hanbook/di-16-zhang-an-quan/16.15.-jian-kong-di-san-fang-an-quan-wen-ti.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
