Skip to content

Commit 90788b9

Browse files
committed
Add fileless execution and promotion trust planes
1 parent 19d07c2 commit 90788b9

14 files changed

Lines changed: 962 additions & 6 deletions

File tree

.claude-plugin/marketplace.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
{
1212
"name": "runwall",
1313
"description": "Balanced default runtime security plugin for Claude Code with shell, git, MCP, secret, exfiltration, and inline gateway guardrails.",
14-
"version": "10.0.0",
14+
"version": "11.0.0",
1515
"source": "./"
1616
}
1717
]

.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "runwall",
33
"description": "Runtime security plugin for Claude Code with balanced default hooks plus the Runwall inline MCP gateway for shell, git, MCP, secret, and exfiltration risks.",
4-
"version": "10.0.0",
4+
"version": "11.0.0",
55
"author": {
66
"name": "efij"
77
},

.codex-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "runwall",
33
"description": "Runtime security plugin bundle for Codex with the Runwall inline MCP gateway, policy tools, skills, and safer defaults for coding-agent workflows.",
4-
"version": "10.0.0",
4+
"version": "11.0.0",
55
"author": {
66
"name": "efij"
77
},

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Changelog
22

3+
## 11.0.0
4+
5+
- added a `Fileless / Inline Execution Trust Plane` with native protections for `inline-fetch-exec-guard`, `inline-encoded-loader-guard`, `inline-process-substitution-guard`, `inline-heredoc-dropper-guard`, `inline-eval-secret-guard`, `inline-env-payload-guard`, `inline-python-loader-guard`, `inline-node-loader-guard`, `inline-shell-persistence-guard`, and `inline-policy-bypass-guard`
6+
- added a `Remote Content Promotion Trust Plane` with native protections for `remote-to-memory-promotion-guard`, `remote-to-knowledge-promotion-guard`, `remote-to-hook-promotion-guard`, `remote-to-policy-promotion-guard`, `remote-to-script-promotion-guard`, `remote-to-agent-doc-promotion-guard`, `raw-host-promotion-guard`, `paste-to-trusted-surface-guard`, and `promotion-quarantine-bypass-guard`
7+
- added new CLI surfaces: `runwall exec` and `runwall promotion`
8+
- extended policy evaluation, pretty output, and audit emission so inline-exec and promotion identities show up beside the other trust planes
9+
- expanded smoke coverage for inline fetch-and-exec blocking, encoded loaders, safe inline one-liners, remote content promotion into memory and policy surfaces, quarantine enforcement, and trusted-surface promotion inspection
10+
- updated the README, guard registry, signature deep dive, plugin metadata, gateway versioning, and release surface for the `11.0.0` trust-plane upgrade
11+
312
## 10.0.0
413

514
- added an `Approval Integrity Plane` so risky exceptions are no longer treated like permanent bypasses, with native protections for `approval-broad-scope-guard`, `approval-expiry-guard`, `approval-runtime-mismatch-guard`, `approval-repo-mismatch-guard`, `approval-parent-child-mismatch-guard`, `approval-scope-mismatch-guard`, `approval-drift-invalidation-guard`, `approval-destination-drift-guard`, `approval-tool-identity-drift-guard`, `approval-replay-guard`, and `approval-unbounded-lifetime-guard`

GUARDS.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,30 @@ These protections are implemented directly in the Safety-Control Trust Plane ins
134134
- `release-safety-check-disable-guard`: blocks disabling SBOM, provenance, attestation, signing, or release verification steps
135135
- `recovery-script-destroy-guard`: blocks deletion, truncation, or de-executable changes against backup, restore, rollback, and recovery scripts
136136

