Skip to content

Commit

Permalink
fix s3 backend
Browse files Browse the repository at this point in the history
  • Loading branch information
carlovoSBP committed Jun 18, 2024
1 parent 1758085 commit 17dbf04
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion awsfindingsmanagerlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"""
from ._version import __version__
from .awsfindingsmanagerlib import FindingsManager, Rule, Finding
from .backends import Http
from .backends import Http, S3

__author__ = '''Marwin Baumann <[email protected]>, Costas Tyfoxylos <[email protected]>'''
__docformat__ = '''google'''
Expand All @@ -46,3 +46,4 @@
assert Finding

assert Http
assert S3
2 changes: 1 addition & 1 deletion awsfindingsmanagerlib/backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def __init__(self, bucket_name, file_name):
@staticmethod
def _get_file_contents(bucket_name, file_name):
s3 = boto3.resource('s3')
return s3.Object(s3.Bucket(bucket_name), file_name).get()['Body'].read()
return s3.Object(bucket_name, file_name).get()['Body'].read()

def _get_rules(self):
data = yaml.safe_load(self._file_contents)
Expand Down

0 comments on commit 17dbf04

Please sign in to comment.