Hub rules-lua

rules-lua

v3 public Verified

Lua

Lua is a powerful, efficient, lightweight, embeddable scripting language. These rules provide safety and best-practice governance for Lua scripting, focusing on secure integration within host applications and preventing common scripting errors.

@sigmashakeinc 2 pulls 6 rules published Apr 8, 2026 synced Nov 22, 2026 sigmashakeinc/rules/rulesets/rules-lua →
Severity
4 error 2 warn 0 info
demo.cast
Lua is a powerful, efficient, lightweight, embeddable scripting language. These rules provide safety and best-practice governance for Lua scripting, focusing on secure integration within host applications and preventing common scripting errors.

Rules index

6 governance rules

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

lua

lua-no-debug-library warning log

The Lua debug library bypasses the sandbox by allowing inspection of locals, upvalues, and call stacks. It enables privilege escalation in sandboxed environments. Remove debug library usage from production code; revoke access to it via sandbox table restrictions.

Rule source requires an active Pro or Enterprise subscription.
lua-no-hardcoded-secret error log

Hardcoded credentials in Lua source are embedded in scripts that may be deployed or logged. Store secrets in environment variables (os.getenv) or a secrets manager, not as string literals.

Rule source requires an active Pro or Enterprise subscription.
lua-no-io-popen error block

io.popen() opens a shell command pipe. Like os.execute(), user-controlled arguments enable command injection (CWE-78). Restrict usage to compile-time constant commands or eliminate in favour of Lua-native operations.

Rule source requires an active Pro or Enterprise subscription.
lua-no-load-string error block

load() and loadstring() compile and execute arbitrary Lua code at runtime (eval equivalent, CWE-95). Any user-controlled string passed to these functions achieves code execution. Replace with a safe data parsing approach (e.g., JSON decode, restricted expression evaluator).

Rule source requires an active Pro or Enterprise subscription.
lua-no-os-execute error block

os.execute() runs arbitrary shell commands. If any argument is derived from user input, this is a command injection vulnerability (CWE-78). Use whitelisted string literals; never interpolate user data into the command string.

Rule source requires an active Pro or Enterprise subscription.
lua-no-require-user-path warning log

Calling require() with a user-controlled or dynamically composed module name enables path traversal and arbitrary module loading (CWE-22). Require only string literals or values from a fixed allowlist.

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
v3
Published
Apr 8, 2026
Source commits
0
Synced
Nov 22, 2026
Hash
e3ea075354cf8833d7c689d1eeedcd71e4c450ec4bd8d02b7da7171986375a92
Signature
Verified (publisher key)
Tested with
claude-code@current
Plan
Starter (free)
Visibility
Public

Source history

Recent commits

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

No commit history available.