mirror of
https://github.com/aquasecurity/kube-hunter.git
synced 2026-05-07 01:39:08 +00:00
resolved dependency issue of the json.py file, renamed it to json_reporter
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,4 @@
|
||||
*.pyc
|
||||
.dockerignore
|
||||
*aqua*
|
||||
.idea/
|
||||
|
||||
@@ -35,7 +35,7 @@ if config.log.lower() != "none":
|
||||
|
||||
from src.modules.report.plain import PlainReporter
|
||||
from src.modules.report.yaml import YAMLReporter
|
||||
from src.modules.report.json import JSONReporter
|
||||
from src.modules.report.json_reporter import JSONReporter
|
||||
|
||||
if config.report.lower() == "yaml":
|
||||
config.reporter = YAMLReporter()
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
import StringIO
|
||||
import json
|
||||
from base import BaseReporter
|
||||
|
||||
class JSONReporter(BaseReporter):
|
||||
def get_report(self):
|
||||
report = {
|
||||
"nodes": self.get_nodes(),
|
||||
"services": self.get_services(),
|
||||
"vulnerabilities": self.get_vulnerabilities(),
|
||||
"vulnerability_count": self.get_count()
|
||||
}
|
||||
return json.dumps(report)
|
||||
@@ -1,4 +1,3 @@
|
||||
import StringIO
|
||||
import json
|
||||
from base import BaseReporter
|
||||
|
||||
|
||||
Reference in New Issue
Block a user