Skip to content

Commit

Permalink
Update profile logic (#86)
Browse files Browse the repository at this point in the history
* update profile logic

* version bump

* update requirements
  • Loading branch information
nhakmiller authored Mar 22, 2021
1 parent e7ab8e5 commit 50472cc
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
8 changes: 4 additions & 4 deletions panther_analysis_tool/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,13 +262,13 @@ def upload_analysis(args: argparse.Namespace) -> Tuple[int, str]:
if return_code == 1:
return return_code, ""

client = boto3.client("lambda")
# optionally set env variable for profile passed as argument
# this must be called prior to setting up the client
if args.aws_profile is not None:
logging.info("Using AWS profile: %s", args.aws_profile)
set_env("AWS_PROFILE", args.aws_profile)

client = boto3.client("lambda")
session = boto3.Session(profile_name=args.aws_profile)
client = session.client("lambda")

with open(archive, "rb") as analysis_zip:
zip_bytes = analysis_zip.read()
Expand Down Expand Up @@ -977,7 +977,7 @@ def setup_parser() -> argparse.ArgumentParser:
+ "managing Panther policies and rules.",
prog="panther_analysis_tool",
)
parser.add_argument("--version", action="version", version="panther_analysis_tool 0.5.0")
parser.add_argument("--version", action="version", version="panther_analysis_tool 0.5.1")
parser.add_argument("--debug", action="store_true", dest="debug")
subparsers = parser.add_subparsers()

Expand Down
24 changes: 12 additions & 12 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# functional dependencies
boto3==1.17.29
boto3==1.17.34
jsonpath-ng==1.5.2
requests==2.25.1
ruamel.yaml==0.16.13
Expand All @@ -8,7 +8,7 @@ semver==2.13.0
# ci dependencies
bandit==1.7.0
black==20.8b1
isort==5.7.0
isort==5.8.0
mypy==0.812
pylint==2.7.2
pyfakefs==4.4.0
Expand All @@ -17,34 +17,34 @@ PyYAML==5.4.1
## The following requirements were added by pip freeze:
appdirs==1.4.4
astroid==2.5.1
botocore==1.20.29
botocore==1.20.34
certifi==2020.12.5
chardet==4.0.0
click==7.1.2
contextlib2==0.6.0.post1
decorator==4.4.2
gitdb==4.0.5
GitPython==3.1.14
GitPython==3.1.11
idna==2.10
importlib-metadata==3.7.0
importlib-metadata==3.3.0
jmespath==0.10.0
lazy-object-proxy==1.5.2
lazy-object-proxy==1.4.3
mccabe==0.6.1
mypy-extensions==0.4.3
panther-analysis-tool==0.3.5
pathspec==0.8.1
pbr==5.5.1
ply==3.11
python-dateutil==2.8.1
regex==2020.11.13
ruamel.yaml.clib==0.2.2
s3transfer==0.3.4
s3transfer==0.3.3
six==1.15.0
smmap==3.0.5
smmap==3.0.4
stevedore==3.3.0
toml==0.10.2
typed-ast==1.4.2
typed-ast==1.4.1
typing-extensions==3.7.4.3
urllib3==1.26.4
urllib3==1.26.2
wrapt==1.12.1
zipp==3.4.1
yapf==0.30.0
zipp==3.4.0
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
setup(
name='panther_analysis_tool',
packages=['panther_analysis_tool'],
version='0.5.0',
version='0.5.1',
license='AGPL-3.0',
description=
'Panther command line interface for writing, testing, and packaging policies/rules.',
author='Panther Labs Inc',
author_email='pypi@runpanther.io',
url='https://github.com/panther-labs/panther_analysis_tool',
download_url = 'https://github.com/panther-labs/panther_analysis_tool/archive/v0.5.0.tar.gz',
download_url = 'https://github.com/panther-labs/panther_analysis_tool/archive/v0.5.1.tar.gz',
keywords=['Security', 'CLI'],
scripts=['bin/panther_analysis_tool'],
install_requires=[
Expand Down

0 comments on commit 50472cc

Please sign in to comment.