Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions tools/approval.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,15 @@ def get_current_session_key(default: str = "default") -> str:
# a script is first made executable then immediately run. The script
# content may contain dangerous commands that individual patterns miss.
(r'\bchmod\s+\+x\b.*[;&|]+\s*\./', "chmod +x followed by immediate execution"),
# Data exfiltration vectors
(r'\b(nc|ncat|socat)\b.*\d+\.\d+\.\d+\.\d+', "netcat to external IP"),
(r'/dev/tcp/', "bash /dev/tcp exfiltration"),
(r'/dev/udp/', "bash /dev/udp exfiltration"),
(r'\bopenssl\s+s_client\s+-connect\b', "openssl outbound connection"),
(r'\bcurl\b.*(-d|--data|--data-binary|--data-urlencode|--upload-file)\b', "curl with data upload"),
(r'\bwget\b.*(--post-data|--post-file)\b', "wget with data upload"),
# Credential file reads via common tools
(r'\b(cat|head|tail|less|more|bat)\b.*(\.ssh/|aws/credentials|\.env|\.netrc|\.gnupg/|\.kube/config)', "read credential file"),
]


Expand Down
Loading