This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ 'host':foo, | |
'scan time': time, | |
'scan_results': { 'bef54...': { 'summary: '** summarize_cve_content', | |
'isImage': True, .. | |
}, | |
'10acc...': {'summary': ... | |
} | |
'other_relevant_info': foobar, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from image_scanner_client.image_scanner_client import Client | |
from image_scanner_client.image_scanner_client import ImageScannerClientError | |
from image_scanner_client.xml_parse import ParseOvalXML | |
import json | |
import sys | |
import time | |
def debug_print(json_data): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<head> | |
<title>Docker Info</title> | |
<meta charset="utf-8"> | |
<link href="../base1/cockpit.css" type="text/css" rel="stylesheet"> | |
<script src="../base1/jquery.js"></script> | |
<script src="../base1/cockpit.js"></script> | |
<script src="mustache.js"></script> | |
</head> | |
<body> | |
<div id="test-dialog" tabindex="-1" role="dialog" data-backdrop="static"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function process_info(data) { | |
var resp = JSON.parse(data); | |
var rresults = resp.results | |
var docker_ids = Object.keys(resp.results) | |
var html = "" | |
for (var key in resp.results) { | |
var docker_id = "<h2>" + key + "</h2>"; | |
var value = resp.results[key]; | |
if (!value.hasOwnProperty('msg')){ | |
scan_result = "<P>" + value.critical; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@slip.dbus.polkit.require_auth("org.atomic.read") | |
@dbus.service.method("org.atomic.Scanner", in_signature='s', out_signature='aa{sv}') | |
def inspect_container(self, cid): | |
''' Returns inspect data of a container''' | |
inspect_data = self.docker_conn.inspect_container(cid) | |
print type(inspect_data) | |
return inspect_data | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import dbus | |
import dbus.service | |
import sys | |
import dbus | |
import dbus.service | |
import dbus.mainloop.glib | |
from slip.dbus import polkit | |
import json | |
import collections |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import dbus | |
import dbus.service | |
import dbus.mainloop.glib | |
from gi.repository import GObject, GLib | |
import slip.dbus.service | |
from slip.dbus import polkit | |
import os | |
import Atomic | |
import docker | |
import json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
epoch = datetime.datetime.utcfromtimestamp(0) | |
remote_pattern = '%Y-%m-%d %H:%M:%S %Z' | |
remote_ts = '2015-09-18 12:36:10 GMT' | |
remote_dt = datetime.datetime.strptime(remote_ts, remote_pattern) | |
foo = (remote_dt - epoch).total_seconds() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if self.args.json and not self.args.dbus: | |
util.output_json(helpers.json_out) | |
elif self.args.dbus: | |
return helpers.json_out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
json_files = self._get_json_files() | |
dbus_results = [] | |
for json_file in json_files: | |
dbus_results.append(json.load(open(json_file))) |
OlderNewer