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(inspector2): Ensure Inspector2 is enabled for ECR, EC2, Lambda and Lambda Code #5061

Conversation

MarioRgzLpz
Copy link
Member

Context

To improve security and ensure adherence to best practices for container image protection, we are introducing a new check within the Amazon Inspector framework. This check ensures that the new version of Amazon Inspector is enabled in order to help you improve the security and compliance of your AWS cloud environment. Amazon Inspector 2 is a vulnerability management solution that continually scans scans your Amazon EC2 instances, ECR container images, and Lambda functions to identify software vulnerabilities and instances of unintended network exposure.

Description

Change old check inspector2_is_enabled.py to add the new check logic. Change the metadata and test to adjust to the new check. Added 4 new attributes for the resources status to the Inspector Model in inspector2_service. Adjust other check and service tests to the service changes.

Checklist

License

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

@MarioRgzLpz MarioRgzLpz requested review from a team as code owners September 17, 2024 10:25
@github-actions github-actions bot added the provider/aws Issues/PRs related with the AWS provider label Sep 17, 2024
@MarioRgzLpz MarioRgzLpz changed the title Prwlr 4336 add new inspector check for ecr ec 2 lambda scanning enabled feat(inspector2): Ensure Inspector2 is enabled for ECR, EC2, Lambda and Lambda Code Sep 17, 2024
Copy link

codecov bot commented Sep 17, 2024

Codecov Report

Attention: Patch coverage is 79.31034% with 6 lines in your changes missing coverage. Please review.

Project coverage is 89.01%. Comparing base (2c337ab) to head (18717e8).
Report is 17 commits behind head on master.

Files with missing lines Patch % Lines
...or2/inspector2_is_enabled/inspector2_is_enabled.py 75.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5061      +/-   ##
==========================================
+ Coverage   88.97%   89.01%   +0.04%     
==========================================
  Files         957      962       +5     
  Lines       29340    29469     +129     
==========================================
+ Hits        26105    26233     +128     
- Misses       3235     3236       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MrCloudSec MrCloudSec self-requested a review September 17, 2024 16:35
@MrCloudSec MrCloudSec added the backport-to-v3 Backport PR to the v3 branch label Sep 17, 2024
@MrCloudSec MrCloudSec changed the title feat(inspector2): Ensure Inspector2 is enabled for ECR, EC2, Lambda and Lambda Code chore(inspector2): Ensure Inspector2 is enabled for ECR, EC2, Lambda and Lambda Code Sep 17, 2024
@MrCloudSec MrCloudSec changed the title chore(inspector2): Ensure Inspector2 is enabled for ECR, EC2, Lambda and Lambda Code fix(inspector2): Ensure Inspector2 is enabled for ECR, EC2, Lambda and Lambda Code Sep 17, 2024
@MrCloudSec MrCloudSec merged commit c425e82 into master Sep 17, 2024
11 of 12 checks passed
@MrCloudSec MrCloudSec deleted the PRWLR-4336-add-new-inspector-check-for-ecr-ec-2-lambda-scanning-enabled branch September 17, 2024 18:01
prowler-bot pushed a commit that referenced this pull request Sep 17, 2024
…d Lambda Code (#5061)

Co-authored-by: Sergio Garcia <[email protected]>
(cherry picked from commit c425e82)

# Conflicts:
#	prowler/providers/aws/services/inspector2/inspector2_is_enabled/inspector2_is_enabled.py
@prowler-bot prowler-bot added the was-backported The PR was successfully backported to the target branch label Sep 17, 2024
@prowler-bot
Copy link
Collaborator

💚 All backports created successfully

Status Branch Result
v3

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-to-v3 Backport PR to the v3 branch provider/aws Issues/PRs related with the AWS provider was-backported The PR was successfully backported to the target branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants