Hub rules-llama-4

rules-llama-4

v2 public Verified

Llama-4

Llama 4 is Meta's next-generation large language model. These rules protect against architectural footguns like context poisoning and privilege escalation introduced by massive context windows and Mixture-of-Experts (MoE) routing.

@sigmashakeinc 2 pulls 7 rules published Apr 8, 2026 synced Nov 22, 2026 sigmashakeinc/rules/rulesets/rules-llama-4 →
Severity
6 error 1 warn 0 info
demo.cast
Llama 4 is Meta's next-generation large language model. These rules protect against architectural footguns like context poisoning and privilege escalation introduced by massive context windows and Mixture-of-Experts (MoE) routing.

Rules index

7 governance rules

Indexed from the repository's .rules files, grouped by technology. Expand any rule to read the raw source.

llama-4

ask-llama4-behemoth-unauthorized-commit error ask

Llama 4 Behemoth (2T): High-stakes destructive operations require HITL to prevent excessive agency drift during execution.

Rule source requires an active Pro or Enterprise subscription.
ask-llama4-maverick-action-chain error ask

Llama 4 Maverick (400B): Action chaining (file reads piped to raw sockets) requires explicit approval.

Rule source requires an active Pro or Enterprise subscription.
block-llama4-scout-context-poisoning error block

Llama 4 Scout (10M Context): Webmail access and cookie extraction are blocked to prevent long-context data-as-instructions poisoning.

Rule source requires an active Pro or Enterprise subscription.
llama4-no-eval-of-model-output error block

eval()/exec() on Llama 4 model output executes LLM-generated code directly. A prompt-injection or jailbreak can achieve arbitrary code execution on the host. Parse model output as structured data (JSON schema) and validate before acting on it.

Rule source requires an active Pro or Enterprise subscription.
llama4-no-hardcoded-api-key error block

Hardcoded API key for a hosted Llama 4 provider (Together.ai, Groq, Replicate, etc.) detected. Keys in source are exposed via version control and logs. Use environment variables or a secrets manager.

Rule source requires an active Pro or Enterprise subscription.
llama4-no-tool-call-without-validation warning log

Llama 4 tool calls are dispatched based on LLM output. Without validating tool names and parameters against an allowlist before execution, a prompt-injection attack can trigger arbitrary tools. Validate tool_call.function.name against a fixed allowlist and validate arguments with a JSON schema before executing.

Rule source requires an active Pro or Enterprise subscription.
llama4-no-user-input-in-system-message error log

User-controlled input in the Llama 4 system message enables prompt injection — an attacker can override the agent's behavior. Keep the system message static and pass user data only in the user-role message.

Rule source requires an active Pro or Enterprise subscription.

Version metadata

Published metadata

The hash-locked record of this published ruleset. When source contents change, the maintainer resyncs and the version bumps.

Version
v2
Published
Apr 8, 2026
Source commits
0
Synced
Nov 22, 2026
Hash
74eeb10004072027cd582eb671d9531d8ef8c40d7d6fad33c96d5a9c2fe08caf
Signature
Verified (publisher key)
Tested with
claude-code@current
Plan
Starter (free)
Visibility
Public

Source history

Recent commits

Latest commits touching rulesets/rules-llama-4/.sigmashake/rules in sigmashakeinc/rules/rulesets/rules-llama-4. The published version only bumps when a maintainer resyncs.

No commit history available.