@@ -148,6 +148,30 @@ db.isSql = True
148
148
db.inScope = False
149
149
db.sourceCode = " model/schema.sql"
150
150
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
+
151
175
my_lambda = Lambda(" cleanDBevery6hours" )
152
176
my_lambda.hasAccessControl = True
153
177
my_lambda.inBoundary = Web_DB
@@ -159,7 +183,7 @@ my_lambda_to_db.dstPort = 3306
159
183
user_to_web = Dataflow(user, web, " User enters comments (*)" )
160
184
user_to_web.protocol = " HTTP"
161
185
user_to_web.dstPort = 80
162
- user_to_web.data = Data( ' Comments in HTML or Markdown ' , classification = Classification. PUBLIC )
186
+ user_to_web.data = comments
163
187
164
188
web_to_user = Dataflow(web, user, " Comments saved (*)" )
165
189
web_to_user.protocol = " HTTP"
@@ -170,10 +194,7 @@ web_to_db.dstPort = 3306
170
194
171
195
db_to_web = Dataflow(db, web, " Comments contents" )
172
196
db_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
177
198
178
199
tm.process()
179
200
0 commit comments