-
Notifications
You must be signed in to change notification settings - Fork 2.6k
feat: allowlist optionally for goosed #1848
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
505b2d6
checkpoint
michaelneale 4450de4
adding allowlisting optionally to goosed
michaelneale f61f4f4
documenting and updating logic
michaelneale 7e97652
special case for goosed for built in commands
michaelneale 88a4fb7
error message
michaelneale 6234422
clearer message for supportablility
michaelneale 4d6b997
nearly working
michaelneale 070877a
tidy up
michaelneale acc0967
removing spaces and using full command
michaelneale 30cdcb5
document and add one more single command test
michaelneale 4209479
Merge branch 'main' into micn/allowlist-goosed
michaelneale File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| # Goose Extension Allowlist | ||
|
|
||
| The allowlist feature provides a security mechanism for controlling which MCP commands can be used by goose. | ||
| By default, goose will let you run any MCP via any command, which isn't always desired. | ||
|
|
||
| ## How It Works | ||
|
|
||
| 1. When enabled, Goose will only allow execution of commands that match entries in the allowlist | ||
| 2. Commands not in the allowlist will be rejected with an error message | ||
| 3. The allowlist is fetched from a URL specified by the `GOOSE_ALLOWLIST` environment variable and cached while running. | ||
|
|
||
| ## Setup | ||
|
|
||
| Set the `GOOSE_ALLOWLIST` environment variable to the URL of your allowlist YAML file: | ||
|
|
||
| ```bash | ||
| export GOOSE_ALLOWLIST=https://example.com/goose-allowlist.yaml | ||
| ``` | ||
|
|
||
| If this environment variable is not set, no allowlist restrictions will be applied (all commands will be allowed). | ||
|
|
||
| ## Allowlist File Format | ||
|
|
||
| The allowlist file should be a YAML file with the following structure: | ||
|
|
||
| ```yaml | ||
| extensions: | ||
| - id: extension-id-1 | ||
| command: command-name-1 | ||
| - id: extension-id-2 | ||
| command: command-name-2 | ||
| ``` | ||
|
|
||
| Example: | ||
|
|
||
| ```yaml | ||
| extensions: | ||
| - id: slack | ||
| command: uvx mcp_slack | ||
| - id: github | ||
| command: uvx mcp_github | ||
| - id: jira | ||
| command: uvx mcp_jira | ||
| ``` | ||
|
|
||
| Note that the command should be the full command to launch the MCP (environment variables are provided for context by goose). Additional arguments will be rejected (to avoid injection attacks) | ||
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how would the env var be passed into goosed? is it going to be built into the app?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, built into app, similar to other ones.