SecurityDetections

Detection Catalogue

Every rule the detection engine ships today, grouped by category

Filesystem

Commands that recursively or broadly delete files or directories.

Rules:

FS001critical

Recursive home directory deletion

Detects rm -rf or equivalent targeting home directory or root filesystem

FS002high

Recursive directory deletion

Detects recursive deletion of directories

FS003warn

Wildcard deletion in sensitive directory

Detects deletion with wildcards in potentially sensitive locations

Database

SQL and migration commands that drop, truncate or wipe tables and data.

Rules:

DB001critical

DROP TABLE or DATABASE

Detects SQL DROP TABLE or DROP DATABASE commands

DB002critical

DELETE without WHERE

Detects DELETE statements without WHERE clause

DB003high

TRUNCATE TABLE

Detects TRUNCATE TABLE commands

DB004high

Dangerous migration reset

Detects migration commands that reset or drop all tables (prisma push --force-reset, drizzle-kit drop)

Cloud infrastructure

Commands that delete cloud or Kubernetes resources.

Rules:

CLOUD001critical

Terraform destroy

Detects terraform destroy commands

CLOUD002critical

AWS resource deletion

Detects AWS CLI commands that delete resources (ec2 terminate, s3 rb, rds delete, etc.)

CLOUD003critical

GCP resource deletion

Detects gcloud commands that delete compute, storage, or database resources

CLOUD004critical

Azure resource deletion

Detects az commands that delete resources

CLOUD005critical

Kubernetes resource deletion

Detects kubectl delete commands on production-like resources

Production targeting

Database connections and cloud or Kubernetes commands aimed at production.

Rules:

PROD001high

Production database connection

Detects database connections to production hosts (non-localhost, containing 'prod')

PROD002high

Production cloud context

Detects cloud commands targeting production accounts or regions

PROD003high

Production Kubernetes context

Detects kubectl commands with production context names

Secrets

Credential files that are read, staged or sent over the network.

Rules:

SECRET001high

Secret file access followed by network egress

Detects reading of credential files followed by network operations within a short window

SECRET002high

Credential file staging

Detects copying or staging of credential files to /tmp or other staging locations

SECRET003high

Secret exfiltration via network tools

Detects curl/wget/scp/ssh uploading or sending secret files or secret-like values to remote hosts

Git

Force pushes, hard resets and branch deletion.

Rules:

GIT001high

Force push to main branch

Detects git push --force to main, master, or production branches

GIT002warn

Hard reset of branch

Detects git reset --hard which discards uncommitted changes

GIT003warn

Branch deletion

Detects deletion of git branches

Safety checks

Flags and settings that bypass permission prompts, git hooks, tests or file permissions.

Rules:

SAFETY001high

AI CLI permission bypass flags

Detects AI CLI tools invoked with permission bypass flags (--dangerously-skip-permissions, --yolo, --trust-all-tools)

SAFETY002warn

Git hooks bypass

Detects git operations with --no-verify flag

SAFETY003warn

Test skip or disable

Detects commands that skip tests or set test environment variables to disable test suites

SAFETY004high

Dangerous file permissions

Detects chmod 777 or equivalent overly permissive settings

Risky installs

Piped remote scripts and package names that look like typosquats.

Rules:

INSTALL001high

Curl pipe to shell

Detects curl|sh, wget|bash, and similar piped execution patterns

INSTALL002info

Suspicious package name

Detects npm/pip/gem install of packages with typosquat-like patterns (multiple hyphens, l33tspeak, common typos)

Prompt injection

Instructions in fetched content or tool output that try to steer the agent.

Rules:

INJECT001high

Prompt injection in fetched content

Detects fetched content (web, issue, file) containing agent-override instructions

INJECT002warn

Hidden instructions in tool output

Detects tool output containing instructions formatted to look like system messages

Multi-step

Several events in one session that together match an attack pattern.

Rules:

MULTI001critical

Injection followed by sensitive read and network egress

Detects three-step sequence: injection content, then sensitive file access, then network upload

Generated from apps/local-agent/src/guard/rules.ts in agentreel/agent at commit ecdc9ba42eca8456a0b435b0d27f312853cc15fb. See that file for each rule's full definition.