Skip to content

Commit b675d47

Browse files
author
Timothy MacDonald
committed
chore: add api token check to startup
Signed-off-by: Timothy MacDonald <[email protected]>
1 parent b10c477 commit b675d47

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/process_args.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,9 @@ def pre_process_args(args, available_reports):
154154
# Check to see if creds were provided
155155
api_key_file = None
156156
lacework_toml_exists = Path(str(Path.home()) + '/.lacework.toml').exists()
157-
env_var_creds_exist = bool(os.environ.get('LW_ACCOUNT')) and\
157+
env_var_creds_exist = (bool(os.environ.get('LW_ACCOUNT')) and\
158158
bool(os.environ.get('LW_API_KEY')) and\
159-
bool(os.environ.get('LW_API_SECRET'))
159+
bool(os.environ.get('LW_API_SECRET'))) or bool(os.environ.get('LW_API_TOKEN'))
160160
# If there's an API keyfile specified, try to use it, else exit
161161
if args.api_key_file:
162162
try:

0 commit comments

Comments
 (0)