

• 2026 年 4 月 30 日之後， AWS Systems Manager CloudWatch Dashboard 將不再可用。客戶可以繼續使用 Amazon CloudWatch 主控台來檢視、建立和管理其 Amazon CloudWatch 儀表板，就像現在一樣。如需詳細資訊，請參閱 [Amazon CloudWatch Dashboard 文件](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Dashboards.html)。

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 修補基準規則在 Linux 系統上的運作方式
<a name="patch-manager-linux-rules"></a>

Linux 分發的修補基準中的規則，運作方式依據分發類型而有不同。與Windows Server受管節點上的修補程式更新不同，每個節點都會評估規則，以考量執行個體上設定的儲存庫。 Patch Manager是 中的工具 AWS Systems Manager，使用原生套件管理員來推動修補程式基準核准的修補程式安裝。

對於報告修補程式嚴重性級別的 Linux 作業系統類型，Patch Manager 使用軟體發布者為更新通知或個別修補程式報告的嚴重性級別。Patch Manager 不會從第三方來源推導出嚴重性級別，例如[通用漏洞評分系統](https://www.first.org/cvss/) (CVSS)，或者[美國國家漏洞資料庫](https://nvd.nist.gov/vuln) (NVD) 發行的指標。

**Topics**
+ [修補基準規則在 Amazon Linux 2 和 Amazon Linux 2023 上的運作方式](#linux-rules-amazon-linux)
+ [修補基準規則在 CentOS Stream 上的運作方式](#linux-rules-centos)
+ [修補基準規則在 Debian Server 上的運作方式](#linux-rules-debian)
+ [修補基準規則在 macOS 上的運作方式](#linux-rules-macos)
+ [修補基準規則在 Oracle Linux 上的運作方式](#linux-rules-oracle)
+ [修補基準規則在 AlmaLinux、RHEL 和 Rocky Linux 上的運作方式](#linux-rules-rhel)
+ [修補基準規則在 SUSE Linux Enterprise Server 上的運作方式](#linux-rules-sles)
+ [修補基準規則在 Ubuntu Server 上的運作方式](#linux-rules-ubuntu)

## 修補基準規則在 Amazon Linux 2 和 Amazon Linux 2023 上的運作方式
<a name="linux-rules-amazon-linux"></a>

**注意**  
Amazon Linux 2023 (AL2023) 使用可透過一或多個系統設定鎖定為特定版本的版本控制儲存庫。對於 AL2023 EC2 執行個體上的所有修補操作，Patch Manager 會使用最新儲存庫版本，與系統組態無關。如需詳細資訊，請參閱《Amazon Linux 2023 使用者指南》**中的[透過版本化儲存庫使用決定性升級](https://docs.aws.amazon.com/linux/al2023/ug/deterministic-upgrades.html)一節。

在 Amazon Linux 2 和 Amazon Linux 2023 上，修補程式選取程序如下：

1. 在受管節點上，YUM 程式庫 (Amazon Linux 2) 或 DNF 程式庫 (Amazon Linux 2023) 會存取每個已設定儲存庫的 `updateinfo.xml` 檔案。

   如果沒有找到 `updateinfo.xml` 檔案，是否安裝修補程式取決於**包含非安全性更新**和**自動核准**的設定。例如，如果允許非安全性更新，則會在自動核准時間到達時進行安裝。

1. `updateinfo.xml` 中的每個更新通知皆包含數個屬性，以表示通知中的套件的屬性，如下表所述。  
**更新通知屬性**    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/systems-manager/latest/userguide/patch-manager-linux-rules.html)

   如需已核准修補程式和遭拒的修補程式清單之可接受格式的相關資訊，請參閱 [已核准與遭拒的修補程式清單的套件名稱格式](patch-manager-approved-rejected-package-name-formats.md)。

1. 受管節點的產物取決於 SSM Agent。此屬性對應至修補程式基準之 [https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_PatchFilter.html](https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_PatchFilter.html) 資料類型中的產品金鑰屬性的值。

1. 已根據以下指導方針選取欲更新之套件：    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/systems-manager/latest/userguide/patch-manager-linux-rules.html)

如需有關修補程式合規狀態值的詳細資訊，請參閱 [修補程式合規狀態值](patch-manager-compliance-states.md)。

## 修補基準規則在 CentOS Stream 上的運作方式
<a name="linux-rules-centos"></a>

CentOS Stream 預設儲存庫不包含 `updateinfo.xml` 檔案。不過，您建立或使用的自訂儲存庫可能包含此檔案。在本主題中，`updateinfo.xml` 的參考僅適用於這些自訂儲存庫。

在 CentOS Stream 上，修補程式選擇程序如下：

1. 在受管節點上，如果 `updateinfo.xml` 檔案存在於自訂儲存庫中，則對於每個已設定儲存庫，DNF 程式庫都會存取此檔案。

   如果沒有找到一律包含預設儲存庫的 `updateinfo.xml`，是否安裝修補程式取決於**包含非安全性更新**和**自動核准**的設定。例如，如果允許非安全性更新，則會在自動核准時間到達時進行安裝。

1. 如果存在 `updateinfo.xml`，則在檔案中的每個更新通知皆包含數個屬性，以表示通知中的套件的屬性，如下表所述。  
**更新通知屬性**    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/systems-manager/latest/userguide/patch-manager-linux-rules.html)

   如需已核准修補程式和遭拒的修補程式清單之可接受格式的相關資訊，請參閱 [已核准與遭拒的修補程式清單的套件名稱格式](patch-manager-approved-rejected-package-name-formats.md)。

1. 在任何情況下，受管節點的產物取決於 SSM Agent。此屬性對應至修補程式基準之 [https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_PatchFilter.html](https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_PatchFilter.html) 資料類型中的產品金鑰屬性的值。

1. 已根據以下指導方針選取欲更新之套件：    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/systems-manager/latest/userguide/patch-manager-linux-rules.html)

如需有關修補程式合規狀態值的詳細資訊，請參閱 [修補程式合規狀態值](patch-manager-compliance-states.md)。

## 修補基準規則在 Debian Server 上的運作方式
<a name="linux-rules-debian"></a>

在 Debian Server 上，修補基準服務提供*優先順序*與*區段*篩選欄位。這些欄位通常會顯示所有 Debian Server 套件。為了判斷修補程式是否已被修補基準選取，Patch Manager 會執行下列動作：

1. 在 Debian Server 系統上，會執行與 `sudo apt-get update` 相當的命令以重新整理可用套件清單。儲存區未設定，資料從設定於 `sources` 清單中的儲存區提取。

1. 若有可用於 `python3-apt` (`libapt` 的 Python 程式庫界面) 的更新，它會升級到最新版本。(這個非安全性套件會升級，即使您未選取 **Include nonsecurity updates** (包含非安全性更新) 選項)。

1. 接著，將套用 [https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreatePatchBaseline.html#systemsmanager-CreatePatchBaseline-request-GlobalFilters](https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreatePatchBaseline.html#systemsmanager-CreatePatchBaseline-request-GlobalFilters)、[https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreatePatchBaseline.html#EC2-CreatePatchBaseline-request-ApprovalRules](https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreatePatchBaseline.html#EC2-CreatePatchBaseline-request-ApprovalRules)、[https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreatePatchBaseline.html#EC2-CreatePatchBaseline-request-ApprovedPatches](https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreatePatchBaseline.html#EC2-CreatePatchBaseline-request-ApprovedPatches) 和 [https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreatePatchBaseline.html#EC2-CreatePatchBaseline-request-RejectedPatches](https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreatePatchBaseline.html#EC2-CreatePatchBaseline-request-RejectedPatches) 清單。
**注意**  
因為無法可靠地判斷 Debian Server 更新套件的發行日期，此作業系統不支援自動核准選項。

   然而，核准規則也受限於建立或最後更新修補基準時，是否已選取 **Include nonsecurity updates** (包含非安全性更新) 核取方塊。

   如果非安全更新被排除，將會套用隱含規則，以僅選擇安全儲存庫中包含升級的套件。對於每個套件，套件的候選版本 (通常是最新版本) 必須是安全儲存庫的一部分。在這種情形下，對於 Debian Server 來說，修補候選版本僅限於以下儲存庫中包含的修補程式：

   這些儲存庫的命名如下：
   + Debian Server 11： `debian-security bullseye`
   + Debian Server 12： `debian-security bookworm`

   如果包含非安全性更新，則也會考慮來自其他儲存庫的修補程式。

   如需已核准修補程式和已拒絕修補程式清單之可接受格式的相關資訊，請參閱 [已核准與遭拒的修補程式清單的套件名稱格式](patch-manager-approved-rejected-package-name-formats.md)。

若要檢視 *Priority (優先順序)* 和 *Section (區段)* 欄位的內容，請執行下列 `aptitude` 命令：

**注意**  
您可能必須先在 Debian Server 系統上安裝 Aptitude。

```
aptitude search -F '%p %P %s %t %V#' '~U'
```

在此命令的回應中，所有可升級的套裝將以此格式回報：

```
name, priority, section, archive, candidate version
```

如需有關修補程式合規狀態值的詳細資訊，請參閱 [修補程式合規狀態值](patch-manager-compliance-states.md)。

## 修補基準規則在 macOS 上的運作方式
<a name="linux-rules-macos"></a>

在 macOS 上，修補程式選擇程序如下：

1. 在受管節點上，Patch Manager 會存取 `InstallHistory.plist` 檔案已剖析的內容，並識別套件名稱和版本。

   如需剖析程序的詳細資訊，請參閱 [如何安裝修補程式](patch-manager-installing-patches.md) 中的 **macOS** 索引標籤。

1. 受管節點的產物取決於 SSM Agent。此屬性對應至修補程式基準之 [https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_PatchFilter.html](https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_PatchFilter.html) 資料類型中的產品金鑰屬性的值。

1. 已根據以下指導方針選取欲更新之套件：    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/systems-manager/latest/userguide/patch-manager-linux-rules.html)

如需有關修補程式合規狀態值的詳細資訊，請參閱 [修補程式合規狀態值](patch-manager-compliance-states.md)。

## 修補基準規則在 Oracle Linux 上的運作方式
<a name="linux-rules-oracle"></a>

在 Oracle Linux 上，修補程式選擇程序如下：

1. 在受管節點上，YUM 程式庫存取每個已設定之儲存庫的 `updateinfo.xml` 檔案。
**注意**  
如果儲存庫不是由 Oracle 管理的，則可能沒有 `updateinfo.xml` 檔案。如果沒有找到 `updateinfo.xml`，是否安裝修補程式取決於**包含非安全性更新**和**自動核准**的設定。例如，如果允許非安全性更新，則會在自動核准時間到達時進行安裝。

1. `updateinfo.xml` 中的每個更新通知皆包含數個屬性，以表示通知中的套件的屬性，如下表所述。  
**更新通知屬性**    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/systems-manager/latest/userguide/patch-manager-linux-rules.html)

   如需已核准修補程式和遭拒的修補程式清單之可接受格式的相關資訊，請參閱 [已核准與遭拒的修補程式清單的套件名稱格式](patch-manager-approved-rejected-package-name-formats.md)。

1. 受管節點的產物取決於 SSM Agent。此屬性對應至修補程式基準之 [https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_PatchFilter.html](https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_PatchFilter.html) 資料類型中的產品金鑰屬性的值。

1. 已根據以下指導方針選取欲更新之套件：    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/systems-manager/latest/userguide/patch-manager-linux-rules.html)

如需有關修補程式合規狀態值的詳細資訊，請參閱 [修補程式合規狀態值](patch-manager-compliance-states.md)。

## 修補基準規則在 AlmaLinux、RHEL 和 Rocky Linux 上的運作方式
<a name="linux-rules-rhel"></a>

在 AlmaLinux、Red Hat Enterprise Linux (RHEL) 和 Rocky Linux 上，修補程式選擇程序如下：

1. 在受管節點上，YUM 程式庫 (RHEL 7) 或 DNF 程式庫 (AlmaLinux 8 和 9、RHEL 8、9、10 以及 Rocky Linux 8 和 9 ) 會存取每個已設定儲存庫的 `updateinfo.xml` 檔案。
**注意**  
如果儲存庫不是由 Red Hat 管理的，則可能沒有 `updateinfo.xml` 檔案。如果沒有 `updateinfo.xml`，將不會套用任何修補程式。

1. `updateinfo.xml` 中的每個更新通知皆包含數個屬性，以表示通知中的套件的屬性，如下表所述。  
**更新通知屬性**    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/systems-manager/latest/userguide/patch-manager-linux-rules.html)

   如需已核准修補程式和遭拒的修補程式清單之可接受格式的相關資訊，請參閱 [已核准與遭拒的修補程式清單的套件名稱格式](patch-manager-approved-rejected-package-name-formats.md)。

1. 受管節點的產物取決於 SSM Agent。此屬性對應至修補程式基準之 [https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_PatchFilter.html](https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_PatchFilter.html) 資料類型中的產品金鑰屬性的值。

1. 已根據以下指導方針選取欲更新之套件：    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/systems-manager/latest/userguide/patch-manager-linux-rules.html)

如需有關修補程式合規狀態值的詳細資訊，請參閱 [修補程式合規狀態值](patch-manager-compliance-states.md)。

## 修補基準規則在 SUSE Linux Enterprise Server 上的運作方式
<a name="linux-rules-sles"></a>

在 SLES 上，每個修補程式皆包含下列屬性，以表示修補程式中的套件的屬性：
+ **分類**：對應至修補基準之 [https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_PatchFilter.html](https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_PatchFilter.html) 資料類型中的**分類**金鑰屬性的值。表示包含在更新通知中的修補程式類型。

  您可以使用 AWS CLI 命令**[https://docs.aws.amazon.com/cli/latest/reference/ssm/describe-patch-properties.html](https://docs.aws.amazon.com/cli/latest/reference/ssm/describe-patch-properties.html)**或 API 操作 來檢視支援的值清單**[https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_DescribePatchProperties.html](https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_DescribePatchProperties.html)**。您也可以在 Systems Manager 主控台之 **Create patch baseline** (建立修補基準) 頁面或 **Edit patch baseline** (編輯修補基準) 頁面的 **Approval rules** (核准規則) 區域中檢視清單。
+ **嚴重性**：對應至修補基準之 [https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_PatchFilter.html](https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_PatchFilter.html) 資料類型中的**嚴重性**金鑰屬性的值。表示修補程式的嚴重性。

  您可以使用 AWS CLI 命令**[https://docs.aws.amazon.com/cli/latest/reference/ssm/describe-patch-properties.html](https://docs.aws.amazon.com/cli/latest/reference/ssm/describe-patch-properties.html)**或 API 操作 來檢視支援的值清單**[https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_DescribePatchProperties.html](https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_DescribePatchProperties.html)**。您也可以在 Systems Manager 主控台之 **Create patch baseline** (建立修補基準) 頁面或 **Edit patch baseline** (編輯修補基準) 頁面的 **Approval rules** (核准規則) 區域中檢視清單。

受管節點的產物取決於 SSM Agent。此屬性對應至修補基準之 [https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_PatchFilter.html](https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_PatchFilter.html) 資料類型中的**產品**金鑰屬性的值。

對於每個修補程式，修補基準做為篩選條件使用，只允許更新中包含合格的套件。如果在套用修補基準定義後，有多個套件可以適用，將使用最新的版本。

如需已核准修補程式和已拒絕修補程式清單之可接受格式的相關資訊，請參閱 [已核准與遭拒的修補程式清單的套件名稱格式](patch-manager-approved-rejected-package-name-formats.md)。

## 修補基準規則在 Ubuntu Server 上的運作方式
<a name="linux-rules-ubuntu"></a>

在 Ubuntu Server 上，修補基準服務提供*優先順序*與*區段*篩選欄位。這些欄位通常會顯示所有 Ubuntu Server 套件。為了判斷修補程式是否已被修補基準選取，Patch Manager 會執行下列動作：

1. 在 Ubuntu Server 系統上，會執行與 `sudo apt-get update` 相當的命令以重新整理可用套件清單。儲存區未設定，資料從設定於 `sources` 清單中的儲存區提取。

1. 若有可用於 `python3-apt` (`libapt` 的 Python 程式庫界面) 的更新，它會升級到最新版本。(這個非安全性套件會升級，即使您未選取 **Include nonsecurity updates** (包含非安全性更新) 選項)。

1. 接著，將套用 [https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreatePatchBaseline.html#systemsmanager-CreatePatchBaseline-request-GlobalFilters](https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreatePatchBaseline.html#systemsmanager-CreatePatchBaseline-request-GlobalFilters)、[https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreatePatchBaseline.html#EC2-CreatePatchBaseline-request-ApprovalRules](https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreatePatchBaseline.html#EC2-CreatePatchBaseline-request-ApprovalRules)、[https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreatePatchBaseline.html#EC2-CreatePatchBaseline-request-ApprovedPatches](https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreatePatchBaseline.html#EC2-CreatePatchBaseline-request-ApprovedPatches) 和 [https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreatePatchBaseline.html#EC2-CreatePatchBaseline-request-RejectedPatches](https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreatePatchBaseline.html#EC2-CreatePatchBaseline-request-RejectedPatches) 清單。
**注意**  
因為無法可靠地判斷 Ubuntu Server 更新套件的發行日期，此作業系統不支援自動核准選項。

   然而，核准規則也受限於建立或最後更新修補基準時，是否已選取 **Include nonsecurity updates** (包含非安全性更新) 核取方塊。

   如果非安全更新被排除，將會套用隱含規則，以僅選擇安全儲存庫中包含升級的套件。對於每個套件，套件的候選版本 (通常是最新版本) 必須是安全儲存庫的一部分。在這種情形下，對於 Ubuntu Server 來說，修補候選版本僅限於以下儲存庫中包含的修補程式：
   + Ubuntu Server 16.04 LTS︰`xenial-security`
   + Ubuntu Server 18.04 LTS︰`bionic-security`
   + Ubuntu Server 20.04 LTS︰`focal-security`
   + Ubuntu Server 22.04 LTS (`jammy-security`)
   + Ubuntu Server 24.04 LTS (`noble-security`)
   + Ubuntu Server 25.04 (`plucky-security`)

   如果包含非安全性更新，則也會考慮來自其他儲存庫的修補程式。

   如需已核准修補程式和已拒絕修補程式清單之可接受格式的相關資訊，請參閱 [已核准與遭拒的修補程式清單的套件名稱格式](patch-manager-approved-rejected-package-name-formats.md)。

若要檢視 *Priority (優先順序)* 和 *Section (區段)* 欄位的內容，請執行下列 `aptitude` 命令：

**注意**  
您可能必須先在 Ubuntu Server 16 系統上安裝 Aptitude。

```
aptitude search -F '%p %P %s %t %V#' '~U'
```

在此命令的回應中，所有可升級的套裝將以此格式回報：

```
name, priority, section, archive, candidate version
```

如需有關修補程式合規狀態值的詳細資訊，請參閱 [修補程式合規狀態值](patch-manager-compliance-states.md)。