@@ -148,6 +148,30 @@ db.isSql = True
148148db.inScope = False
149149db.sourceCode = " model/schema.sql"
150150
151+ comments = Data(
152+ name = " Comments" ,
153+ description = " Comments in HTML or Markdown" ,
154+ classification = Classification.PUBLIC ,
155+ isPII = False ,
156+ isCredentials = False ,
157+ # credentialsLife=Lifetime.LONG,
158+ isStored = True ,
159+ isSourceEncryptedAtRest = False ,
160+ isDestEncryptedAtRest = True
161+ )
162+
163+ results = Data(
164+ name = " results" ,
165+ description = " Results of insert op" ,
166+ classification = Classification.SENSITIVE ,
167+ isPII = False ,
168+ isCredentials = False ,
169+ # credentialsLife=Lifetime.LONG,
170+ isStored = True ,
171+ isSourceEncryptedAtRest = False ,
172+ isDestEncryptedAtRest = True
173+ )
174+
151175my_lambda = Lambda(" cleanDBevery6hours" )
152176my_lambda.hasAccessControl = True
153177my_lambda.inBoundary = Web_DB
@@ -159,7 +183,7 @@ my_lambda_to_db.dstPort = 3306
159183user_to_web = Dataflow(user, web, " User enters comments (*)" )
160184user_to_web.protocol = " HTTP"
161185user_to_web.dstPort = 80
162- user_to_web.data = Data( ' Comments in HTML or Markdown ' , classification = Classification. PUBLIC )
186+ user_to_web.data = comments
163187
164188web_to_user = Dataflow(web, user, " Comments saved (*)" )
165189web_to_user.protocol = " HTTP"
@@ -170,10 +194,7 @@ web_to_db.dstPort = 3306
170194
171195db_to_web = Dataflow(db, web, " Comments contents" )
172196db_to_web.protocol = " MySQL"
173- # this is a BAD way of defining a data object, here for a demo on how it
174- # will appear on the sample report. Use Data objects.
175- db_to_web.data = ' Results of insert op'
176-
197+ db_to_web.data = results
177198
178199tm.process()
179200
0 commit comments