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

fix(extra758): Reduce API calls. Print correct instance state. #1057

Merged
merged 2 commits into from
Mar 8, 2022

Conversation

lazize
Copy link
Contributor

@lazize lazize commented Mar 5, 2022

Context

This check was showing instance as running, even when it was not.

Description

Reduced API calls. Print correct instance state and launch date.
Fix issue #497

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@lazize lazize requested review from a team, toniblyx, jfagoagas and n4ch04 March 5, 2022 16:27
@lazize
Copy link
Contributor Author

lazize commented Mar 5, 2022

I changed the OLDAGE value to force test it.

$ ./prowler -p default -f sa-east-1 -c extra758
                          _
  _ __  _ __ _____      _| | ___ _ __
 | '_ \| '__/ _ \ \ /\ / / |/ _ \ '__|
 | |_) | | | (_) \ V  V /| |  __/ |
 | .__/|_|  \___/ \_/\_/ |_|\___|_|v2.7.0-24January2022
 |_| the handy cloud security tool

 Date: Sat Mar  5 13:15:18 -03 2022

 Color code for results:
 -  INFO (Information)
 -  PASS (Recommended value)
 -  WARNING (Ignored by whitelist)
 -  FAIL (Fix required)

 This report is being generated using credentials below:

 AWS-CLI Profile: [default] AWS API Region: [sa-east-1] AWS Filter Region: [sa-east-1]
 AWS Account: [****5262] UserId: [AROA****:****]
 Caller Identity ARN: [arn:aws:sts::****5262:assumed-role/****/****]

7.58 [extra758] Check EC2 Instances older than 12 months  - ec2 [Medium]
       FAIL! sa-east-1: EC2 Instance i-0f292a68**** launched before than 2022-02-25. Launch date: 2022-02-17T12:01:22+00:00 - State: stopped


$ ./prowler -p default -f sa-east-1 -c extra758
                          _
  _ __  _ __ _____      _| | ___ _ __
 | '_ \| '__/ _ \ \ /\ / / |/ _ \ '__|
 | |_) | | | (_) \ V  V /| |  __/ |
 | .__/|_|  \___/ \_/\_/ |_|\___|_|v2.7.0-24January2022
 |_| the handy cloud security tool

 Date: Sat Mar  5 13:22:47 -03 2022

 Color code for results:
 -  INFO (Information)
 -  PASS (Recommended value)
 -  WARNING (Ignored by whitelist)
 -  FAIL (Fix required)

 This report is being generated using credentials below:

 AWS-CLI Profile: [default] AWS API Region: [sa-east-1] AWS Filter Region: [sa-east-1]
 AWS Account: [****5262] UserId: [AROA****:****]
 Caller Identity ARN: [arn:aws:sts::****5262:assumed-role/****/****]

7.58 [extra758] Check EC2 Instances older than 12 months  - ec2 [Medium]
       PASS! sa-east-1: No EC2 Instances found older than 12 months

@jfagoagas jfagoagas added severity/medium Results in some unexpected or undesired behavior. status/waiting-for-revision Waiting for maintainer's revision labels Mar 8, 2022
jfagoagas
jfagoagas previously approved these changes Mar 8, 2022
Copy link
Member

@jfagoagas jfagoagas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch @lazize, thank you very much!

checks/check_extra758 Show resolved Hide resolved
@jfagoagas jfagoagas added status/awaiting-reponse Waiting response from Issue owner and removed status/waiting-for-revision Waiting for maintainer's revision labels Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/medium Results in some unexpected or undesired behavior. status/awaiting-reponse Waiting response from Issue owner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants