Skip to content

feat(misconf): Add support for aws_ami #8499

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

Merged
merged 3 commits into from
Mar 11, 2025
Merged

Conversation

simar7
Copy link
Member

@simar7 simar7 commented Mar 6, 2025

Description

Adds support for parsing AWS AMIs.

Related issues

Checklist

  • I've read the guidelines for contributing to this repository.
  • I've followed the conventions in the PR title.
  • I've added tests that prove my fix is effective or that my feature works.
  • I've updated the documentation with the relevant information (if needed).
  • I've added usage information (if the PR introduces new options)
  • I've included a "before" and "after" example to the description (if the PR is a user interface change).

Signed-off-by: nikpivkin <[email protected]>
@nikpivkin
Copy link
Contributor

@simar7 There is no AWS::EC2::Image resource in CloudFormation, so I removed the adaptation for CF.

@simar7
Copy link
Member Author

simar7 commented Mar 7, 2025

Also of interest hashicorp/terraform-provider-aws#40375

@simar7
Copy link
Member Author

simar7 commented Mar 7, 2025

@simar7 There is no AWS::EC2::Image resource in CloudFormation, so I removed the adaptation for CF.

Interesting, since there isn't one, CloudFormation users are also at a loss preventing the run of malicious AMIs.

AWS recommends to set the allowed AMIs on an account basis https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-allowed-amis.html

But I do wonder if we will see an equivalent of hashicorp/terraform-provider-aws#40375 in cloudformation.

@simar7 simar7 requested a review from nikpivkin March 8, 2025 04:40
@nikpivkin
Copy link
Contributor

Interesting, since there isn't one, CloudFormation users are also at a loss preventing the run of malicious AMIs.

Isn't it the other way around? Usually in CloudFormation AMI ID is passed through a parameter, which forces the user to search for the image themselves and prevents using an image with a similar name from an untrusted vendor?

@simar7
Copy link
Member Author

simar7 commented Mar 11, 2025

Interesting, since there isn't one, CloudFormation users are also at a loss preventing the run of malicious AMIs.

Isn't it the other way around? Usually in CloudFormation AMI ID is passed through a parameter, which forces the user to search for the image themselves and prevents using an image with a similar name from an untrusted vendor?

Yeah I guess that would be fine then.

@simar7 simar7 added this pull request to the merge queue Mar 11, 2025
Merged via the queue into aquasecurity:main with commit 573502e Mar 11, 2025
14 checks passed
@simar7 simar7 deleted the feat-aws_ami branch March 11, 2025 03:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants