Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False positive: aws_compliance.control.foundational_security_ssm_2 if Patch is not applicable #759

Closed
the-cloud-ninja opened this issue Feb 13, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@the-cloud-ninja
Copy link

the-cloud-ninja commented Feb 13, 2024

Describe the bug
False Positive Results for Control aws_compliance.control.foundational_security_ssm_2. All Patches that are not applicable raises alarm.

Especially for windows instances, this result into thousands of false positives in our environment.

Steampipe version (steampipe -v)
v0.21.4

Plugin version (steampipe plugin list)
aws 0.130.0

To reproduce

Lets check patches for an instance with AWS CLI:

aws ssm describe-instance-patches --instance-id i-03cdb --region eu-central-1

Result (stripped to KB2305420)

{
"Patches": [
{
"Title": "",
"KBId": "KB2305420",
"Classification": "",
"Severity": "",
"State": "NotApplicable",
"InstalledTime": 0.0
}
]
}

Please note the State "NotApplicable"

Now let's start the control:

steampipe check aws_compliance.control.foundational_security_ssm_2

  • 2 All EC2 instances managed by Systems Manager should be compliant with patching requ… HIGH 2,321 / 5,266 [==========]
    ALARM: i-03cdb patch KB2305420 is non-compliant. ............................... eu-central-1 123456789

Expected behavior
Instead of raising an ALARM please consider the NotApplicable as SKIP.

Please see the AWS documentation regarding this status as well here:

https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-compliance-states.html

Not-Applicable means really: The related vulnerable software package is not even installed on that specific instance, therefore the patch is not required and skipped.

thanks in advance
Markus

@the-cloud-ninja the-cloud-ninja added the bug Something isn't working label Feb 13, 2024
khushboo9024 added a commit that referenced this issue Feb 15, 2024
@khushboo9024
Copy link
Contributor

Thanks, @the-cloud-ninja, for catching this bug. I have raised a PR with a fix. Could you please test it and let us know if it works for you?

@the-cloud-ninja
Copy link
Author

Very nice job indeed! Review succesful, false positive gone! Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants