Skip to content

Rule Reference

SEC683lintai-ai-securitystablehookdeny

Hook script: sensitive file exfiltration

Hook script transfers a sensitive credential file to a remote destination

Provider
lintai-ai-security
Surface
hook
Scope
per_file
Tier
stable
Severity
deny
Confidence
high
Detection
structural
Remediation
message_only

Activation Model

Preset Membership

This rule is part of the builtin activation graph through these preset memberships.

Lifecycle

Stable Lifecycle Contract

State

stable_gated

Graduation rationale

Matches explicit transfer of sensitive credential files to remote network or cloud-storage destinations in executable hook lines.

Deterministic signal basis

HookSignals command-line analysis over non-comment hook lines for sensitive file paths such as `.env`, `.aws/credentials`, `.ssh/id_rsa`, or `.kube/config` combined with transfer commands like `scp`, `sftp`, `rsync`, `curl`, `aws s3 cp`, `gsutil cp`, or `rclone copy`.

Malicious corpus
hook-sensitive-file-exfilhook-sensitive-file-rclone-exfil
Benign corpus
cursor-plugin-clean-basic
structured evidence required remediation reviewed
Canonical note

Structural stable rule intended as a high-precision check with deterministic evidence.

Nearby Signals

Related Rules

Why It Matters

Shared hooks should not export local credential files such as SSH keys, cloud credentials, or .env files to remote systems or buckets.

What Triggers

SEC683 matches executable hook lines that pair sensitive file paths like .env, ~/.aws/credentials, ~/.ssh/id_rsa, or ~/.kube/config with transfer commands such as scp, rsync, curl --upload-file, aws s3 cp, or gsutil cp.

False Positives

Some setup scripts move local files between trusted systems, but committed shared hooks should not silently transfer credential-bearing files as part of normal execution.

Remediation

Remove the remote transfer of sensitive credential files from the hook and keep credential material local to the trusted system that owns it.