def
threat_analysis(data_flow):
threats
=
[]
if
not
is_authorized_access(data_flow):
threats.append(
"Unauthorized access detected."
)
if
is_data_exposed(data_flow):
threats.append(
"Data exposure detected."
)
if
is_data_tampered(data_flow):
threats.append(
"Data tampering detected."
)
return
threats
data_flow
=
{
"source"
:
"Data Collection"
,
"processing"
: [
"Data Storage"
,
"Data Processing"
],
"destination"
:
"Data Analysis"
}
detected_threats
=
threat_analysis(data_flow)
if
detected_threats:
print
(
"Detected threats:"
)
for
threat
in
detected_threats:
print
(threat)
else
:
print
(
"No threats detected."
)