UNPKG

@zklogic/draw.io

Version:

Draw.IO - Graph Editor integration in Angular-cli

1 lines 6.24 kB
Sidebar.prototype.addThreatModelingPalette=function(){var t="",e="threat modeling ";this.setCurrentSearchEntryLibrary("threatModeling"),this.addPaletteFunctions("threatModeling","Threat Modeling",!1,[this.createVertexTemplateEntry("rounded=0;whiteSpace=wrap;html=1;",120,60,"","External Entity",null,null,this.getTagsForStencil(t,"external entity",e).join(" ")),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;aspect=fixed;",80,80,"","Process",null,null,this.getTagsForStencil(t,"process",e).join(" ")),this.createVertexTemplateEntry("ellipse;shape=doubleEllipse;whiteSpace=wrap;html=1;aspect=fixed;",80,80,"","Multi-Process",null,null,this.getTagsForStencil(t,"multi process",e).join(" ")),this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;left=0;right=0;fillColor=none;",120,80,"","Data Store",null,null,this.getTagsForStencil(t,"data store",e).join(" ")),this.createEdgeTemplateEntry("endArrow=classic;html=1;fontColor=#FF3333;",50,50,"","Data Flow",null,e+"data flow"),this.createEdgeTemplateEntry("endArrow=classic;startArrow=classic;html=1;fontColor=#FF3333;",50,50,"","Bidirectional Data Flow",null,e+"bidirectional data flow"),this.createVertexTemplateEntry("html=1;fontColor=#FF3333;fontStyle=1;align=left;verticalAlign=top;spacing=0;labelBorderColor=none;fillColor=none;dashed=1;strokeWidth=2;strokeColor=#FF3333;spacingLeft=4;spacingTop=-3;",290,140,"Trust Boundary","Trust Boundary",null,null,this.getTagsForStencil(t,"trust boundary",e).join(" ")),this.createVertexTemplateEntry("shape=requiredInterface;html=1;verticalLabelPosition=bottom;dashed=1;strokeColor=#FF3333;strokeWidth=2;fillColor=none;fontColor=#FF3333;align=left;",20,330,"","Trust Boundary",null,null,this.getTagsForStencil(t,"trust boundary",e).join(" ")),this.createVertexTemplateEntry("text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;overflow=hidden;",80,20,"Label","Label",null,null,this.getTagsForStencil(t,"label",e).join(" ")),this.createVertexTemplateEntry("text;html=1;strokeColor=#d6b656;fillColor=#fff2cc;align=center;verticalAlign=middle;whiteSpace=wrap;overflow=hidden;",40,20,"A01","Asset Label",null,null,this.getTagsForStencil(t,"asset label",e).join(" ")),this.createVertexTemplateEntry("text;html=1;strokeColor=#82b366;fillColor=#d5e8d4;align=center;verticalAlign=middle;whiteSpace=wrap;overflow=hidden;",30,20,"C01","Security Control Label",null,null,this.getTagsForStencil(t,"security control label",e).join(" ")),this.createVertexTemplateEntry("text;html=1;strokeColor=#b85450;fillColor=#f8cecc;align=center;verticalAlign=middle;whiteSpace=wrap;overflow=hidden;",40,20,"TA01","Threat Actor Label",null,null,this.getTagsForStencil(t,"threat actor label",e).join(" ")),this.createVertexTemplateEntry("text;html=1;strokeColor=#c0c0c0;fillColor=#ffffff;overflow=fill;rounded=0;shadow=1;labelBackgroundColor=#ffffff;fontColor=#000000;align=left;",390,1.1*100,'<table border="1" width="100%" style="width: 100% ; height: 100% ; border-collapse: collapse ; border: 1px solid #d6b656"><tbody><tr style="background-color: #fff2cc ; color: #000000 ; border: 1px solid #d6b656"><th align="center" colspan="2">Assets</th></tr><tr style="background-color: #fff2cc ; color: #000000 ; border: 1px solid #d6b656"><th align="left" style="border: 1px solid #d6b656">ID</th><th align="left" style="border: 1px solid #d6b656">Description</th></tr><tr><td style="border: 1px solid #d6b656">A01</td><td style="border: 1px solid #d6b656"></td></tr></tbody></table>',"Asset Table",null,null,this.getTagsForStencil(t,"asset table",e).join(" ")),this.createVertexTemplateEntry("text;html=1;strokeColor=#c0c0c0;fillColor=#ffffff;overflow=fill;rounded=0;shadow=1;labelBackgroundColor=#ffffff;fontColor=#000000;align=left;",365,90,'<table border="1" width="100%" style="width: 100% ; height: 100% ; border-collapse: collapse ; border: 1px solid #b85450"><tbody><tr style="background-color: #f8cecc ; color: #000000 ; border: 1px solid #b85450"><th align="center" colspan="2">Threat Actors</th></tr><tr style="background-color: #f8cecc ; color: #000000 ; border: 1px solid #b85450"><th align="left" style="border: 1px solid #b85450">ID</th><th align="left" style="border: 1px solid #b85450">Description</th></tr><tr><td style="border: 1px solid #b85450">TA01</td><td style="border: 1px solid #b85450"></td></tr></tbody></table>',"Threat Actor Table",null,null,this.getTagsForStencil(t,"threat actor table",e).join(" ")),this.createVertexTemplateEntry("text;html=1;strokeColor=#c0c0c0;fillColor=#ffffff;overflow=fill;rounded=0;shadow=1;labelBackgroundColor=#ffffff;fontColor=#000000;align=left;",365,90,'<table border="1" width="100%" style="width: 100% ; height: 100% ; border-collapse: collapse ; border: 1px solid #82b366"><tbody><tr style="background-color: #d5e8d4 ; color: #000000 ; border: 1px solid #82b366"><th align="center" colspan="2">Security Controls</th></tr><tr style="background-color: #d5e8d4 ; color: #000000 ; border: 1px solid #82b366"><th align="left" style="border: 1px solid #82b366">ID</th><th align="left" style="border: 1px solid #82b366">Description</th></tr><tr><td style="border: 1px solid #82b366">C01</td><td style="border: 1px solid #82b366"></td></tr></tbody></table>',"Security Control Table",null,null,this.getTagsForStencil(t,"security control table",e).join(" ")),this.createVertexTemplateEntry("shape=note;strokeWidth=2;fontSize=14;size=20;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontColor=#666600;",1.1*100,80,"Note","Note",null,null,this.getTagsForStencil(t,"note",e).join(" ")),this.createVertexTemplateEntry("shape=or;whiteSpace=wrap;html=1;direction=north;fillColor=#dae8fc;strokeColor=#6c8ebf;",120,80,"AND","AND Gate",null,null,this.getTagsForStencil(t,"and gate",e).join(" ")),this.createVertexTemplateEntry("shape=xor;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;direction=north;",120,80,"OR","OR Gate",null,null,this.getTagsForStencil(t,"or gate",e).join(" ")),this.createVertexTemplateEntry("rounded=0;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;",120,80,"Leaf","Leaf Node",null,null,this.getTagsForStencil(t,"leaf node",e).join(" "))]),this.setCurrentSearchEntryLibrary()};