137+
## Built-In Fileless and Promotion Guards
138+
139+
These protections are implemented directly in native Runwall trust planes instead of standalone hook modules:
140+
141+
- `inline-fetch-exec-guard`: blocks remote fetch-and-execute chains hidden inside inline shell or interpreter execution
142+
- `inline-encoded-loader-guard`: blocks encoded loader and decode-and-run behavior inside inline shells, Python, Node, and PowerShell
143+
- `inline-process-substitution-guard`: blocks process-substitution chains that source or execute fetched content
144+
- `inline-heredoc-dropper-guard`: blocks heredoc execution that stages loaders, exfiltration, or persistence
145+
- `inline-eval-secret-guard`: blocks inline `eval` and `source` chains that combine secret access with loaders or outbound behavior
146+
- `inline-env-payload-guard`: blocks inline execution driven by hidden environment payload variables
147+
- `inline-python-loader-guard`: blocks risky `python -c` loader behavior with fetch, exec, secret, or outbound primitives
148+
- `inline-node-loader-guard`: blocks risky `node -e` loader behavior with fetch, exec, secret, or outbound primitives
149+
- `inline-shell-persistence-guard`: blocks inline execution that edits login, scheduler, or persistence surfaces
150+
- `inline-policy-bypass-guard`: blocks inline execution that tries to disable Runwall or step around local review boundaries
151+
- `remote-to-memory-promotion-guard`: blocks remote content promotion into persistent memory surfaces
152+
- `remote-to-knowledge-promotion-guard`: blocks remote content promotion into knowledge, vault, and RAG surfaces
153+
- `remote-to-hook-promotion-guard`: blocks remote content promotion into hook-bearing surfaces
154+
- `remote-to-policy-promotion-guard`: blocks remote content promotion into policy, settings, and plugin control surfaces
155+
- `remote-to-script-promotion-guard`: blocks remote content promotion into scripts, workflow files, and executable bins
156+
- `remote-to-agent-doc-promotion-guard`: blocks remote content promotion into `CLAUDE.md`, `AGENTS.md`, and similar agent instruction files
157+
- `raw-host-promotion-guard`: blocks promotion of content from raw file hosts and paste sites into trusted local authority surfaces
158+
- `paste-to-trusted-surface-guard`: prompts before pasted external content is promoted into a trusted surface
159+
- `promotion-quarantine-bypass-guard`: blocks reads or writes against promoted sources that were explicitly quarantined
160+
137161
## Implemented Guards
138162

139163
### Secrets & Identity

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,8 @@ Runwall now adds four more native trust planes on top of tools and hooks:
169169
- `SaaS Action Trust`: prompts or blocks only on high-risk authenticated control-plane actions such as token minting, secret admin, role grants, prod deploys, webhook changes, and destructive deletes
170170
- `Approval Integrity`: narrows risky exceptions so one-shot approvals cannot be replayed, approvals do not drift silently across runtimes or repos, and broad wildcard approvals are surfaced before they turn into policy bypass
171171
- `Safety-Control Trust`: protects the things attackers disable first: audit trails, rollback scripts, backups, monitoring, alert sinks, incident bundles, and release safety checks
172+
- `Fileless / Inline Execution Trust`: blocks remote fetch-and-exec, encoded loaders, env-driven payloads, inline persistence, and policy-bypass chains that try to avoid leaving a normal executable on disk
173+
- `Remote Content Promotion Trust`: blocks remote or pasted content from being promoted directly into trusted memory, knowledge, hook, policy, script, and agent-instruction surfaces
172174

173175
Runwall also now has scoped approvals so these planes stay usable without turning the default policy into mush:
174176

@@ -202,11 +204,20 @@ Runwall also now has scoped approvals so these planes stay usable without turnin
202204
./bin/runwall memory quarantine <path>
203205
./bin/runwall memory diff <path>
204206

207+
./bin/runwall exec list --json
208+
./bin/runwall exec explain <event-id-or-module>
209+
./bin/runwall exec policy --json
210+
205211
./bin/runwall knowledge list --json
206212
./bin/runwall knowledge trust <path>
207213
./bin/runwall knowledge quarantine <path>
208214
./bin/runwall knowledge diff <path>
209215

