Skip to content

Rule Reference

SEC357lintai-ai-securitypreviewmarkdownwarn

Plugin agent: `hooks` in frontmatter

Plugin agent frontmatter sets `hooks`

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

Plugin agent frontmatter can still include unsupported hook experiments, so the first release stays spec-guidance-only.

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

SEC357 flags plugin agent markdown whose frontmatter sets hooks.

For shared plugin agents, this is a poor place to define hook behavior:

  • it mixes execution wiring into agent content
  • it makes review harder because content and runtime hooks are coupled
  • it conflicts with the plugin-agent boundary documented for Claude plugin agents

What Triggers

This rule applies only to plugin agent markdown surfaces and triggers on parsed frontmatter that contains the exact key:

  • hooks

Example that triggers:

yaml
---
hooks:
  on-save: ./hooks/review.sh
---

Examples that stay clean:

  • plugin agents without hooks in frontmatter
  • fixture-like paths under tests/, fixtures/, examples/, or samples/
  • ordinary SKILL.md content outside plugin-agent surfaces

False Positives

This rule stays Preview because some repos may still experiment with unsupported plugin metadata. The signal is structural policy guidance, not evidence that the hook itself is malicious.

Remediation

Remove hooks from plugin agent frontmatter and keep hook execution in plugin-level hook configuration instead.