{"version":3,"sources":["interface/State.tsx","Components/Header.tsx","images/Logo.png","Components/LeftNav.tsx","Components/Footer.tsx","Utilities/Utils.ts","Components/HomePage.tsx","Components/AboutUs.tsx","Components/Content.tsx","App.tsx","index.tsx"],"names":["ResourceType","Header","this","props","globalState","setGlobalState","appearance","src","width","height","alt","Body","Item","onSelect","activateHomePage","activateAboutUsPage","pullRight","icon","role","href","title","React","Component","LeftNav","_handleVulnerabilityLevelSelect","bind","_handleVulnerabilityTypeSelect","applicationName","vulnerabilityName","levelIdentifier","activeApplication","activeVulnerability","activeLevel","showHints","undefined","levels","eventKey","activeKey","onOpen","className","map","vulnerabilityLevel","variant","vulnerabilityDefinition","defaultOpenKeys","divider","_getApplicationVulnerabilityLevels","name","isSuccessfullyLoaded","applicationData","vulnerabilityDefinitions","_getApplicationVulnerabilities","Footer","copyRightYear","style","textAlign","fontSize","getResource","uri","callback","isJson","fetch","then","res","json","text","result","isSuccessful","data","error","removeChildByParentElementId","elementId","documentElement","document","getElementById","lastElementChild","removeChild","manipulateDOM","content","element","innerHTML","HomePage","Card","header","AboutUs","Content","selectedLevel","prevProps","selectedApplicationState","find","applicationState","selectedVulnerability","id","setState","description","level","resourceInformation","htmlResource","_setLocalState","vulnerabilityDefinitionResponse","staticResources","forEach","resourceURI","resourceType","JAVASCRIPT","script","createElement","Date","getTime","type","appendChild","CSS","cssElement","rel","collapsible","defaultExpanded","hints","length","expanded","hint","App","state","window","globalUtilityState","activeVulnerabilityIdentifier","activeVulnerabilityLevelIdentifier","baseURI","location","toString","levelInformationRes","resourceInformationHtml","isAbsolute","staticResourceInformation","staticResourceInformationIndexRes","staticResourceInformationRes","push","hintIndexRes","hintRes","vulnerabilityTypes","vulnerabilityTypeIndexRes","identifierType","value","vulnerabilityDefinitionsRes","vulnerabilityDefinitionIndexRes","vulnerabilityLevelIndexRes","_getHintsForLevel","resourceInformations","_getResourcesInformationsForLevel","levelInformation","applicationsDataRes","applicationDataArray","vulnerableAppRes","_populateLevelsForVulnerability","_getVulnerabilityTypesForLevel","console","log","_populateGlobalState","getFullYear","display","ReactDOM","render","StrictMode"],"mappings":"uKAsBYA,E,yKCVSC,E,4JACnB,WACE,MAAwCC,KAAKC,MAArCC,EAAR,EAAQA,YAAaC,EAArB,EAAqBA,eACrB,OACE,cAAC,IAAD,UACE,eAAC,IAAD,CAAcC,WAAW,UAAzB,UACE,cAAC,IAAaL,OAAd,UACE,qBACEM,ICpBC,6oEDqBDC,MAAM,KACNC,OAAO,KACPC,IAAI,0BAGR,eAAC,IAAaC,KAAd,WACE,cAAC,IAAD,UACE,cAAC,IAAUC,KAAX,CACEC,SAAU,kBACRR,EAAe,2BACVD,GADS,IAEZU,kBAAkB,EAClBC,qBAAqB,MAL3B,SASE,+DAGJ,eAAC,IAAD,CAAWC,WAAS,EAApB,UACE,cAAC,IAAUJ,KAAX,CACEC,SAAU,kBACRR,EAAe,2BACVD,GADS,IAEZU,kBAAkB,EAClBC,qBAAqB,MAGzBE,KAAM,cAAC,IAAD,CAAYA,KAAK,OAAOC,KAAM,QARtC,kBAYA,cAAC,IAAUN,KAAX,CACEC,SAAU,kBACRR,EAAe,2BACVD,GADS,IAEZU,kBAAkB,EAClBC,qBAAqB,MAL3B,sBAWA,mBAAGI,KAAK,oDAAR,SACE,cAAC,IAAUP,KAAX,CACEK,KAAM,cAAC,IAAD,CAAYA,KAAK,SAASC,KAAM,QADxC,sBAMF,eAAC,IAAD,CAAgBE,MAAM,wBAAtB,UACE,mBAAGD,KAAK,6CAAR,SACE,cAAC,IAAeP,KAAhB,CACEK,KAAM,cAAC,IAAD,CAAYA,KAAK,SAASC,KAAM,QADxC,mCAMF,oBAAGC,KAAK,mDAAR,UACG,IACD,cAAC,IAAeP,KAAhB,CACEK,KAAM,cAAC,IAAD,CAAYA,KAAK,SAASC,KAAM,QADxC,8BAMF,mBAAGC,KAAK,0DAAR,SACE,cAAC,IAAeP,KAAhB,CACEK,KAAM,cAAC,IAAD,CAAYA,KAAK,SAASC,KAAM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,EAAD,CACED,YAAaF,KAAKuH,MAClBpH,eAAgBH,KAAKG,oBAGzB,cAAC,EAAD,CAAQgD,cAAeA,EAAvB,2B,GAzMyBhC,IAAMC,WCVvCyI,IAASC,OACP,cAAC,IAAMC,WAAP,UACE,cAAC,EAAD,MAEFxF,SAASC,eAAe,W","file":"static/js/main.90c13a2c.chunk.js","sourcesContent":["export interface VulnerabilityType {\n /**\n * Represents identifier type of Vulnerability like CWE or WASC or any other.\n * We have not restricted to anyone type of the identifier as there is no standard which covers\n * all the types of Vulnerabilities.\n */\n identifierType: string;\n\n /**\n * E.g. WASC-1\n */\n value: string;\n}\n\n/**\n * Hints are to help user to crack the vulnerability level\n */\nexport interface Hint {\n vulnerabilityTypes: Array;\n description: string;\n}\n\nexport enum ResourceType {\n //HTML is sufficient for the server side languages\n // which returns the html with extensions as \".php\" or \".jsp\" etc\n HTML = \"HTML\",\n JAVASCRIPT = \"JAVASCRIPT\",\n CSS = \"CSS\",\n}\n\nexport class ResourceURI {\n resourceType: ResourceType = ResourceType.HTML;\n isAbsolute: boolean = false;\n uri: string = \"/\";\n}\n\nexport interface ResourceInformation {\n htmlResource: ResourceURI;\n staticResources: Array;\n}\n\n/**\n * Information about the Level present in the Vulnerability.\n * TODO we can work more on things like difficulty levels or scores etc. But currently those\n * things are out of scope of the VulnerableApp-Facade.\n */\nexport interface LevelInformation {\n /**\n * Identifier of the Level.\n * As this is shown in the UI so we have a convension what it is of the formation LEVEL_*\n * where * represent the number identifier like LEVEL_1, LEVEL_2 etc.\n */\n levelIdentifier: string;\n\n /**\n * Represents whether the level is SECURE or UNSECURE.\n * This might not be needed for general applications but in case a vulnerable\n * application needs to send few secure implementations too such that scanners\n * are evaluated for false positives.\n */\n variant: string;\n\n hints: Array;\n\n /**\n * As we know that VulnerableApp-Facade will be building the skeleton\n * so to load the UI of the actual Vulnerable Application we need to inject the\n * Html inside the Skeleton. This Resource Information provides that information.\n */\n resourceInformation: ResourceInformation;\n}\n\nexport interface VulnerabilityDefinition {\n /**\n * Name of the Vulnerability.\n * This will be shown in the UI and expectation is that it should be human readable.\n */\n name: string;\n /**\n * Unique identifier for each Vulnerability inside an Application\n */\n id: string;\n /**\n * Description about the Vulnerability.\n * This will be shown in the UI and as it describes the vulnerability, it should be human readable.\n */\n description: string;\n\n /**\n * VulnerabilityTypes represents the different standard identifier for one vulnerability.\n * For example: WASC-01 and CWE-287 both represent Insufficient Authentication vulnerability hence\n * both will be added here.\n */\n vulnerabilityTypes: Array | null;\n\n /**\n * Information about each level present under the vulnerability\n */\n levels: Array;\n}\n\n/**\n * Represents the VulnerableApplications entire state.\n */\nexport interface ApplicationState {\n applicationName: string;\n vulnerabilityDefinitions: Array;\n}\n\n/**\n * Global State representing the entire data of the application.\n */\nexport interface GlobalState {\n applicationData?: Array;\n activeApplication?: string;\n activeVulnerability?: string;\n activeLevel?: string;\n isSuccessfullyLoaded: boolean;\n activateHomePage: boolean;\n activateAboutUsPage: boolean;\n showHints: boolean;\n}\n","import React from \"react\";\nimport VulnerableAppLogo from \"../images/Logo.png\";\n\nimport {\n Header as RSuiteHeader,\n Navbar as RSuiteNavBar,\n Nav as RSuiteNav,\n Icon as RSuiteIcon,\n Dropdown as RSuiteDropDown,\n} from \"rsuite\";\nimport { Props } from \"../interface/Props\";\n\nexport default class Header extends React.Component {\n render() {\n const { globalState, setGlobalState } = this.props;\n return (\n \n \n \n \n \n \n \n \n setGlobalState({\n ...globalState,\n activateHomePage: true,\n activateAboutUsPage: false,\n })\n }\n >\n Owasp VulnerableApp-Facade\n \n \n \n \n setGlobalState({\n ...globalState,\n activateHomePage: true,\n activateAboutUsPage: false,\n })\n }\n icon={}\n >\n Home\n \n \n setGlobalState({\n ...globalState,\n activateHomePage: false,\n activateAboutUsPage: true,\n })\n }\n >\n About Us\n \n \n }\n >\n Github\n \n \n \n \n }\n >\n Owasp VulnerableApp\n \n \n \n {\" \"}\n }\n >\n ZAP JWT Addon\n \n \n \n }\n >\n ZAP FileUpload Addon\n \n \n \n \n \n \n \n );\n }\n}\n","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAApVBMVEVMaXH/owD/owD/owD/owD/owD/owD/owD/owD/owD/owD/owD/owD/owD/owD/owD/owD/owD/eQD/////owD/mQD/9/D/gRD/iiD/kwD/hAD/mwD/oQD/m0D/3sD/gQD/vID/iwD/5tD/zaD/kjD/7+D/fAD/q2D/o1D/jgD/iQD/s0D/tHD/1bD/xZD/fgD/ngD/hgD/kQD/lgD/nxD/p0D/rDDbHE6NAAAAEnRSTlMAwPFgsODQQBCAIHCgMJDiUPDtRLEwAAAACXBIWXMAAAsSAAALEgHS3X78AAAFOElEQVR4nO2baXPiOBCGxX1Pdq3mNkcIEGBDIJnZ/f8/bcvGtlqWLNQ+oKbG75ckVWP143Zfkj2sVKlSpUqV+s3VbrXaz7qDdqtTbwAANOqdR1NEtgHm89vPh1Fg29PXmeM4zux1+hgKjW2hgimMtgumsLRdCAXZdo4UGWxnp2jnYDuBwg6ilZdtlaJlCTDP0TaimFsDDIuw7zjDEuAPABg/GWCxezLAhr8/FWDN+fKZAJMR53zxRIAz52YX2AP8SmN/wX0ZXGAP8M8b3f54dwMwuIAAYI5mrdY80DYXgFHyMnpNQvs82XsUAL4zFzVFywiAT3IBMGe0ooOwn+wCGgD/JNgfjxBAoguIAPxgD/CJ7Se6gApgH4hbLishfqgAfGMbiMsYwDonAH62s/8Rs89HenI6AP+wsS9HoMEFKQCMzS3Um2I/wQX2AP+JlRKrSqQFsvtudAGhHYunurkLsBEAhygftbMZZR44303qUGth/4xwdN2MAjAW92VujBMRgf7jCv/WuYA0EW3FwsZ6JFwVpMwhmZs2kr2LOzPUIxSBYff6THQBcSb8VJZWFY5BUr5swohMC9AF8P+9KLCJjRFFoKhZQRio2FfoWgGwAABVuIRAFGOQZC54ekoRA7CzHwKgJpfQGIWP5IL1pneBNUADghMSVI9IE1qQxDEXXOBvS4BKCIDKvK4xThaB0O2juhh3wQwq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AtlIf0gAAAABJRU5ErkJggg==\"","import React from \"react\";\nimport {\n Sidenav as RSuiteSidenav,\n Dropdown as RSuiteDropdown,\n Nav as RSuiteNav,\n Icon as RSuiteIcon,\n} from \"rsuite\";\nimport { Props } from \"../interface/Props\";\nimport { LevelInformation, VulnerabilityDefinition } from \"../interface/State\";\n\nexport default class LeftNav extends React.Component {\n constructor(props: Props) {\n super(props);\n this._handleVulnerabilityLevelSelect =\n this._handleVulnerabilityLevelSelect.bind(this);\n this._handleVulnerabilityTypeSelect =\n this._handleVulnerabilityTypeSelect.bind(this);\n }\n\n _handleVulnerabilityLevelSelect(\n applicationName: string,\n vulnerabilityName: string,\n levelIdentifier: string\n ) {\n this.props.setGlobalState({\n activeApplication: applicationName,\n activeVulnerability: vulnerabilityName,\n activeLevel: levelIdentifier,\n activateHomePage: false,\n activateAboutUsPage: false,\n showHints: false,\n });\n }\n\n _handleVulnerabilityTypeSelect(\n applicationName: string,\n vulnerabilityName: string\n ) {\n this.props.setGlobalState({\n activeApplication: applicationName,\n activeVulnerability: vulnerabilityName,\n activeLevel: undefined,\n activateHomePage: false,\n activateAboutUsPage: false,\n showHints: false,\n });\n }\n\n _getApplicationVulnerabilityLevels(\n applicationName: string,\n vulnerabilityName: string,\n levels: Array\n ) {\n const { activeApplication, activeVulnerability, activeLevel } =\n this.props.globalState;\n return (\n \n this._handleVulnerabilityTypeSelect(\n applicationName,\n vulnerabilityName\n )\n }\n className=\"VulnerableApp-Facade-LeftNav-Vulnerability-Level\"\n data-testid={applicationName + \".\" + vulnerabilityName}\n >\n {levels.map((vulnerabilityLevel) => (\n \n ) : (\n \n )\n }\n onSelect={() =>\n this._handleVulnerabilityLevelSelect(\n applicationName,\n vulnerabilityName,\n vulnerabilityLevel.levelIdentifier\n )\n }\n data-testid={applicationName +\n \".\" +\n vulnerabilityName +\n \".\" +\n vulnerabilityLevel.levelIdentifier}\n >\n {vulnerabilityLevel.levelIdentifier}\n \n ))}\n \n );\n }\n\n _getApplicationVulnerabilities(\n applicationName: string,\n vulnerabilityDefinition: Array,\n activeApplication?: string\n ) {\n return (\n \n \n \n }\n >\n \n {vulnerabilityDefinition.map((vulnerabilityDefinition) =>\n this._getApplicationVulnerabilityLevels(\n applicationName,\n vulnerabilityDefinition.name,\n vulnerabilityDefinition.levels\n )\n )}\n \n \n \n \n );\n }\n\n render() {\n const { isSuccessfullyLoaded, applicationData, activeApplication } =\n this.props.globalState;\n if (isSuccessfullyLoaded && applicationData) {\n return (\n
\n {applicationData.map((applicationData) => {\n let applicationName = applicationData.applicationName;\n let vulnerabilityDefinitions =\n applicationData.vulnerabilityDefinitions;\n return this._getApplicationVulnerabilities(\n applicationName,\n vulnerabilityDefinitions,\n activeApplication\n );\n })}\n
\n );\n }\n return
;\n }\n}\n","import React from \"react\";\nimport {\n Footer as RSuiteFooter,\n FooterProps,\n Navbar as RSuiteNavBar,\n} from \"rsuite\";\n\ninterface IFooter extends FooterProps {\n copyRightYear: number;\n}\n\nexport default class Footer extends React.Component {\n render() {\n const { copyRightYear } = this.props;\n return (\n \n \n \n
\n © Copyright {copyRightYear}, SasanLabs\n
\n \n
\n
\n );\n }\n}\n","import { LevelInformation, ResourceType } from \"../interface/State\";\n\n/**\n * Utility function for fetching data by doing an Http Get call.\n * @param uri , resource URL\n * @param callback , callback function to invoke on Api response\n * @param isJson , to parse the response and return json object if True and text in case of False\n */\nexport function getResource(uri: string, callback: Function, isJson: boolean): void {\n fetch(uri)\n .then((res) => (isJson ? res.json() : res.text()))\n .then(\n (result) => {\n callback({ isSuccessful: true, data: result });\n },\n (error) => {\n callback({ isSuccessful: false, error: error });\n }\n );\n}\n\nexport function removeChildByParentElementId(elementId: string): void {\n let documentElement = document.getElementById(elementId);\n while (documentElement && documentElement.lastElementChild) {\n documentElement.removeChild(documentElement.lastElementChild);\n }\n}\n\n\nexport function appendStaticResourcesToDocument(selectedLevel: LevelInformation): void {\n removeChildByParentElementId(\"scripts\");\n removeChildByParentElementId(\"styles\");\n selectedLevel.resourceInformation.staticResources.forEach(\n (resourceURI) => {\n if (resourceURI.resourceType === ResourceType.JAVASCRIPT) {\n const script = document.createElement(\"script\");\n script.src = resourceURI.uri + \"?p=\" + new Date().getTime();\n script.type = \"module\";\n document.getElementById(\"scripts\")?.appendChild(script);\n } else if (resourceURI.resourceType === ResourceType.CSS) {\n let cssElement = document.createElement(\"link\");\n cssElement.href = resourceURI.uri;\n cssElement.type = \"text/css\";\n cssElement.rel = \"stylesheet\";\n document.getElementById(\"styles\")?.appendChild(cssElement);\n }\n });\n}\n\nexport function manipulateDOM(elementId: string, content: string): void {\n const element = document.getElementById(elementId);\n if(element) {\n element.innerHTML = content;\n }\n}","import React from \"react\";\nimport { Panel as RSuitePanel, PanelGroup as RSuitePanelGroup } from \"rsuite\";\n\nexport class HomePage extends React.Component {\n Card = () => (\n
\n \n
\n As we are seeing a lot of technological enhancements in the industry\n from past few years, these technical enhancements are solving one or\n the other problem however, with that they also bring few different\n vulnerabilities. Vulnerable Applications are generally written in one\n of the techstacks like either Node.js or Java with a SQL or NoSQL\n database etc and hence they are not able to expand to a whole new set\n of vulnerabilities which are present in other technologies. Also\n adding more vulnerabilities in a single vulnerable application makes\n it heavier and complex which finally makes it unmaintainable. So\n VulnerableApp-facade is built to solve this problem by building a\n distributed farm of Vulnerable Applications such that they can be\n built agnostic to tech stacks.\n

