Пример #1
0
 def test_AC04(self):
     user = Actor("User")
     web = Server("Web Server")
     user_to_web = Dataflow(user, web, "User enters comments (*)")
     user_to_web.data = "XML"
     user_to_web.authorizesSource = False
     threat = threats["AC04"]
     self.assertTrue(threat.apply(user_to_web))
Пример #2
0
 def test_AC04(self):
     user = Actor("User")
     web = Server("Web Server")  
     user_to_web = Dataflow(user, web, "User enters comments (*)")
     user_to_web.data = 'XML' 
     user_to_web.authorizesSource = False
     ThreatObj = Threat(next(item for item in threats_json if item["SID"] == "AC04"))
     self.assertTrue(ThreatObj.apply(user_to_web))
Пример #3
0
 def test_AC04(self):
     user = Actor("User")
     web = Server("Web Server")
     user_to_web = Dataflow(user, web, "User enters comments (*)")
     xml = Data(name="user to web data", description="textual", format="XML")
     user_to_web.data = xml
     user_to_web.authorizesSource = False
     threat = threats["AC04"]
     self.assertTrue(threat.apply(user_to_web))
Пример #4
0
 def test_CR06(self):
     user = Actor("User")
     web = Server("Web Server")
     user_to_web = Dataflow(user, web, "User enters comments (*)")
     user_to_web.protocol = "HTTP"
     user_to_web.usesVPN = False
     user_to_web.implementsAuthenticationScheme = False
     user_to_web.authorizesSource = False
     threat = threats["CR06"]
     self.assertTrue(threat.apply(user_to_web))
Пример #5
0
 def test_CR06(self):
     user = Actor("User")
     web = Server("Web Server")
     user_to_web = Dataflow(user, web, "User enters comments (*)")
     user_to_web.protocol = 'HTTP'
     user_to_web.usesVPN = False
     user_to_web.implementsAuthenticationScheme = False
     user_to_web.authorizesSource = False
     ThreatObj = Threat(
         next(item for item in threats_json if item["SID"] == "CR06"))
     self.assertTrue(ThreatObj.apply(user_to_web))