aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGeogeFI2021-12-02 22:12:25 +0100
committerGeogeFI2021-12-02 22:12:25 +0100
commit697697c73221f0b3e477e74f5bc09936be01ea01 (patch)
tree1cdf263714384a73dd80ac4595cdf96f97244ce5
parent9f7714225d1ce3585b8d735340e42340cabf79b7 (diff)
downloadsec-certs-697697c73221f0b3e477e74f5bc09936be01ea01.tar.gz
sec-certs-697697c73221f0b3e477e74f5bc09936be01ea01.tar.zst
sec-certs-697697c73221f0b3e477e74f5bc09936be01ea01.zip
feat: Implemented all security levels
-rw-r--r--notebooks/cc/dependency_analysis.ipynb83
1 files changed, 74 insertions, 9 deletions
diff --git a/notebooks/cc/dependency_analysis.ipynb b/notebooks/cc/dependency_analysis.ipynb
index 2aafa9c0..8888dfcf 100644
--- a/notebooks/cc/dependency_analysis.ipynb
+++ b/notebooks/cc/dependency_analysis.ipynb
@@ -2037,7 +2037,7 @@
},
{
"cell_type": "markdown",
- "id": "8ba5f8e1",
+ "id": "44d66066",
"metadata": {},
"source": [
"### What are the EAL levels typically affecting a certificate? E.g. are certificates referencing EAL5 typically higher or same level?"
@@ -2046,7 +2046,7 @@
{
"cell_type": "code",
"execution_count": 20,
- "id": "1471d9c8",
+ "id": "173faa96",
"metadata": {},
"outputs": [
{
@@ -2339,7 +2339,7 @@
{
"cell_type": "code",
"execution_count": 23,
- "id": "18774cdc",
+ "id": "a1f4daf5",
"metadata": {},
"outputs": [],
"source": [
@@ -2353,7 +2353,7 @@
{
"cell_type": "code",
"execution_count": 55,
- "id": "6265632c",
+ "id": "c7466f69",
"metadata": {
"scrolled": true
},
@@ -2665,7 +2665,7 @@
{
"cell_type": "code",
"execution_count": 73,
- "id": "60a9756a",
+ "id": "e84ac437",
"metadata": {},
"outputs": [
{
@@ -3563,21 +3563,86 @@
},
{
"cell_type": "code",
- "execution_count": 32,
- "id": "9bda62dc",
+ "execution_count": 85,
+ "id": "46b2dd0d",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- "{'EAL4': 2}\n"
+ "For EAL1 is counter equal to: Counter({'EAL4+': 1})\n",
+ "For EAL1+ is counter equal to: Counter()\n",
+ "For EAL2 is counter equal to: Counter({'EAL2': 4, 'EAL4+': 1})\n",
+ "For EAL2+ is counter equal to: Counter({'EAL2+': 8})\n",
+ "For EAL3 is counter equal to: Counter({'EAL3': 8, 'EAL5+': 1})\n",
+ "For EAL3+ is counter equal to: Counter({'EAL3+': 14, 'EAL3': 1})\n",
+ "For EAL4 is counter equal to: Counter({'EAL4+': 5, 'EAL4': 3, 'EAL5+': 1, 'EAL6+': 1})\n",
+ "For EAL4+ is counter equal to: Counter({'EAL4+': 274, 'EAL5+': 238, 'EAL6+': 41, 'EAL3+': 3, 'EAL4': 2})\n",
+ "For EAL5 is counter equal to: Counter({'EAL5': 3, 'EAL5+': 1, 'EAL4+': 1})\n",
+ "For EAL5+ is counter equal to: Counter({'EAL5+': 187, 'EAL4+': 44, 'EAL6+': 34})\n",
+ "For EAL6+ is counter equal to: Counter({'EAL6+': 38, 'EAL5+': 6, 'EAL4+': 5})\n",
+ "For EAL7 is counter equal to: Counter()\n",
+ "For EAL7+ is counter equal to: Counter()\n"
]
}
],
"source": [
- "# TODO - Pro k"
+ "# TODO - Pro kazdy level si vyfiltruj ten level_df jakoby a udelej vsechny reference na to\n",
+ "import collections \n",
+ "\n",
+ "result = {}\n",
+ "\n",
+ "for security_level in eals:\n",
+ " security_level_list = []\n",
+ " counter = collections.Counter()\n",
+ " security_level_df = levels_df[levels_df[\"highest_security_level\"] == security_level][\"affecting_security_levels\"]\n",
+ " \n",
+ " for security_dict in security_level_df:\n",
+ " counter.update(security_dict)\n",
+ " \n",
+ " # security_level_list.append(security_dict)\n",
+ " \n",
+ " print(f\"For {security_level} is counter equal to: {counter}\")\n",
+ " \n",
+ " result[security_level] = counter\n",
+ " \n",
+ " \n",
+ " "
]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 80,
+ "id": "cd5116c2",
+ "metadata": {},
+ "outputs": [
+ {
+ "ename": "AttributeError",
+ "evalue": "'dict' object has no attribute 'append'",
+ "output_type": "error",
+ "traceback": [
+ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
+ "\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)",
+ "\u001b[0;32m/tmp/ipykernel_4993/774434289.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0mdict_a\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m{\u001b[0m\u001b[0;34m\"a\"\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;36m3\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"b\"\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;36m3\u001b[0m\u001b[0;34m}\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0mdict_b\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m{\u001b[0m\u001b[0;34m\"b\"\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;36m2\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"c\"\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m}\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 3\u001b[0;31m \u001b[0mdict_a\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mappend\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdict_b\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 4\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdict_a\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
+ "\u001b[0;31mAttributeError\u001b[0m: 'dict' object has no attribute 'append'"
+ ]
+ }
+ ],
+ "source": [
+ "dict_a = {\"a\": 3, \"b\": 3}\n",
+ "dict_b = {\"b\": 2, \"c\": 1}\n",
+ "dict_a.append(dict_b)\n",
+ "print(dict_a)\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "0b9d1140",
+ "metadata": {},
+ "outputs": [],
+ "source": []
}
],
"metadata": {