Following is the design diagram of Owasp VulnerableApp-Facade:

\n \n

\n Here VulnerableApp-Facade is running as a gateway or a proxy which\n is routing calls to actual Vulnerable Applications based on a\n criteria defined in the nginx configuration.\n

\n
\n \n \n
\n As VulnerableApp-Facade is a proxy wrapper over the actual Vulnerable\n Applications which can be very dangerous if exposed over the public\n internet. So we suggest you to please run it in local dev environments\n or environments without any public internet access.\n
\n \n
\n );\n\n render() {\n return (\n
\n \n \n \n
\n );\n }\n}\n","import React from \"react\";\nimport {\n Panel as RSuitePanel,\n PanelGroup as RSuitePanelGroup,\n Icon as RSuiteIcon,\n} from \"rsuite\";\n\nexport default class AboutUs extends React.Component {\n Card = () => (\n
\n \n
\n

\n VulnerableApp-Facade was started when we were building{\" \"}\n \n File-upload addon\n {\" \"}\n for Owasp ZAP, which is used\n to find the vulnerabilities in the File Upload functionality. As we\n were developing the addon and writing the scan rules, in order to\n test those scan rules we were using{\" \"}\n \n Owasp VulnerableApp\n {\" \"}\n but as Owasp VulnerableApp is written in Java and is a SpringBoot\n application hence testing scan rules related to PHP, ASP, JSP etc\n are not possible. Hence we thought of building a facade application\n which acts as proxy or gateway to route the requests to vulnerable\n applications written in different tech stacks.\n

\n
\n \n \n

\n karan.sasan@owasp.org\n

\n \n
\n );\n\n render() {\n return (\n
\n \n \n \n
\n );\n }\n}\n","import React from \"react\";\nimport { LevelInformation } from \"../interface/State\";\nimport { Panel as RSuitePanel } from \"rsuite\";\nimport {\n appendStaticResourcesToDocument,\n getResource,\n manipulateDOM,\n} from \"../Utilities/Utils\";\nimport { VulnerabilityDefinitionResponse } from \"../interface/GeneralContracts\";\nimport { HomePage } from \"./HomePage\";\nimport AboutUs from \"./AboutUs\";\nimport { Props } from \"../interface/Props\";\n\nexport class Content extends React.Component {\n selectedLevel?: LevelInformation;\n\n componentDidUpdate(prevProps: Props) {\n if (\n prevProps.globalState.activeLevel !==\n this.props.globalState.activeLevel ||\n prevProps.globalState.activeVulnerability !==\n this.props.globalState.activeVulnerability ||\n prevProps.globalState.activeApplication !==\n this.props.globalState.activeApplication\n ) {\n const {\n activeApplication,\n applicationData,\n activeVulnerability,\n activeLevel,\n } = this.props.globalState;\n const selectedApplicationState = applicationData?.find(\n (applicationState) =>\n applicationState.applicationName === activeApplication\n );\n if (selectedApplicationState) {\n const selectedVulnerability =\n selectedApplicationState.vulnerabilityDefinitions.find(\n (vulnerabilityDefinition) =>\n vulnerabilityDefinition.id === activeVulnerability\n );\n this.setState({ description: selectedVulnerability?.description });\n if (selectedVulnerability) {\n manipulateDOM(\n \"__vuln_description__\",\n selectedVulnerability.description\n );\n const selectedLevel = selectedVulnerability.levels.find(\n (level) => level.levelIdentifier === activeLevel\n );\n if (selectedLevel) {\n this.selectedLevel = selectedLevel;\n getResource(\n selectedLevel.resourceInformation.htmlResource.uri,\n this._setLocalState.bind(this),\n false\n );\n }\n }\n }\n }\n }\n\n _setLocalState(\n vulnerabilityDefinitionResponse: VulnerabilityDefinitionResponse\n ) {\n if (vulnerabilityDefinitionResponse.data) {\n manipulateDOM(\"__content__\", vulnerabilityDefinitionResponse.data);\n if (this.selectedLevel) {\n appendStaticResourcesToDocument(this.selectedLevel);\n }\n }\n }\n\n render() {\n const {\n activeVulnerability,\n activeApplication,\n activeLevel,\n activateHomePage,\n activateAboutUsPage,\n showHints,\n } = this.props.globalState;\n const { setGlobalState } = this.props;\n return (\n
\n {activateHomePage ? (\n \n ) : activateAboutUsPage ? (\n \n ) : (\n
\n {activeVulnerability ? (\n
\n \n
\n
\n
\n \n
\n ) : (\n
\n )}\n {activeVulnerability ? (\n
\n \n
\n
\n
\n \n {this.selectedLevel &&\n this.selectedLevel.hints &&\n this.selectedLevel.hints.length > 0 ? (\n \n setGlobalState({\n activeApplication: activeApplication,\n activeVulnerability: activeVulnerability,\n activeLevel: activeLevel,\n activateHomePage: false,\n activateAboutUsPage: false,\n showHints: !showHints,\n })\n }\n >\n
    \n {this.selectedLevel.hints.map((hint) => {\n return
  1. {hint.description}
  2. ;\n })}\n
\n \n ) : (\n
\n )}\n
\n ) : (\n
\n )}\n
\n )}\n
\n );\n }\n}\n","import React from \"react\";\nimport \"./App.css\";\nimport {\n Container as RSuiteContainer,\n Sidebar as RSuitesSidebar,\n} from \"rsuite\";\nimport \"rsuite/dist/styles/rsuite-default.min.css\";\nimport Header from \"./Components/Header\";\nimport LeftNav from \"./Components/LeftNav\";\nimport { GlobalState } from \"./interface/State\";\nimport Footer from \"./Components/Footer\";\nimport { Content } from \"./Components/Content\";\nimport { getResource } from \"./Utilities/Utils\";\nimport { VulnerabilityDefinitionResponse } from \"./interface/GeneralContracts\";\n\nexport default class App extends React.Component {\n state: GlobalState = {\n isSuccessfullyLoaded: false,\n activateAboutUsPage: false,\n activateHomePage: true,\n showHints: false,\n };\n\n _getResourcesInformationsForLevel(levelInformationRes: any) {\n let resourceInformationHtml = {\n isAbsolute:\n levelInformationRes[\"resourceInformation\"][\"htmlResource\"][\n \"isAbsolute\"\n ],\n uri: levelInformationRes[\"resourceInformation\"][\"htmlResource\"][\"uri\"],\n };\n\n let staticResourceInformation = [];\n for (let staticResourceInformationIndexRes in levelInformationRes[\n \"levels\"\n ]) {\n let staticResourceInformationRes =\n levelInformationRes[\"levels\"][staticResourceInformationIndexRes];\n staticResourceInformation.push({\n isAbsolute: staticResourceInformationRes[\"isAbsolute\"],\n uri: staticResourceInformationRes[\"uri\"],\n resourceType: staticResourceInformationRes[\"resourceType\"],\n });\n }\n return {\n resourceInformationHtml: resourceInformationHtml,\n staticResourceInformation: staticResourceInformation,\n };\n }\n\n _getHintsForLevel(levelInformationRes: any) {\n let hints = [];\n for (let hintIndexRes in levelInformationRes[\"hints\"]) {\n let hintRes = levelInformationRes[\"hints\"][hintIndexRes];\n let vulnerabilityTypes = [];\n for (let vulnerabilityTypeIndexRes in hintRes[\"vulnerabilityTypes\"]) {\n vulnerabilityTypes.push({\n identifierType:\n hintRes[\"vulnerabilityTypes\"][vulnerabilityTypeIndexRes][\n \"identifierType\"\n ],\n value:\n hintRes[\"vulnerabilityTypes\"][vulnerabilityTypeIndexRes][\"value\"],\n });\n }\n let hint = {\n description: hintRes[hintIndexRes],\n vulnerabilityTypes: vulnerabilityTypes,\n };\n hints.push(hint);\n }\n return hints;\n }\n\n _getVulnerabilityTypesForLevel(vulnerabilityDefinitionsRes: any) {\n let vulnerabilityTypes = [];\n for (let vulnerabilityTypeIndexRes in vulnerabilityDefinitionsRes[\n \"vulnerabilityTypes\"\n ]) {\n vulnerabilityTypes.push({\n identifierType:\n vulnerabilityDefinitionsRes[\"vulnerabilityTypes\"][\n vulnerabilityTypeIndexRes\n ][\"identifierType\"],\n value:\n vulnerabilityDefinitionsRes[\"vulnerabilityTypes\"][\n vulnerabilityTypeIndexRes\n ][\"value\"],\n });\n }\n return vulnerabilityTypes;\n }\n\n _populateLevelsForVulnerability(\n vulnerabilityDefinitionsRes: any,\n vulnerabilityDefinitionIndexRes: string\n ) {\n let levels = [];\n for (let vulnerabilityLevelIndexRes in vulnerabilityDefinitionsRes[\n vulnerabilityDefinitionIndexRes\n ][\"levels\"]) {\n let levelInformationRes =\n vulnerabilityDefinitionsRes[vulnerabilityDefinitionIndexRes][\"levels\"][\n vulnerabilityLevelIndexRes\n ];\n //Hint population\n let hints = this._getHintsForLevel(levelInformationRes);\n // Resource population\n let resourceInformations =\n this._getResourcesInformationsForLevel(levelInformationRes);\n\n let levelInformation = {\n levelIdentifier: levelInformationRes[\"levelIdentifier\"],\n variant: levelInformationRes[\"variant\"],\n hints: hints,\n resourceInformation: {\n htmlResource: resourceInformations.resourceInformationHtml,\n staticResources: resourceInformations.staticResourceInformation,\n },\n };\n levels.push(levelInformation);\n return levels;\n }\n }\n\n _populateGlobalState(\n vulnerabilityDefinitionResponse: VulnerabilityDefinitionResponse\n ) {\n if (vulnerabilityDefinitionResponse.isSuccessful) {\n if (!vulnerabilityDefinitionResponse.data) {\n return;\n }\n let applicationsDataRes = vulnerabilityDefinitionResponse.data;\n let applicationDataArray = [];\n for (let vulnerableAppRes in applicationsDataRes) {\n let vulnerabilityDefinitionsRes = applicationsDataRes[vulnerableAppRes];\n let vulnerabilityDefinitions = [];\n for (let vulnerabilityDefinitionIndexRes in vulnerabilityDefinitionsRes) {\n let levels = this._populateLevelsForVulnerability(\n vulnerabilityDefinitionsRes,\n vulnerabilityDefinitionIndexRes\n );\n let vulnerabilityTypes = this._getVulnerabilityTypesForLevel(\n vulnerabilityDefinitionIndexRes\n );\n let vulnerabilityDefinition = {\n name: vulnerabilityDefinitionsRes[\"name\"],\n id: vulnerabilityDefinitionsRes[\"id\"],\n description: vulnerabilityDefinitionsRes[\"description\"],\n vulnerabilityTypes: vulnerabilityTypes,\n levels: levels,\n };\n vulnerabilityDefinitions.push(vulnerabilityDefinition);\n }\n applicationDataArray.push({\n applicationName: vulnerableAppRes,\n vulnerabilityDefinitions: vulnerabilityDefinitionsRes,\n });\n }\n this.setState({\n applicationData: applicationDataArray,\n activeApplication:\n applicationDataArray.length >= 1\n ? applicationDataArray[0].applicationName\n : null,\n isSuccessfullyLoaded: true,\n });\n } else {\n console.log(vulnerabilityDefinitionResponse.error);\n }\n }\n\n componentDidMount() {\n getResource(\n \"/VulnerabilityDefinitions\",\n this._populateGlobalState.bind(this),\n true\n );\n }\n\n setGlobalState = (globalState: GlobalState) => {\n this.setState(globalState);\n //Sets the global state such that the vulnerable applications\n //knows the execution context details which can help them write the\n //templates.\n (window as any).globalUtilityState = {\n activeVulnerabilityIdentifier: globalState.activeVulnerability,\n activeVulnerabilityLevelIdentifier: globalState.activeLevel,\n baseURI: window.location.toString(),\n };\n };\n\n render() {\n const copyRightYear = new Date().getFullYear();\n\n return (\n \n \n \n \n \n \n \n \n
Footer
\n \n );\n }\n}\n","import React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport \"./index.css\";\nimport App from \"./App\";\n\nReactDOM.render(\n \n \n ,\n document.getElementById(\"root\")\n);\n"],"sourceRoot":""}