From 21e18ff6293147369170bd5b8c500eed087be4f5 Mon Sep 17 00:00:00 2001 From: martiivGylden <martin.iversen@gyldendal.no> Date: Thu, 7 Mar 2024 10:18:27 +0100 Subject: [PATCH] Decided on csv, working on schema --- SchemaCSVtoComponent.txt | 88 ++++++++++++ diagramParser.py | 42 +++++- ...esis Bow-Tie and architecture - Bowtie.csv | 134 ++++++++++++++++++ main.py | 14 +- 4 files changed, 261 insertions(+), 17 deletions(-) create mode 100644 SchemaCSVtoComponent.txt create mode 100644 diagrams/Thesis Bow-Tie and architecture - Bowtie.csv diff --git a/SchemaCSVtoComponent.txt b/SchemaCSVtoComponent.txt new file mode 100644 index 0000000..ec9f603 --- /dev/null +++ b/SchemaCSVtoComponent.txt @@ -0,0 +1,88 @@ +Necessary info from each component: + + Threat: + ID -> Necesary for links and identification + Text area 1 -> Name (Threat) + + Text area 2 -> ID For matrix linkage + Text area 3 -> Actual ID + + Text area 4 -> Threat source + Text area 5 -> Description threat source + + Text area 6 -> Likelihood + Text area 7 -> Description Likelihood + + Text area 8 -> Description + Text area 9 -> Description of description + + Text area 10 -> Vulnerability + Text area 11 -> Description of vulnerability + + Consequence: + ID -> Necesary for links and identification + Text area 1 -> Name (Consequence) + + Text area 2 -> ID + Text area 3 -> ID for linkage + + Text area 4 -> Description + Text area 5 -> Description of consequence + + Text area 6 -> Qonsequence + Text area 7 -> Consequence score + + Text area 8 -> Affected components + Text area 9 -> The components in the architecture which are affected by consequence + + + Attack: + Text area 1 -> Name (Attack) + + Text area 2 -> Type + Text area 3 -> Type description, what kind of attack is it + + Text area 4 -> Component + Text area 5 -> Component description, what component is the attack related to + + Text area 6 -> Description + Text area 7 -> Description of the attack + + Risk + Text area 1 -> Name (Risk) + + Text area 2 -> ID + Text area 3 -> ID for linkage + + Threat dynamic: + Text area 1 -> Name (Threat dynamic) + + Text area 2 -> Metric + Text area 3 -> Metric description + Text area 4 -> Metric + Text area 5 -> Metric description + ... + + Consequence dynamic: + Text area 1 -> Name (Consequence dynamic) + + Text area 2 -> Metric + Text area 3 -> Metric description + Text area 4 -> Metric + Text area 5 -> Metric description + ... + + Attack dynamic: + Text area 1 -> Name (Attack dynamic) + + Text area 2 -> Metric + Text area 3 -> Metric description + Text area 4 -> Metric + Text area 5 -> Metric description + ... + + + + ID -> Necesary for links and identification + Text area 1 -> Main description of the component Basically ID + Text area 2 -> Secondary description of the component diff --git a/diagramParser.py b/diagramParser.py index 8dc373f..31c6b4b 100644 --- a/diagramParser.py +++ b/diagramParser.py @@ -1,11 +1,39 @@ -import csv -import requests -import xml.etree.ElementTree as ET +import pandas as pd -def parseDiagramFile(xmlFile): - xmlTree = ET.parse(xmlFile) - root = xmlTree.getroot() +# Function will parse a csv file and extract the necessary information, this is step 1 of the parse +def parseDiagramFile(csvFile): + df = pd.read_csv(csvFile) + df.drop(["Shape Library", "Page ID", "Contained By", "Group", "Comments", "property 1"], axis=1, inplace=True) #Removing unecessary data + + print(df.head) + + + # List containing all threats and their descriptions threats = [] - #List containing all consequences \ No newline at end of file + #List containing all consequences + consequences = [] + #List containing all metrics + metrics = [] + #List containing all attacks + attacks = [] + + +def parseThreats(df): + for i in range(len(df)): + if df["Shape Type"][i] == "Threat": + threats.append(df["Name"][i]) + print(threats) + +def parseConsequences(df): + for i in range(len(df)): + if df["Shape Type"][i] == "Consequence": + consequences.append(df["Name"][i]) + print(consequences) + +def parseMetrics(df): + for i in range(len(df)): + if df["Shape Type"][i] == "Metric": + metrics.append(df["Name"][i]) + print(metrics) \ No newline at end of file diff --git a/diagrams/Thesis Bow-Tie and architecture - Bowtie.csv b/diagrams/Thesis Bow-Tie and architecture - Bowtie.csv new file mode 100644 index 0000000..5a963c1 --- /dev/null +++ b/diagrams/Thesis Bow-Tie and architecture - Bowtie.csv @@ -0,0 +1,134 @@ +Id,Name,Shape Library,Page ID,Contained By,Group,Line Source,Line Destination,Source Arrow,Destination Arrow,Status,Text Area 1,Text Area 2,Text Area 3,Text Area 4,Text Area 5,Text Area 6,Text Area 7,Text Area 8,Text Area 9,Text Area 10,Text Area 11,Text Area 12,Text Area 13,Text Area 14,Text Area 15,Text Area 16,Text Area 17,Text Area 18,Text Area 19,Text Area 20,Text Area 21,Text Area 22,Text Area 23,Text Area 24,Text Area 25,Text Area 26,Text Area 27,Text Area 28,Text Area 29,Text Area 30,Text Area 31,Text Area 32,Text Area 33,Text Area 34,Text Area 35,Text Area 36,Text Area 37,Text Area 38,Text Area 39,Text Area 40,Text Area 41,Text Area 42,Text Area 43,Text Area 44,Text Area 45,Text Area 46,Text Area 47,Text Area 48,Text Area 49,Text Area 50,Text Area 51,Text Area 52,Text Area 53,Text Area 54,Text Area 55,Text Area 56,Text Area 57,Text Area 58,Text Area 59,Text Area 60,Text Area 61,Text Area 62,Text Area 63,Text Area 64,Text Area 65,Text Area 66,Text Area 67,Text Area 68,Text Area 69,Text Area 70,Text Area 71,Text Area 72,Comments,property 1 +1,Document,,,,,,,,,Draft,Thesis Bow-Tie and architecture,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +48,Entity,Entity Relationship,2,,,,,,,,Incident,Backend API gets compromised ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +49,Entity,Entity Relationship,2,,,,,,,,Threat 2,Threat source,Static dependencies,Description,Developer uses static dependency ,Vulnerability,Legacy code exploit,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +50,Entity,Entity Relationship,2,,,,,,,,Qonsequence,Database queries are monitored,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +51,Entity,Entity Relationship,2,,,,,,,,Qonsequence,Skyhiigh vendor drops application as it is vulnerable,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +52,Entity,Entity Relationship,2,,,,,,,,Barrier,Only update to stable versions,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +53,Entity,Entity Relationship,2,,,,,,,,Barrier,Use dependabot to alert new versions,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +54,Entity,Entity Relationship,2,,,,,,,,Barrier,Create dev policy enforcing updates,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +55,Entity,Entity Relationship,2,,,,,,,,Barrier,Have inclusion criteria for dependencies,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +56,Entity,Entity Relationship,2,,,,,,,,Barrier,Scan packages prior to install,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +57,Entity,Entity Relationship,2,,,,,,,,Barrier,Dont install dependencies via terminal,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +58,Entity,Entity Relationship,2,,,,,,,,Barrier,Research lbrary before install,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +59,Entity,Entity Relationship,2,,,,,,,,Barrier,Have backup database ready ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +60,Entity,Entity Relationship,2,,,,,,,,Barrier,Response plan to terminate database,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +61,Entity,Entity Relationship,2,,,,,,,,Barrier,Have backup vendor ready,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +62,Entity,Entity Relationship,2,,,,,,,,Barrier,Inform vendor of dependencies used (SBOM),,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +63,Entity,Entity Relationship,2,,,,,,,,Barrier,Monitor network and logs,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +64,Entity,Entity Relationship,2,,,,,,,,Barrier,Have response plan,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +65,Entity,Entity Relationship,2,,,,,,,,Barrier,Fork library,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +66,Table,Tables,2,,,,,,,,ID,Code sign attacks,ID,CS1,Dead account attack,H1,CS2,Phising attack,H2,CS3,Authentication exploit,H3,Build system attack,OS3,Package creation attack,,,,,OS4,Typosquat attack,,,,,OS5,Combosquat attack,,,,,,,Hijack attacks ,ID,Open source attacks,Centralized Network attack,OS1,Package injection attack,Software update attack,OS2,Legacy code attack,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +67,Table,Tables,2,,,,,,,,Metric,Process metrics,Metric,Largely subjective to case,,Policy updates,,,SLA update,,,List of vendors,Vendor may change their vendors etc ,Stars,Change in github rating,Change in req,Changes in requirements may impact the risk of the SC,,,,,Watching,"Change in number watching, fewer means better alternative might be available",,,,,,,Necessity,Is the lib necessary/can you use standard lib? ,,,,,,,Update,New update changing lib,,,,,,,Blast radius,How many components are affected? Amount of components importing/using lib,,,,,,,Sensitive data,Does the lib handle sensitive data? ,,,Vendor metrics,Metric,Open source metrics,Metric,Dev team metrics,Changes in policy may impact requirements,Scorecard score,OpenSSF scorecard score,Code standards ,Change in code standards may impact risk of development,Changes in SLA may impact uptime and availability,Snyk score,Snyk score,Team size,Team size may impact time to market and amount of code produced,, +69,Entity,Entity Relationship,2,,,,,,,,Standard dynamics event,Scorecard scores,"65, 48, 25, 13 ",Github metric,"4.6, 3.5, 5, 2.1",Updates ,Latest update,Necessity,Field,Size of SBOM,Field,Big actors using library,Field,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +70,Entity,Entity Relationship,2,,,,,,,,Relevant information,Files using dependency,Metric,Dependency update log,Metric,Vulnerability database,Metric,Package manager file,Metric,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +71,Entity,Entity Relationship,2,,,,,,,,Relevant information,Metric,Description,Development policy,Are devs updating continously?,Commit messages,Metric,Contributors in merge req,Field,SBOM changes,Field,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +72,Entity,Entity Relationship,2,,,,,,,,Relevant information,Functional requirements,Changes ,Proposed solution,,Relevant libraries,Metric,Documentation,Meeting minutes,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +73,Entity,Entity Relationship,2,,,,,,,,Associated dynamics,Search results for lib,More than one?,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +74,Entity,Entity Relationship,2,,,,,,,,Linked consequences,Css library injection,Http routing gets monitored,Database queries are monitored,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +75,Entity,Entity Relationship,2,,,,,,,,Linked threats,Static dependency,Vulnerable version,Malicious library,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +76,Entity,Entity Relationship,2,,,,,,,,Linked consequences,Css library injection,Http routing gets monitored,Database queries are monitored,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +77,Entity,Entity Relationship,2,,,,,,,,Linked consequences,Css library injection,Http routing gets monitored,Database queries are monitored,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +78,Entity,Entity Relationship,2,,,,,,,,Linked consequences,Css library injection,Http routing gets monitored,Database queries are monitored,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +79,Entity,Entity Relationship,2,,,,,,,,Risk,Using open source libraries for routing,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +80,Entity,Entity Relationship,2,,,,,,,,Threat,Threat source,New package,Description,Developer installs new package with malware,Vulnerability,Malicious package creation,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +81,Entity,Entity Relationship,2,,,,,,,,Threat,Threat source,Malicious package,Description,Developer installs package similar to the intended package,Vulnerability,Typosquat,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +82,Entity,Entity Relationship,2,,,,,,,,Consequence,Description,Type,Likelihood,Type,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +83,Entity,Entity Relationship,2,,,,,,,,Threat,Threat source,New version of library,Description,A new version of a library may be vulnerable,Vulnerability,Code injection attack,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +84,Entity,Entity Relationship,2,,,,,,,,Git Repository: Gitlab,"Hosts source code, runs pipeline, and provides code to SkyHiigh ",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +85,Entity,Entity Relationship,2,,,,,,,,Internal component: Web application,Web pages,API communication,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +86,Entity,Entity Relationship,2,,,,,,,,Internal component: SQL Database,Stores information and handles info for web page and api,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +87,Entity,Entity Relationship,2,,,,,,,,Internal component Back end API,Receive from web pages,Send warnings to WR,Store data in database ,Importance points: 4 ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +88,Phone,Google Cloud Platform 2018,2,,,,,,,,Warning receiver,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +89,Desktop,Google Cloud Platform 2018,2,,,,,,,,System manager,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +90,Entity,Entity Relationship,2,,,,,,,,External vendor: Skyhiigh,"Hosts API, web page and database, provides logging",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +91,Users,Google Cloud Platform 2018,2,,,,,,,,Extenarl vendor,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +92,Entity,Entity Relationship,2,,,,,,,,Development environment,Development environment with assistive tools ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +93,Users,Google Cloud Platform 2018,2,,,,,,,,Users,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +94,Entity,Entity Relationship,2,,,,,,,,Package manager: NPM,Front end source code,Package_JSON,Fetches and compiles dependencies,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +95,Entity,Entity Relationship,2,,,,,,,,OS library: Express/Cors,Http Routing,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +96,Entity,Entity Relationship,2,,,,,,,,OS library: Material UI,Improved CSS ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +97,Entity,Entity Relationship,2,,,,,,,,OS library: Emotion,Improved CSS ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +98,Entity,Entity Relationship,2,,,,,,,,OS library: Bootstrap,Improved CSS ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +99,Entity,Entity Relationship,2,,,,,,,,OS library: Web Vitals,Reports on performance,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +100,Entity,Entity Relationship,2,,,,,,,,Package manager: Go packages,Backend source code,Go mod,Fetches and compiles dependencies,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +101,Entity,Entity Relationship,2,,,,,,,,OS library:Gorilla mux,Routing library,Serves front end,Serves database,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +102,Entity,Entity Relationship,2,,,,,,,,OS library: Go-sql-driver,Communication with database,Serves backend,Provides information for front end,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +103,Entity,Entity Relationship,2,,,,,,,,OS library: apitest,Securs API through unit testing,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +104,Entity,Entity Relationship,2,,,,,,,,Finished application,Web pages,API communication,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +105,Entity,Entity Relationship,2,,,,,,,,Start,Supply chain begins,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +106,Entity,Entity Relationship,2,,,,,,,,End,Application is finished,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +107,Table,Tables,2,,,,,,,,Relationship(s),Architecture dynamics,Link metric,2,Compliance with dev policy,Dev policy,2,Size of SBOM,Github SBOM,2,Security scan,OpenSSF Scorecard results,Safety of library,1,2,Github metrics,Num of commits by developer for update,Experience of contributors ,1,2,Github metrics,Github Update log,How often the library changes,1,,,,Reasoning of a library update,2,,,,Popularity of library internally,2,,,,The use of static dependencies ,2,,,,Score of library,"1,2",,,,Github metrics,"1,2",,,,,,Relevant information,Associated threat,Changes in dev policy,1,Changes in SBOM,1,,,,,,,,,,,,,, +109,Entity,Entity Relationship,2,,,,,,,,Dynamics,ID,1,Description,Source code uses build system to produce application,Std metric,Size of package json,Std metric,Build time,Metric,NPM security scan,Metric,Build logs,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +110,Entity,Entity Relationship,2,,,,,,,,Dynamics,ID,2,Description,Open source libraries leveraged for functionality,Std metric,Size of SBOM,Std metric,Github metrics,Std metric ,OpenSSF Scan results,Std metric,Compliance with dev policy,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +111,Entity,Entity Relationship,2,,,,,,,,Generative AI tool,ChatGPT,Field,,Field,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +112,Entity,Entity Relationship,2,,,,,,,,Generative AI tool,Github Copilot,Field,Key,Field,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +113,Entity,Entity Relationship,2,,,,,,,,Dynamics,ID,3,Description,Source code uses build system to produce application,Std metric,Size of package json,Std metric,Build time,Metric,NPM security scan,Metric,Build logs,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +114,Diamond,Geometric Shapes,2,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +115,Entity,Entity Relationship,2,,,,,,,,Open source attack,Type,see table ,Component,Field,Description,Field,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +128,Line,,2,,,115,48,None,None,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +129,Line,,2,,,49,115,None,None,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +130,Line,,2,,,48,82,CFN ERD One Arrow,CFN ERD Many Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +131,Line,,2,,,48,50,CFN ERD One Arrow,CFN ERD Many Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +132,Line,,2,,,48,51,CFN ERD One Arrow,CFN ERD Many Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +133,Line,,2,,,52,156,CFN ERD One Arrow,CFN ERD Many Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +134,Line,,2,,,53,129,CFN ERD One Arrow,CFN ERD Many Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +135,Line,,2,,,54,129,CFN ERD One Arrow,CFN ERD Many Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +136,Line,,2,,,55,153,CFN ERD One Arrow,CFN ERD Many Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +137,Line,,2,,,56,153,CFN ERD One Arrow,CFN ERD Many Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +138,Line,,2,,,57,155,CFN ERD One Arrow,CFN ERD Many Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +139,Line,,2,,,58,155,CFN ERD One Arrow,CFN ERD Many Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +140,Line,,2,,,59,131,CFN ERD One Arrow,CFN ERD Many Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +141,Line,,2,,,60,131,CFN ERD One Arrow,CFN ERD Many Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +142,Line,,2,,,61,132,CFN ERD One Arrow,CFN ERD Many Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +143,Line,,2,,,62,132,CFN ERD One Arrow,CFN ERD Many Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +144,Line,,2,,,63,130,CFN ERD One Arrow,CFN ERD Many Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +145,Line,,2,,,64,130,CFN ERD One Arrow,CFN ERD Many Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +146,Line,,2,,,65,156,CFN ERD One Arrow,CFN ERD Many Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +147,Line,,2,,,69,48,CFN ERD One Arrow,CFN ERD Many Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +148,Line,,2,,,70,49,CFN ERD One Arrow,CFN ERD Many Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +149,Line,,2,,,76,49,CFN ERD One Arrow,CFN ERD Many Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +150,Line,,2,,,79,48,CFN ERD One Arrow,CFN ERD Many Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +151,Line,,2,,,77,80,CFN ERD One Arrow,CFN ERD Many Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +152,Line,,2,,,72,80,CFN ERD One Arrow,CFN ERD Many Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +153,Line,,2,,,80,48,CFN ERD One Arrow,CFN ERD Many Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +154,Line,,2,,,73,81,CFN ERD One Arrow,CFN ERD Many Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +155,Line,,2,,,81,48,CFN ERD One Arrow,CFN ERD Many Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +156,Line,,2,,,48,83,CFN ERD One Arrow,CFN ERD Many Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +157,Line,,2,,,71,156,CFN ERD One Arrow,CFN ERD Many Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +158,Line,,2,,,83,74,CFN ERD One Arrow,CFN ERD Many Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +159,Line,,2,,,84,94,None,Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +160,Line,,2,,,84,100,None,Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +161,Line,,2,,,84,86,None,Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +162,Line,,2,,,90,91,None,None,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +163,Line,,2,,,92,93,None,None,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +164,Line,,2,,,92,84,None,Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +165,Line,,2,,,86,90,None,Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +166,Line,,2,,,86,87,None,Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +167,Line,,2,,,90,87,None,Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +168,Line,,2,,,87,85,None,None,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +169,Line,,2,,,104,88,None,None,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +170,Line,,2,,,104,89,None,None,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +171,Line,,2,,,94,85,None,Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +172,Line,,2,,,114,95,None,None,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +173,Line,,2,,,114,96,None,None,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +174,Line,,2,,,114,97,None,None,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +175,Line,,2,,,98,114,None,None,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +176,Line,,2,,,114,99,None,None,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +177,Line,,2,,,100,87,None,Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +178,Line,,2,,,100,101,None,None,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +179,Line,,2,,,100,102,None,None,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +180,Line,,2,,,100,103,None,None,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +181,Line,,2,,,84,90,None,Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +182,Line,,2,,,85,104,None,Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +183,Line,,2,,,87,104,None,Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +184,Line,,2,,,105,92,None,None,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +185,Line,,2,,,106,104,None,None,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +186,Line,,2,,,109,159,CFN ERD One Arrow,CFN ERD Many Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +187,Line,,2,,,92,111,CFN ERD One Arrow,CFN ERD Many Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +188,Line,,2,,,92,112,CFN ERD One Arrow,CFN ERD Many Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +189,Line,,2,,,113,160,CFN ERD One Arrow,CFN ERD Many Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +190,Line,,2,,,113,177,CFN ERD One Arrow,CFN ERD Many Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +191,Line,,2,,,110,114,CFN ERD One Arrow,CFN ERD Many Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +192,Line,,2,,,109,171,CFN ERD One Arrow,CFN ERD Many Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +193,Line,,2,,,114,94,None,Arrow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, \ No newline at end of file diff --git a/main.py b/main.py index 92178f3..d9dc44d 100644 --- a/main.py +++ b/main.py @@ -1,16 +1,10 @@ import dynamics as dyn +import diagramParser as parse def main(): - dynamicMetrics = [] - - threat = dyn.ThreatDynamics(1, "Threat1") - print(threat) - - threat.addMetrics(dynamicMetrics, "Metric1", "Description1", "opensource") - threat.addMetrics(dynamicMetrics, "Metric2", "Description2","opensource") - threat.addMetrics(dynamicMetrics, "Metric3", "Description3", "opensource") - print("Threat object:", threat) - print("Metrics:", dynamicMetrics) + dynamicMetricsBowtie = [] # List of metrics for the bowtie model + dynamicMetricsArchitecture = [] # List of metrics for the architecture + parse.parseDiagramFile('diagrams/Thesis Bow-Tie and architecture - Bowtie.csv') # Parse the diagram -- GitLab