Skip to main content
nono includes comprehensive integration tests that verify the sandbox enforcement works correctly across different scenarios and platforms.

Running Tests

Full Test Suite

Run all integration tests with:
This script:
  1. Builds nono in release mode
  2. Runs all integration test suites
  3. Reports results with pass/fail/skip counts
  4. Exits with non-zero status if any tests fail

Individual Test Suites

Run a specific test suite:

Test Suites

The integration tests are organized into 7 focused suites:

1. Filesystem Access (test_fs_access.sh)

Tests that nono correctly enforces read/write permissions on directories and files.

2. Sensitive Paths (test_sensitive_paths.sh)

Verifies that credential and configuration files are protected by default. Protected paths include:
  • ~/.ssh/ - SSH keys
  • ~/.aws/ - AWS credentials
  • ~/.gnupg/ - GPG keys
  • ~/.kube/ - Kubernetes config
  • ~/.docker/ - Docker credentials
  • ~/.npmrc - npm auth tokens
  • ~/.netrc - Network credentials
  • ~/.bash_history, ~/.zsh_history - Command history
  • ~/.bashrc, ~/.zshrc - Shell configs
These paths are blocked even if a parent directory is explicitly allowed.

3. System Paths (test_system_paths.sh)

Tests protection of system directories.

4. Binary Execution (test_binary_exec.sh)

Verifies that various binaries execute correctly under the sandbox.
Language runtime tests (Python, Node, Ruby) may be skipped if the runtime is installed via Homebrew, as /opt/homebrew isn’t in the sandbox allowlist by default.

5. Network (test_network.sh)

Tests network blocking functionality.

6. Dangerous Commands (test_commands.sh)

Verifies the current startup-only command-blocking compatibility behavior. Also tests:
  • --allow-command flag to permit specific blocked commands
  • --block-command flag to block additional commands
  • documented child-process bypass behavior while the feature is deprecated in v0.33.x

7. Edge Cases (test_edge_cases.sh)

Tests unusual scenarios and boundary conditions.

Test Framework

Tests use a shared helper library (tests/lib/test_helpers.sh) providing:

CI Pipeline

Integration tests run automatically in GitHub Actions on:
  • Pull requests to main
  • Pushes to main
The CI runs tests on both Ubuntu and macOS:

Platform-Specific Behavior

macOS Notes

  • TMPDIR: On macOS, /var/folders (where TMPDIR points) is a system-writable path. Tests that expect write denial within TMPDIR won’t work. Write denial is instead verified via system paths (/usr/bin, /etc).
  • Homebrew runtimes: Language runtimes installed via Homebrew at /opt/homebrew/ aren’t in the sandbox allowlist. Tests for Python, Node, Ruby gracefully skip if the runtime isn’t accessible.

Linux Notes

  • Landlock ABI: Tests should work on any Landlock-enabled kernel (5.13+). Network filtering requires ABI v4+ (kernel 6.7+).

Adding New Tests

  1. Create a new test file in tests/integration/:
  2. Add the suite to tests/run_integration_tests.sh:
  3. Make the script executable: