Skip to content
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

Documentation for whitelisting modules #40

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ function sidebar() {
{ text: 'External Libraries', link: '/scripting/external-libraries' },
{ text: 'Sync Requests', link: '/scripting/sync-requests' },
{ text: 'JavaScript Reference', link: '/scripting/javascript-reference' },
{ text: 'Whitelisting Modules', link: '/scripting/whitelisting-modules' },
]
},
{
Expand Down
21 changes: 21 additions & 0 deletions docs/scripting/whitelisting-modules.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Whitelisting Modules

Not all built-in modules are accessible in scripts out of the box in Bruno for security reasons. You can manually enable/whitelist these modules by modifying your `bruno.json`.

**Example:**

To enable the `child_process` module, you can put the following in your `bruno.json` file:

```json
{
"scripts": {
"moduleWhitelist": ["child_process"],
"filesystemAccess": {
"allow": true
}
}
}
```

Note that `filesystemAccess` is required for `child_process` to work as expected. This may be required for other built-in modules as well

1 change: 1 addition & 0 deletions docs/table-of-contents.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
- [External Libraries](/scripting/external-libraries)
- [Sync Requests](/scripting/sync-requests)
- [JavaScript Reference](/scripting/javascript-reference)
- [Whitelisting Modules](/scripting/whitelisting-modules)

## Testing

Expand Down