216+
./bin/runwall promotion list --json
217+
./bin/runwall promotion trust <path>
218+
./bin/runwall promotion quarantine <path>
219+
./bin/runwall promotion diff <path>
220+
210221
./bin/runwall apps list --json
211222
./bin/runwall apps explain <event-id>
212223
./bin/runwall apps policy --json
@@ -261,6 +272,16 @@ High-signal built-ins in these planes now include:
261272
- `app-webhook-admin-guard`
262273
- `app-member-invite-guard`
263274
- `app-admin-browser-mutation-guard`
275+
- `inline-fetch-exec-guard`
276+
- `inline-encoded-loader-guard`
277+
- `inline-env-payload-guard`
278+
- `inline-policy-bypass-guard`
279+
- `remote-to-memory-promotion-guard`
280+
- `remote-to-knowledge-promotion-guard`
281+
- `remote-to-hook-promotion-guard`
282+
- `remote-to-policy-promotion-guard`
283+
- `remote-to-script-promotion-guard`
284+
- `raw-host-promotion-guard`
264285

265286
## Protection Families
266287

@@ -276,6 +297,8 @@ Runwall now groups signatures into stable families so the product reads like a r
276297
- `Quality & Workflow`: workflow integrity, context policy, test suppression, and destructive cleanup
277298
- `Memory & Knowledge`: persistent memory, imported notes, vaults, RAG caches, and mirrored knowledge surfaces
278299
- `SaaS & Control Planes`: authenticated control-plane actions against GitHub, Vercel, Stripe, Supabase, cloud consoles, and similar admin surfaces
300+
- `Fileless & Inline Execution`: inline shells, interpreter one-liners, process substitution, heredoc loaders, and other fileless execution shapes
301+
- `Remote Content Promotion`: remote or pasted content being promoted into trusted local authority surfaces such as memory, hooks, policy, scripts, and agent docs
279302

280303
You can inspect the active registry by family with:
281304

SIGNATURES.md

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -681,6 +681,143 @@ These are native Runwall trust-plane protections for audit trails, rollback path
681681
- Why it matters: once recovery scripts are gone, the window for safe rollback closes quickly.
682682
- Action: block
683683

