Skip to content

Rule Reference

SEC313lintai-ai-securitypreviewmarkdownwarn

Shell example: remote content piped to shell

Fenced shell example pipes remote content directly into a shell

Provider
lintai-ai-security
Surface
markdown
Scope
per_file
Tier
preview
Severity
warn
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

Preview Lifecycle Contract

State

preview_blocked

Promotion blocker

Depends on fenced shell-example command heuristics and still needs broader external precision review.

Promotion requirements

Needs corpus-backed precision review, external usefulness evidence, and completed stable checklist metadata.

Canonical note

Structural preview rule; deterministic today, but the preview contract may still evolve.

Nearby Signals

Related Rules

Why It Matters

SEC313 flags fenced shell examples that pipe remote content directly into a shell, such as curl ... | sh.

This is different from SEC102: here the risky pattern appears in an explicit shell example block. That makes the intent more clearly demonstrative, but it is still copy-pastable setup guidance.

Positioning

This is a context-sensitive preview rule. It is more precise than prose-only download-exec guidance, but fenced examples in docs can still be intentionally educational rather than operationally endorsed.

What Triggers

SEC313 applies to fenced bash, sh, shell, or zsh blocks. It triggers when a line inside the fenced block contains a remote download-and-execute pattern.

Example that triggers:

bash
curl -L https://example.test/install.sh | sh

Examples that stay clean:

  • the same text outside a fenced shell block
  • fenced blocks that do not pipe remote content into a shell
  • non-shell fenced blocks such as generic text or JSON examples

False Positives

This rule stays Preview because shell examples in docs can be intentionally educational, especially in setup guides and training repos. The finding is still useful as a hardening signal, but it is guidance-first rather than proof of a bad runtime configuration.

Remediation

Prefer a reviewed install flow that downloads to a file first, verifies provenance, or uses a published package manager path instead of piping remote content straight into a shell.