diff options
| author | Adam Janovsky | 2022-04-08 11:13:09 +0200 |
|---|---|---|
| committer | Adam Janovsky | 2022-04-08 11:13:09 +0200 |
| commit | 96ad17500faf70653eb75aeb9ee4e08058a8ec18 (patch) | |
| tree | 475ea3cd1c2ba63cc534a89be88ba70b60610b37 | |
| parent | 93cf50ca190430f039cbd9e8d96c40930c9b3282 (diff) | |
| download | sec-certs-96ad17500faf70653eb75aeb9ee4e08058a8ec18.tar.gz sec-certs-96ad17500faf70653eb75aeb9ee4e08058a8ec18.tar.zst sec-certs-96ad17500faf70653eb75aeb9ee4e08058a8ec18.zip | |
auxillray changes
| -rw-r--r-- | notebooks/cc/vulnerabilities.ipynb | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/notebooks/cc/vulnerabilities.ipynb b/notebooks/cc/vulnerabilities.ipynb index 37862d24..a7eb5429 100644 --- a/notebooks/cc/vulnerabilities.ipynb +++ b/notebooks/cc/vulnerabilities.ipynb @@ -671,6 +671,47 @@ "source": [ "df_fixed.time_to_fix_cve" ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "import json\n", + "\n", + "with open(\"/Users/adam/phd/projects/certificates/datasets/cc_full_dataset/auxillary_datasets/pp_dataset.json\", \"r\") as handle:\n", + " data = json.load(handle)\n", + " protection_profile = data['PP Information Gateway 20 (3).pdf__12']" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [], + "source": [ + "def parse_sar(protection_profile):\n", + " try:\n", + " sars = protection_profile[\"keywords_scan\"][\"rules_security_assurance_components\"]\n", + " except KeyError:\n", + " return None # TODO: return actual value\n", + " \n", + " for sar_category in sars.values():\n", + " pass\n", + "\n", + " return sars" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [], + "source": [ + "for key, val in data.items():\n", + " parse_sar(val)" + ] } ], "metadata": { |
