You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
name: "Attachment: Web files with suspicious comments"
2
+
description: "Detects HTML or SVG files under 100KB that contain duplicate or padding text in the form of literary quotes or common sayings within code comments."
3
+
type: "rule"
4
+
severity: "high"
5
+
source: |
6
+
type.inbound
7
+
and any(attachments,
8
+
(
9
+
(
10
+
.file_type in ("html", "svg")
11
+
or .file_extension in ("html", "xhtml", "mhtml", "svg")
12
+
or .content_type in ("text/html", "text/plain")
13
+
)
14
+
and .size < 100000
15
+
)
16
+
and (
17
+
(
18
+
// targeting comments that pad the file with quotes from literature
19
+
// examples: "// Echoes of the past linger in silence.", "// The wind whispered secrets unknown.", "// Shadows tell stories in the dark."
20
+
21
+
// count all HTML code comments that match our pattern
// targeting comments that pad the file with sayings
35
+
// examples: "<!-- <span> No gain without pain. </span> -->", "<!-- <p> Beauty is only skin deep. </p> -->", "<!-- <span> Actions speak louder than words. </span> -->"
0 commit comments