- Newest
- Most votes
- Most comments
Hi,
AWS-RunPatchBaseline does not clear all Amazon Inspector findings on AL2023 because it is not intended to behave like a full dnf update. Patch Manager applies only the packages that are approved in your Patch Baseline, whereas a manual dnf update upgrades every package available in the repository. This difference in philosophy is exactly why you see additional findings remain after running the SSM document.
Amazon Linux 2023 also uses a version-locked repository model. When AWS releases a new AL2023 AMI, its repository version contains newer package revisions. Inspector immediately recognizes those versions as the “fixed” state. However, your existing instances may still be on an older repo version, and Patch Manager will not move them forward unless those updates are explicitly approved in the baseline.
The default Patch Baseline for AL2023 has the following behavior:
- It approves security updates with Critical or Important severity
- It includes some bugfix updates
- It applies automatic approvals only after a 7-day waiting period
- It does not install feature upgrades or non-security updates
- It ignores packages from optional/extra repositories that Inspector may still evaluate
Because of these approval rules and delays, Patch Manager will not necessarily install every package version that Inspector expects. On the other hand, sudo dnf update ignores Patch Baseline rules entirely and simply installs the latest packages from the repository, making Inspector findings disappear immediately.
There is no way to pass custom dnf options to AWS-RunPatchBaseline to force it to behave like dnf update, because Patch Manager is specifically designed to perform minimal, controlled, security-focused patching, not full OS upgrades.
If you want Patch Manager to remediate the same findings that dnf update does, you would need to:
- Create a custom Patch Baseline
- Broaden the approval rules to include more classifications (e.g., all bugfixes or all updates)
- Remove or shorten the approval delay window
- Ensure all required repositories are in scope
Otherwise, running dnf update manually—or creating your own SSM document that performs a full system update—is the only way to immediately eliminate all Inspector findings.
This issue is likely related to how the patch baseline is configured for your Amazon Linux 2023 instances. When AWS-RunPatchBaseline runs, it uses the patch baseline assigned to your instances, which may not include all the patches that dnf update would install.
There are a few potential causes and solutions:
- Ineffective baseline configuration: The baseline might not be configured to include all the patch classifications or severities needed to address the Inspector findings. You should check your baseline configuration by:
- Going to the Systems Manager console
- Viewing the Command history for your
AWS-RunPatchBaselineexecution - Selecting the managed node with missing patches
- Checking the output to find the
BaselineIdvalue - Verifying the patch baseline configuration (operating system, product name, classification, and severity)
-
Operation mode: Make sure you're using the
Installoperation mode withAWS-RunPatchBaselinerather than justScan. TheScanoption only identifies missing patches without installing them. -
BaselineOverride parameter: You could use the
BaselineOverrideparameter to define specific patching preferences at runtime, which might help include patches that are currently being missed. -
Patch compliance reporting: Remember that
AWS-RunPatchBaselineand Inspector might use different criteria to determine what constitutes a vulnerability, which could explain the discrepancy between whatAWS-RunPatchBaselineresolves and what Inspector continues to report.
If you continue to have issues, you might need to create a custom patch baseline that better aligns with the vulnerabilities that Inspector is identifying.
Sources
Troubleshooting Patch Manager - AWS Systems Manager
SSM Command document for patching: AWS-RunPatchBaseline - AWS Systems Manager
Identifying noncompliant managed nodes - AWS Systems Manager
Relevant content
asked 3 years ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 5 months ago
