Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Paas CI
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
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
INFN Cloud
Paas CI
Commits
87edc204
Commit
87edc204
authored
10 months ago
by
Gioacchino Vino
Browse files
Options
Downloads
Patches
Plain Diff
New oids classification
parent
a7ce55bc
No related branches found
Branches containing commit
No related tags found
1 merge request
!151
Debug paas ci
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
files/gvm_library.py
+3
-8
3 additions, 8 deletions
files/gvm_library.py
with
3 additions
and
8 deletions
files/gvm_library.py
+
3
−
8
View file @
87edc204
...
...
@@ -684,7 +684,7 @@ class ReportManager():
self
.
REPORT_THREAT
:
self
.
DEFAULT_THREAT
}
self
.
oids
=
dict
()
def
init_host_vars
(
self
,
host
:
str
):
#, r: ResultReport):
def
init_host_vars
(
self
,
host
:
str
):
self
.
oids
[
host
]
=
{
self
.
OID_ACCEPTED
:
[],
self
.
OID_DROPPED
:
[],
self
.
OID_NEW
:
[]}
...
...
@@ -693,8 +693,6 @@ class ReportManager():
self
.
oids
[
host
][
self
.
OID_OS
]
=
[]
self
.
report
[
host
]
=
dict
()
#self.report[host][r.port] = {self.REPORT_SEVERITY: self.DEFAULT_SEVERITY,
# self.REPORT_THREAT: self.DEFAULT_THREAT}
self
.
report
[
host
][
self
.
REPORT_GLOBAL
]
=
{
self
.
REPORT_SEVERITY
:
self
.
DEFAULT_SEVERITY
,
self
.
REPORT_THREAT
:
self
.
DEFAULT_THREAT
}
...
...
@@ -722,14 +720,13 @@ class ReportManager():
for
host
,
host_report
in
self
.
imported_oids
.
items
():
# Init aggregated variables per host
self
.
init_host_vars
(
host
)
#,res_report)
self
.
init_host_vars
(
host
)
for
res_report
in
host_report
:
logging
.
debug
(
res_report
)
# Skip if oid is not relevant
if
res_report
.
severity
<
self
.
SEVERITY_THR
:
self
.
update_summary
(
host
,
res_report
)
logging
.
debug
(
"
LOW SEVERITY -> SKIPPED
"
)
continue
...
...
@@ -760,8 +757,6 @@ class ReportManager():
else
:
self
.
report
[
self
.
REPORT_GLOBAL
]
=
self
.
MSG_NOK
logging
.
debug
(
pretty_json
(
self
.
report
))
def
get_summary
(
self
)
->
str
:
return
pretty_json
(
self
.
report
)
...
...
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