Skip to content

PowerUser64/basic-sandbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Basic Sandbox 🏖️

This is a somewhat-specialized sandbox for running things you don't trust. It's built around bubblewrap.

Note

This tool was and is 100% written by hand. No AI-generated code exists in this repository.

⚙️ BS features

  • 🕵 Opens your current working directory at /project/<CWD NAME>. This is to anonymize any information it might hold.
  • 🕵 Makes a "virtual" username and home folder (see: --user flag).
  • 🕵 Creates a "virtual" hostname (see --hostname flag).
  • 🛠️ Forwards /usr and /opt. This is to make bs quick to use.

✍️ Usage

# Run opencode with readonly access to ~/.bashrc and ~/code/mylib
bs -f ~/.bashrc -f ~/code/mylib -- opencode

👥 Profiles

To make profiles:

  1. Experiment to find a bs command that you find useful
  2. Copy bsp-template and name it what you want (eg. bspgcc) and fill in TODO's -- OR make your own
  3. Replace the bs command in the script with your bs command
  4. Make sure the template is chmod +x'd and in your PATH

🏗️ Install

  1. Install bubblewrap (bwrap) and fish shell (fish) from your package manager
  2. Clone the repository bs into your environment
  3. Add bs to your PATH (something like sudo ln -s "$(realpath -e bs)" /usr/bin/bs)
  4. If you want the example profiles (bspoc for opencode and bspgemini for gemini-cli), copy them too
  5. chmod +x
  6. Run bs. You should be dropped into a shell.

About

a Basic Sandbox for running anything that might try to pull some kind of nonsense

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages