Skip to content

Commit 61292d6

Browse files
committed
Automation Toolkit Release v2024.2.2
1 parent 90015a9 commit 61292d6

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

cd3_automation_toolkit/setUpOCI.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1289,6 +1289,12 @@ def start_cis_download(outdir, prefix, config_file):
12891289

12901290
def start_cis_scan(outdir, prefix, config_file):
12911291
cmd = "python cis_reports.py"
1292+
if auth_mechanism == "instance_principal":
1293+
cmd += " -ip"
1294+
elif auth_mechanism == "session_token":
1295+
cmd += " -st"
1296+
else:
1297+
cmd += " -c "+config_file
12921298
if not devops:
12931299
user_input = input("Enter command to execute the script. Press Enter to execute {} : ".format(cmd))
12941300
if user_input!='':
@@ -1306,8 +1312,8 @@ def start_cis_scan(outdir, prefix, config_file):
13061312
else:
13071313
commonTools.backup_file(outdir, resource, out_rep)
13081314

1309-
out = ["-c", config_file, '--report-directory', out_rep]
1310-
cmd = cmd +" "+ out[0] + " "+out[1] + " "+ out[2] + " " +out[3]
1315+
out = ['--report-directory', out_rep]
1316+
cmd = cmd +" "+ out[0] + " "+out[1]
13111317
split.extend(out)
13121318
print("Executing: "+cmd)
13131319
print("Scan started!")

0 commit comments

Comments
 (0)