Skip to content

Rule Reference

SEC378lintai-ai-securitypreviewmarkdownwarn

Cursor rule: redundant `globs` with `alwaysApply`

Cursor rule frontmatter should not set `globs` when `alwaysApply` is `true`

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

Redundant `globs` alongside `alwaysApply: true` is deterministic, but the first release stays guidance-only while ecosystem usefulness is measured.

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

SEC378 / CURSOR-ALWAYSAPPLY-GLOBS

SEC378 flags Cursor rule markdown when frontmatter sets alwaysApply: true and also keeps a globs field.

Why It Matters

When a Cursor rule applies globally, path globs no longer narrow its scope. Keeping both fields makes targeting harder to reason about and creates needless config drift in shared rule packs.

Trigger Shape

The rule triggers only when all of these are true:

  • the file is a detected Cursor rule surface
  • frontmatter contains alwaysApply: true
  • frontmatter also contains a globs key

Clean Cases

These stay clean:

  • path-scoped rules with globs and alwaysApply: false
  • global rules with alwaysApply: true and no globs
  • fixture-like examples under test or fixture paths

Example Trigger

md
---
description: Review guidance
globs:
  - "**/*.rs"
alwaysApply: true
---

Safer Example

md
---
description: Review guidance
alwaysApply: true
---

How To Fix

If the rule should apply globally, remove globs. If it should stay path-scoped, switch alwaysApply to false and keep only the intended glob patterns.