From db8517a7f9ca33bb89630ac22df7689a6ab52beb Mon Sep 17 00:00:00 2001 From: Knut Sveidqvist Date: Wed, 29 Sep 2021 08:52:12 +0200 Subject: [PATCH] Adding xss tests --- cypress/integration/other/xss.spec.js | 9 ++- cypress/platform/xss8.html | 99 +++++++++++++++++++++++++++ cypress/platform/xss9.html | 99 +++++++++++++++++++++++++++ 3 files changed, 205 insertions(+), 2 deletions(-) create mode 100644 cypress/platform/xss8.html create mode 100644 cypress/platform/xss9.html diff --git a/cypress/integration/other/xss.spec.js b/cypress/integration/other/xss.spec.js index ef4878bc4..9a07a7ab2 100644 --- a/cypress/integration/other/xss.spec.js +++ b/cypress/integration/other/xss.spec.js @@ -68,8 +68,13 @@ describe('XSS', () => { cy.wait(1000); cy.get('#the-malware').should('not.exist'); }) - it('should not allow maniplulating antiscript to run javascript using onerror in state diagrams', () => { - cy.visit('http://localhost:9000/xss7.html'); + it('should not allow maniplulating antiscript to run javascript using onerror in state diagrams with dagre wrapper', () => { + cy.visit('http://localhost:9000/xss8.html'); + cy.wait(1000); + cy.get('#the-malware').should('not.exist'); + }) + it('should not allow maniplulating antiscript to run javascript using onerror in state diagrams with dagre d3', () => { + cy.visit('http://localhost:9000/xss9.html'); cy.wait(1000); cy.get('#the-malware').should('not.exist'); }) diff --git a/cypress/platform/xss8.html b/cypress/platform/xss8.html new file mode 100644 index 000000000..e5a3dd417 --- /dev/null +++ b/cypress/platform/xss8.html @@ -0,0 +1,99 @@ + + + + + + + + + +
Security check
+
+
+
+ + + + + diff --git a/cypress/platform/xss9.html b/cypress/platform/xss9.html new file mode 100644 index 000000000..56e70abf8 --- /dev/null +++ b/cypress/platform/xss9.html @@ -0,0 +1,99 @@ + + + + + + + + + +
Security check
+
+
+
+ + + + +