684+
## Built-In Fileless and Promotion Guards
685+
686+
These are native Runwall trust-plane protections for fileless execution shapes and remote content promotion into trusted local authority surfaces.
687+
688+
### inline-fetch-exec-guard
689+
690+
- Purpose: stop remote fetch-and-execute chains hidden inside inline execution.
691+
- Detects: `bash -c`, `python -c`, `node -e`, or process-substitution chains that fetch remote content and execute it directly.
692+
- Why it matters: this is the cleanest way to bypass executable identity because nothing stable has to land on disk first.
693+
- Action: block
694+
695+
### inline-encoded-loader-guard
696+
697+
- Purpose: stop decode-and-run behavior in inline execution.
698+
- Detects: base64, PowerShell `-enc`, OpenSSL, GPG, or similar decode paths combined with inline interpreters or heredocs.
699+
- Why it matters: encoded loader chains are strongly attackerish and make review much harder.
700+
- Action: block
701+
702+
### inline-process-substitution-guard
703+
704+
- Purpose: stop sourcing fetched content through process substitution.
705+
- Detects: `<(...)` execution patterns that wrap fetch-and-exec or remote-content evaluation.
706+
- Why it matters: process substitution is a neat way to hide fetch-and-run behavior without creating a file.
707+
- Action: block
708+
709+
### inline-heredoc-dropper-guard
710+
711+
- Purpose: stop heredoc bodies that act like droppers or exfiltration helpers.
712+
- Detects: heredocs that include fetch, upload, persistence, or executable staging behavior.
713+
- Why it matters: heredocs are common in legitimate dev work, so Runwall only blocks the ones that clearly act like staged payloads.
714+
- Action: block
715+
716+
### inline-eval-secret-guard
717+
718+
- Purpose: stop inline `eval` or `source` chains that combine secret access with loader or outbound behavior.
719+
- Detects: `eval`, `source`, or `.` combined with secret-bearing paths and upload or fetch primitives.
720+
- Why it matters: this is a compact way to turn secret-bearing local content into executable or exfiltrated runtime behavior.
721+
- Action: block
722+
723+
### inline-env-payload-guard
724+
725+
- Purpose: stop inline execution driven by hidden environment payloads.
726+
- Detects: payload variables like `PAYLOAD`, `CODE`, `SCRIPT`, or `DATA` being executed through shell or interpreter one-liners.
727+
- Why it matters: env-based loaders hide the real code away from the visible command line.
728+
- Action: block
729+
730+
### inline-python-loader-guard
731+
732+
- Purpose: stop risky `python -c` loader behavior.
733+
- Detects: `python -c` chains that fetch, decode, `exec`, or immediately touch secret or outbound primitives.
734+
- Why it matters: inline Python is legitimate in moderation, but loader-style Python one-liners are a common bypass path.
735+
- Action: block
736+
737+
### inline-node-loader-guard
738+
739+
- Purpose: stop risky `node -e` loader behavior.
740+
- Detects: `node -e` chains that fetch, `eval`, spawn child processes, decode blobs, or touch secret or outbound primitives.
741+
- Why it matters: inline JavaScript can impersonate a harmless tool invocation while actually acting like a loader.
742+
- Action: block
743+
744+
### inline-shell-persistence-guard
745+
746+
- Purpose: stop inline execution from creating persistence.
747+
- Detects: inline shells or interpreters that write shell profiles, schedulers, login items, or SSH startup surfaces.
748+
- Why it matters: one-line persistence is quiet, effective, and rarely needed in normal runtime workflows.
749+
- Action: block
750+
751+
### inline-policy-bypass-guard
752+
753+
- Purpose: stop inline execution that disables Runwall or review boundaries.
754+
- Detects: `HUSKY=0`, `--no-verify`, `ignore runwall`, `disable runwall`, or similar bypass phrasing inside inline execution.
755+
- Why it matters: if the runtime can hide policy bypass inside one-liners, it can step around a lot of other protections.
756+
- Action: block
757+
758+
### remote-to-memory-promotion-guard
759+
760+
- Purpose: stop remote content from becoming persistent memory in one step.
761+
- Detects: URLs, raw hosts, or pasted external content written directly into memory surfaces.
762+
- Why it matters: long-lived memory becomes a hidden policy plane once external content is allowed to land there unreviewed.
763+
- Action: block
764+
765+
### remote-to-knowledge-promotion-guard
766+
767+
- Purpose: stop remote content promotion into knowledge, vault, and RAG surfaces.
768+
- Detects: direct writes from remote or mirrored sources into knowledge caches, vaults, and imported note stores.
769+
- Why it matters: poisoned knowledge often returns later looking trusted because it already sits in a “documentation” surface.
770+
- Action: block
771+
772+
### remote-to-hook-promotion-guard
773+
774+
- Purpose: stop remote content promotion into hook-bearing surfaces.
775+
- Detects: fetched or pasted content being written into git hooks, plugin hook manifests, or similar triggerable hook surfaces.
776+
- Why it matters: this turns remote text into executable behavior with almost no review boundary.
777+
- Action: block
778+
779+
### remote-to-policy-promotion-guard
780+
781+
- Purpose: stop remote content promotion into policy and config surfaces.
782+
- Detects: fetched or pasted content being written into `.mcp.json`, plugin manifests, Runwall config, settings, or similar control files.
783+
- Why it matters: remote content should not get to redefine trust boundaries in one write.
784+
- Action: block
785+
786+
### remote-to-script-promotion-guard
787+
788+
- Purpose: stop remote content promotion into scripts and workflows.
789+
- Detects: fetched or pasted content being written into `bin/`, `scripts/`, hook scripts, or CI workflow files.
790+
- Why it matters: it is a direct supply-chain bridge from remote content to executable local behavior.
791+
- Action: block
792+
793+
### remote-to-agent-doc-promotion-guard
794+
795+
- Purpose: stop remote content promotion into agent instruction files.
796+
- Detects: fetched or pasted content being written into `CLAUDE.md`, `AGENTS.md`, or similar agent-control docs.
797+
- Why it matters: agent docs are part of the local trust boundary, so remote content should not become first-class instructions automatically.
798+
- Action: block
799+
800+
### raw-host-promotion-guard
801+
802+
- Purpose: stop promotion from raw file hosts and paste sites.
803+
- Detects: raw GitHub content hosts, gist raw endpoints, paste sites, and similar hosts being written into trusted local authority surfaces.
804+
- Why it matters: raw hosts are a common delivery vehicle for quick malicious content promotion.
805+
- Action: block
806+
807+
### paste-to-trusted-surface-guard
808+
809+
- Purpose: require review before pasted external content becomes trusted local authority.
810+
- Detects: “paste this exactly,” “mirror this output,” and similar language when writing to trusted memory, knowledge, hook, policy, or instruction surfaces.
811+
- Why it matters: some abuse paths rely on socially engineered copy-paste rather than obvious remote URLs.
812+
- Action: prompt
813+
814+
### promotion-quarantine-bypass-guard
815+
816+
- Purpose: stop reads or edits of promoted sources that were already quarantined.
817+
- Detects: access to promotion-tracked surfaces that were explicitly marked quarantined in the local store.
818+
- Why it matters: quarantine only works if the runtime cannot keep consuming the poisoned source anyway.
819+
- Action: block
820+
684821
## Secrets & Identity
685822

