GithubHelp home page GithubHelp logo

Comments (6)

toniblyx avatar toniblyx commented on May 14, 2024

Hi @modelenoir, thanks for your feedback. I haven't tested Prowler in GovCloud but not sure if this issue may be related to #112, can you take a look and see if it has anything to do with it? I'll also like to see a sample output of the basic command (without parsing) and see how to improve it. Thanks.

from prowler.

morningseal avatar morningseal commented on May 14, 2024

It is related to #112, fix #117 doesn't validate the CIS filter pattern so the false 'Warning' persists (based on code pull 2-Nov) unless one changed the filer to meet Prowler criteria.

from prowler.

toniblyx avatar toniblyx commented on May 14, 2024

Can you please suggest a better way to validate it? I guess it is a matter of regexp. I played with this awk '/.userIdentity.type/&&/IAMUser/||/root/&&/.responseElements.ConsoleLogin/&&/.additionalEventData.MFAUsed/&&/Yes/' but it is not very accurate.

from prowler.

morningseal avatar morningseal commented on May 14, 2024

This seems to work:
'/ConsoleLogin/ && ( (/additionalEventData.MFAUsed.*\!=.*\"Yes/) || (/additionalEventData.MFAUsed.*\=.*\"No/ && !/!/) )’

CIS Benchmark construct

> aws logs describe-metric-filters | grep MFAUsed
            "filterPattern": "{ ($.eventName = \"ConsoleLogin\") && ($.additionalEventData.MFAUsed != \"Yes\") }", 
> aws logs describe-metric-filters | grep MFAUsed | awk '/ConsoleLogin/ && (/additionalEventData.MFAUsed.*\!=.*\"Yes/) {print $1}' 
"filterPattern":

AWS CloudWatch alarm additional example construct

filterPattern: { ($.eventName = "ConsoleLogin") && ($.additionalEventData.MFAUsed="No") },
> cat t | awk '/ConsoleLogin/ && (/additionalEventData.MFAUsed.*\=.*\"No/ && !/!/) {print $1}'
"filterPattern":

When print $1 outputs <"filterPattern":> the pattern matched.

Thank you for prowler, it has been helpful.

from prowler.

toniblyx avatar toniblyx commented on May 14, 2024

Thanks @morningseal I'll add it asap and make a PR.

from prowler.

toniblyx avatar toniblyx commented on May 14, 2024

Ok, now thanks to @morningseal comments it seems to work. I'll close this issue but please feel free to open it again if you find any issue with check32. Thanks you too @modelenoir for your comments.

from prowler.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.