Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
IaC Scan Runner
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PIACERE
public
The Platform
IaC Scan Runner
Commits
64e7c0ce
Commit
64e7c0ce
authored
2 years ago
by
nenad.petrovic@xlab.si
Committed by
Anze Luzar
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Added uuid4 for unique indentifier of a scan run
parent
53ff563d
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/iac_scan_runner/scan_runner.py
+5
-7
5 additions, 7 deletions
src/iac_scan_runner/scan_runner.py
with
5 additions
and
7 deletions
src/iac_scan_runner/scan_runner.py
+
5
−
7
View file @
64e7c0ce
...
@@ -41,7 +41,7 @@ from iac_scan_runner.utils import (
...
@@ -41,7 +41,7 @@ from iac_scan_runner.utils import (
from
pydantic
import
SecretStr
from
pydantic
import
SecretStr
from
datetime
import
datetime
import
uuid
import
os
import
os
...
@@ -152,10 +152,8 @@ class ScanRunner:
...
@@ -152,10 +152,8 @@ class ScanRunner:
:param scan_response_type: Scan response type (JSON or HTML)
:param scan_response_type: Scan response type (JSON or HTML)
:return: Dict or string with output for running checks
:return: Dict or string with output for running checks
"""
"""
random_uuid
=
str
(
uuid
.
uuid4
())
dt
=
datetime
.
now
()
dir_name
=
"
../outputs/logs/scan_run_
"
+
random_uuid
ts
=
datetime
.
timestamp
(
dt
)
dir_name
=
"
../outputs/logs/scan_run_
"
+
str
(
ts
)
os
.
mkdir
(
dir_name
)
os
.
mkdir
(
dir_name
)
...
@@ -205,8 +203,8 @@ class ScanRunner:
...
@@ -205,8 +203,8 @@ class ScanRunner:
print
(
non_compatible_checks
)
print
(
non_compatible_checks
)
print
(
self
.
results_summary
.
show_outcomes
())
print
(
self
.
results_summary
.
show_outcomes
())
self
.
results_summary
.
dump_outcomes
(
str
(
ts
)
)
self
.
results_summary
.
dump_outcomes
(
random_uuid
)
self
.
results_summary
.
generate_html_prioritized
(
str
(
ts
)
)
self
.
results_summary
.
generate_html_prioritized
(
random_uuid
)
else
:
else
:
for
iac_check
in
self
.
iac_checks
.
values
():
for
iac_check
in
self
.
iac_checks
.
values
():
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment