Trend detection, or trend analysis, examines a metric over time to see whether it increases, decreases, or stays steady. In cybersecurity, it helps teams spot changing incident patterns and prioritize defenses. section 2.3.1 section 2.3
Make a trend useful for security decisions:
- Choose a metric that is relevant to organizational goals and can support actionable decisions. section 3.2.2
- Track it over time and compare the pattern with past performance or a baseline. section 3.2.2
- Use the observed direction to inform priorities, then assess whether security measures need adjustment. section 2.3.1 section 11.1.1
Rising phishing attempts
A year of monthly data shows phishing attempts rising from 23 in January to 90 in December. This increase supports prioritizing stronger email controls and additional employee awareness training. section 2.3.1
Listing 2.1 Using trend analysis to create a simple line plot
import pandas as pd #1
import matplotlib.pyplot as plt #2
# Example dataset: Phishing attempts recorded over 12 months
data = {'Month': ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], #3
'Phishing_Attempts': [23, 25, 30, 35, 40, 45, 50, 60, 7
5, 80, 85, 90]} #3
df = pd.DataFrame(data) #4
# Plotting the trend
plt.figure(figsize=(10, 6)) #5
plt.plot(df['Month'], df['Phishing_Attempts'], marker='o',
linestyle='-', color='blue') #6
plt.title('Monthly Trend of Phishing Attempts') #7
plt.xlabel('Month') #8
plt.ylabel('Number of Phishing Attempts') #9
plt.grid(True) #10
plt.show() #11
The listing uses pandas to hold monthly phishing counts and Matplotlib to plot their trend as a line chart. section 2.3.1
