예제 #1
0
 def test_HA04(self):
     EE = ExternalEntity("ee")
     EE.hasPhysicalAccess = True
     ThreatObj = Threat(
         next(item for item in threats_json if item["SID"] == "HA04"))
     self.assertTrue(ThreatObj.apply(EE))
예제 #2
0
 def test_HA04(self):
     EE = ExternalEntity("ee")
     EE.hasPhysicalAccess = True
     threat = threats["HA04"]
     self.assertTrue(threat.apply(EE))
예제 #3
0
# https://github.com/izar/pytm
from pytm import (TM, Server, Dataflow, Boundary, Actor, ExternalEntity,
                  Process)

payment_online = TM("stripe")
payment_online.description = "stripe payment"
payment_online.isOrdered = True
payment_online.mergeResponses = True

Customer_Client_Web = Boundary("Customer/Internet")
Merchant_Web = Boundary("Merchant/Web")
Stripe_API = Boundary("Stripe/Web")

customer = Actor("Customer")

customer_client = ExternalEntity("Customer Client")
customer_client.inBoundary = Customer_Client_Web
# user.levels = [2]

merchant_web = Server("Merchant Web Server")
merchant_web.inBoundary = Merchant_Web
merchant_web.OS = "Ubuntu"
merchant_web.isHardened = True
merchant_web.onAWS = True
# web.levels = [2]

stripe_api = ExternalEntity("Stripe API service")
stripe_api.inBoundary = Stripe_API
stripe_api.onAWS = False

stripe_process = Process("Stripe Payment Service")