686823
Guards that keep tokens, sessions, credential stores, and delegated identity flows from quietly widening access or leaking off the box.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
10.0.0
1+
11.0.0

bin/shield

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -666,6 +666,19 @@ tools_cmd() {
666666
esac
667667
}
668668

669+
exec_cmd() {
670+
local subcommand="${1:-list}"
671+
shift || true
672+
case "$subcommand" in
673+
list|explain|policy)
674+
run_python "$ROOT_DIR/scripts/runwall_exec.py" --root "$ROOT_DIR" "$subcommand" "$@"
675+
;;
676+
*)
677+
fail "unknown exec subcommand: $subcommand"
678+
;;
679+
esac
680+
}
681+
669682
hooks_cmd() {
670683
local subcommand="${1:-list}"
671684
shift || true
@@ -688,6 +701,19 @@ hooks_cmd() {
688701
esac
689702
}
690703

704+
promotion_cmd() {
705+
local subcommand="${1:-list}"
706+
shift || true
707+
case "$subcommand" in
708+
list|trust|quarantine|forget|diff)
709+
run_python "$ROOT_DIR/scripts/runwall_promotion.py" --root "$ROOT_DIR" "$subcommand" "$@"
710+
;;
711+
*)
712+
fail "unknown promotion subcommand: $subcommand"
713+
;;
714+
esac
715+
}
716+
691717
approvals_cmd() {
692718
local subcommand="${1:-list}"
693719
shift || true
@@ -1221,10 +1247,18 @@ Usage:
12211247
bin/runwall tools list [--json]
12221248
bin/runwall tools approve <name-or-path>
12231249
bin/runwall tools forget <name-or-path>
1250+
bin/runwall exec list [--json]
1251+
bin/runwall exec explain <event-id-or-module>
1252+
bin/runwall exec policy [--json]
12241253
bin/runwall hooks list [--json]
12251254
bin/runwall hooks approve <path-or-key>
12261255
bin/runwall hooks forget <path-or-key>
12271256
bin/runwall hooks diff <path-or-key>
1257+
bin/runwall promotion list [--json]
1258+
bin/runwall promotion trust <path>
1259+
bin/runwall promotion quarantine <path>
1260+
bin/runwall promotion forget <path>
1261+
bin/runwall promotion diff <path>
12281262
bin/runwall approvals list [--json]
12291263
bin/runwall approvals create --kind K --target T --value V [--runtime name] [--agent-id id] [--once] [--ttl-hours H]
12301264
bin/runwall approvals revoke <id-or-value>
@@ -1399,10 +1433,18 @@ case "$command" in
13991433
shift
14001434
tools_cmd "$@"
14011435
;;
1436+
exec)
1437+
shift
1438+
exec_cmd "$@"
1439+
;;
14021440
hooks)
14031441
shift
14041442
hooks_cmd "$@"
14051443
;;
1444+
promotion)
1445+
shift
1446+
promotion_cmd "$@"
1447+
;;
14061448
approvals)
14071449
shift
14081450
approvals_cmd "$@"

0 commit comments

Comments
 (0)