Running Tests
Full Test Suite
Run all integration tests with:- Builds nono in release mode
- Runs all integration test suites
- Reports results with pass/fail/skip counts
- 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
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-commandflag to permit specific blocked commands--block-commandflag 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
Platform-Specific Behavior
macOS Notes
-
TMPDIR: On macOS,
/var/folders(whereTMPDIRpoints) 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
-
Create a new test file in
tests/integration/: -
Add the suite to
tests/run_integration_tests.sh: -
Make the script executable: