Skip to content

AWS-RunPatchBaseline did not clear all Inspector findings

0

Hi everyone,

I am managing multiple Amazon Linux 2023 (AL2023) EC2 instances. Whenever AWS releases a new AMI, I see new findings in AWS Inspector for my instances typically in a day.

I attempt to remediate these by running the AWS-RunPatchBaseline SSM document, but I’ve noticed that it doesn't resolve every finding. To clear the remaining issues, I have to manually connect to the instances and run sudo dnf update.

Does anyone know why the SSM document misses certain updates that dnf update catches? Can I pass specific options to AWS-RunPatchBaseline to fix this, or do I need to create a custom document?

Thanks.

asked 10 months ago458 views

2 Answers
1
Accepted Answer

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.

answered 10 months ago

AWS
EXPERT

reviewed 10 months ago

-1

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:

  1. 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-RunPatchBaseline execution
  • Selecting the managed node with missing patches
  • Checking the output to find the BaselineId value
  • Verifying the patch baseline configuration (operating system, product name, classification, and severity)
  1. Operation mode: Make sure you're using the Install operation mode with AWS-RunPatchBaseline rather than just Scan. The Scan option only identifies missing patches without installing them.

  2. BaselineOverride parameter: You could use the BaselineOverride parameter to define specific patching preferences at runtime, which might help include patches that are currently being missed.

  3. Patch compliance reporting: Remember that AWS-RunPatchBaseline and Inspector might use different criteria to determine what constitutes a vulnerability, which could explain the discrepancy between what AWS-RunPatchBaseline resolves 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

answered 10 months ago

EXPERT

reviewed 10 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.