Skyscanner / cfripper

Library and CLI tool for analysing CloudFormation templates and check them for security compliance.

Home Page:https://cfripper.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AWS S3 path format issue

midisfi opened this issue · comments

While trying to test the tool we ran into an issue with S3 bucket path failing to be recognized. The utils.py file has five tests for different ways of accessing S3 objects, but after creating a new bucket for the json object, the path was not recognized.

S3 link: https://BUCKETNAME.s3.REGION.amazonaws.com/test.json

We simply used a supported format to make this work, but it would better if the above S3 path format was recognized out of the box.

Hi @saariomi!
Thanks for letting us know this URL format!
Yes, we need to update this function extract_bucket_name_and_path_from_url (https://github.com/Skyscanner/cfripper/blob/master/cfripper/model/utils.py#L37) to support this URL format.
Would you like to create a PR? :)

Do I need some extra permissions to publish a branch and then create a PR?

@saariomi i would recommend forking this project using the "Fork" button, making changes as necessary, including tests, and then raising a PR for review (all of which would be awesome!)

Got it, please review PR.

This case is now supported on the last version of CFRipper, I will close this PR 😄