Skip to content

Commit 43dc7cc

Browse files
warn user to delete user_config.yml and the generated CSV file
1 parent 10d2c37 commit 43dc7cc

File tree

3 files changed

+36
-1
lines changed

3 files changed

+36
-1
lines changed

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = conformity-migration-tool
3-
version = 0.12.0
3+
version = 0.13.0
44
description = Migrates your visiblity information in cloudconformity.com to cloudone.trendmicro.com
55
long_description = file: README.md
66
long_description_content_type = text/markdown

src/conformity_migration_tool/aws_cli.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import atexit
12
import csv
23
import json
34
import multiprocessing as mp
@@ -528,5 +529,20 @@ def pretty_print(obj):
528529
print(json.dumps(obj, indent=4, default=str))
529530

530531

532+
@atexit.register
533+
def warn_aws_creds():
534+
print(
535+
"""
536+
537+
\033[32m!!! W A R N I N G !!!\033[0m"""
538+
)
539+
print(
540+
"""
541+
After you finish updating the stack, please make sure to delete
542+
any generated CSV file that may contain your AWS credentials.
543+
"""
544+
)
545+
546+
531547
if __name__ == "__main__":
532548
cli()

src/conformity_migration_tool/cli.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import atexit
12
import csv
23
import os
34
import time
@@ -1283,5 +1284,23 @@ def empty_c1():
12831284
# raise e
12841285

12851286

1287+
@atexit.register
1288+
def warn_user_config():
1289+
user_conf_path = user_config_path()
1290+
if not user_conf_path.exists():
1291+
return
1292+
print(
1293+
"""
1294+
1295+
\033[32m!!! W A R N I N G !!!\033[0m"""
1296+
)
1297+
print(
1298+
f"""
1299+
The file {user_conf_path} contains your Conformity and Cloud One API Keys.
1300+
Please delete the file once you are done using this tool.
1301+
"""
1302+
)
1303+
1304+
12861305
if __name__ == "__main__":
12871306
cli()

0 commit comments

Comments
 (0)