• Stars
    star
    130
  • Rank 277,575 (Top 6 %)
  • Language
    Shell
  • Created over 3 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Sandboxtron

A wrapper around Mac's sandbox-exec that lets you easily run terminals/programs within sandboxes for a slightly safer day-to-day computing experience.

Useful if you don't want every npm/cargo/pip transitive dependency to have full access to your filesystem and network.

See this writeup for a bit more background.

Install

Add bin/ to your path.

Usage

  • sb opens a shell in an offline sandbox that can only read/write the current directory and its children. See base.sb for the default sandbox profile.

  • sb online opens a shell in an online sandbox.

  • sb online -- ping www.google.com runs ping www.google.com in an online sandbox and returns.

  • In general: sb foo bar baz -- command sources profiles foo.sb, bar.sb, baz.sb from the profile directory and runs command within that sandbox.

If an app doesn't work a sanbox, search for "sandbox" in Console.app to see what permissions the app was denied and try granting these permissions via a custom profile.

When running in a sandbox, the following env vars will be defined:

  • SANDBOX_MODE_NETWORK
    • online
    • offline

I find it helpful to add emoji to my ZSH prompt to remind me of my shell's capabilities:

PROMPT="%(?.%F{green}.%F{red})"

PROMPT="%(?.%F{green}.%F{red})"
if [[ "online" = "${SANDBOX_MODE_NETWORK:-online}" ]]; then
    PROMPT+="πŸ“‘"
fi

if [[ -r "$HOME" ]]; then
    PROMPT+="🏠"
fi

PROMPT+=" |%f "

Todo

  • deny forbidden-sandbox-reinit is thrown by:
    • Electron
    • swift build (though swift starts a REPL just fine)

Further reading

More Repositories

1

c2

Declarative data visualization in Clojure(Script).
JavaScript
643
star
2

cljx

Write a portable codebase targeting Clojure/ClojureScript
Clojure
398
star
3

subform-layout

Embeddable layout engine. Like flexbox, but with fewer concepts, applied uniformly.
191
star
4

reflex

Automatic state propogation in ClojureScript
Clojure
184
star
5

zmq-async

Threadsafe Clojure core.async interface to ZeroMQ
Clojure
167
star
6

vagrant-ec2

Use the same chef to provision Vagrant VMs and EC2 instances
Ruby
166
star
7

jetty7-websockets-async

Clojure core.async interface to Jetty7's websockets.
Clojure
107
star
8

cljs-d3

A ClojureScript façade for the D3 JavaScript DOM-manipulation library
Clojure
85
star
9

todoFRP

Functional reactive todo lists
JavaScript
81
star
10

singult

JavaScript Hiccup compiler
CoffeeScript
51
star
11

cljs-react-perf

Performance experiments w/ CLJS React libraries and techniques.
Clojure
40
star
12

json-tagged-literals

More palatable JSON serialization
CoffeeScript
40
star
13

c2-demos

Example C2 visualizations and applications
Clojure
37
star
14

svd2zig

Generate Zig API from SVD register definitions.
Zig
36
star
15

clj-liblinear

A Clojure wrapper for LIBLINEAR, a linear support vector machine library
Clojure
28
star
16

cassowary-coffee

CoffeeScript port of the Cassowary linear constraint solver
CoffeeScript
24
star
17

hicada

A cljs hiccup compiler that helps you be deliberate about runtime interpretation.
Clojure
21
star
18

touchtron

Rust touchpad / usb experiments
Rust
16
star
19

clojurescript-compiler-proposal

Request for comments on ClojureScript compiler interface updates
Clojure
14
star
20

cljs-chosen

ClojureScript interface to Harvest's Chosen <select> library
JavaScript
12
star
21

tidy-codebase-starter-kit

Shell
9
star
22

vomnibus

Assortment of useful geographic data, color schemes, &c.
Clojure
8
star
23

vcf

Genetic variant analysis tool.
JavaScript
8
star
24

YALL1

All your sparse bases are belong to us.
Objective-C
8
star
25

lorax

Provably efficient deep learning
Clojure
5
star
26

prote.cs

Compressed sensing based protein fold search
JavaScript
4
star
27

denizen-demo-compojure

Demo Clojure web app using Denizen for user management
Clojure
4
star
28

question-rust-inlining

A question about inlining and match vs lookup tables in Rust.
LLVM
4
star
29

Rliblinear

R interface to LIBLINEAR, a linear support vector machine library
C++
3
star
30

cljs-hiccup-inference

Minimal example repo of a CLJS Hiccup->React compiler w/ type inference
Clojure
3
star
31

splot

Rust
2
star
32

question-rust-websocket

Rust
2
star
33

profile-cljs

Wherein I examine ClojureScript performance.
Clojure
2
star
34

datomic-fuse-AOT

A hellscape of Clojure+Datomic lazy loading errors.
Clojure
1
star
35

eui

Rust
1
star