fix(exec): match bare * wildcard in allowlist entries#25250
Merged
steipete merged 2 commits intoopenclaw:mainfrom Feb 24, 2026
Merged
fix(exec): match bare * wildcard in allowlist entries#25250steipete merged 2 commits intoopenclaw:mainfrom
steipete merged 2 commits intoopenclaw:mainfrom
Conversation
8717ea4 to
b99d229
Compare
This was referenced Feb 24, 2026
The matchAllowlist() function skipped patterns without path separators (/, \, ~), causing a bare "*" wildcard entry to never reach the glob matcher. Since glob's single * maps to [^/]*, it would also fail against absolute paths. Handle bare "*" as a special case that matches any resolved executable path. Closes openclaw#25082
b99d229 to
15ecd26
Compare
Contributor
|
Landed via temp rebase onto main.
Thanks @widingmarcus-cyber! |
obviyus
pushed a commit
to Glucksberg/OpenClaw
that referenced
this pull request
Feb 24, 2026
margulans
pushed a commit
to margulans/Neiron-AI-assistant
that referenced
this pull request
Feb 25, 2026
Jackson3195
pushed a commit
to Jackson3195/openclaw-with-a-personal-touch
that referenced
this pull request
Feb 25, 2026
kevinWangSheng
pushed a commit
to kevinWangSheng/openclaw
that referenced
this pull request
Feb 26, 2026
kevinWangSheng
pushed a commit
to kevinWangSheng/openclaw
that referenced
this pull request
Feb 26, 2026
brianleach
pushed a commit
to brianleach/openclaw
that referenced
this pull request
Feb 26, 2026
2 tasks
execute008
pushed a commit
to execute008/openclaw
that referenced
this pull request
Feb 27, 2026
r4jiv007
pushed a commit
to r4jiv007/openclaw
that referenced
this pull request
Feb 28, 2026
6 tasks
hughdidit
pushed a commit
to hughdidit/DAISy-Agency
that referenced
this pull request
Mar 1, 2026
…widingmarcus-cyber) (cherry picked from commit 07f653f) # Conflicts: # CHANGELOG.md # src/infra/exec-command-resolution.ts
hughdidit
pushed a commit
to hughdidit/DAISy-Agency
that referenced
this pull request
Mar 3, 2026
…widingmarcus-cyber) (cherry picked from commit 07f653f) # Conflicts: # CHANGELOG.md # src/infra/exec-command-resolution.ts
joelnishanth
pushed a commit
to joelnishanth/openclaw
that referenced
this pull request
Mar 3, 2026
zooqueen
pushed a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #25082.
The
matchAllowlist()function inexec-command-resolution.tsskips any allowlist pattern that does not contain a path separator (/,\, or~). When a user adds a bare*wildcard viaopenclaw approvals allowlist add --gateway "*", the pattern is stored correctly inexec-approvals.jsonbut is silently skipped at runtime, causing every command to fail with "exec denied: allowlist miss".Even if the pattern reached the glob matcher, a single
*maps to the regex[^/]*(matches only within one path segment), so it would still fail against absolute resolved paths like/usr/bin/python3.Root Cause
Fix
Handle bare
*as a special case that matches any resolved executable path, short-circuiting before the path-presence check and glob expansion:Tests Added
matchAllowlistunit tests — bare*matches against/opt/homebrew/bin/rgand/usr/bin/python3evaluateShellAllowlistintegration test — bare*satisfies the full shell allowlist pipeline with a real temp binary on PATHAll 38 existing allowlist tests continue to pass.
Greptile Summary
Added special-case handling for bare
*wildcard inmatchAllowlist()to match any executable path, fixing the issue whereopenclaw approvals allowlist add --gateway "*"stored the pattern but silently skipped it at runtime.*now short-circuits before the path-separator check and glob expansion*would be skipped byhasPathcheck or fail in glob matcher (converts to[^/]*which doesn't match absolute paths)matchAllowlist()with different resolved pathsevaluateShellAllowlist()with a real temp binaryConfidence Score: 5/5
hasPathcheck, (4) all existing tests pass, (5) no security concerns - the feature is intentional and requires explicit user actionLast reviewed commit: 8717ea4