Network
Control outbound connections, Unix sockets, binds, and listeners by host and port.
deny_network!
Linux syscall guard for Ruby
Straycall reports and blocks unintended network, filesystem, and process access from Ruby builds and test suites—then points to the responsible Ruby code.
$ straycall -- bundle exec rspec
straycall: connect(2) → 192.0.2.1:443
spec/services/sync_spec.rb:27:in `fetch'
app/services/sync.rb:14:in `call'
hint: allow_host "192.0.2.1", ports: [443]
1 example, 1 syscall violation
Guardrails
Keep accidental side effects out of builds and tests without losing the context needed to fix them.
Control outbound connections, Unix sockets, binds, and listeners by host and port.
deny_network!
Allow writes only below known roots and report reads of sensitive paths.
deny_write_elsewhere!
Restrict executables to an explicit allow list and see where each launch began.
deny_exec_elsewhere!
Quick start
The CLI keeps the supervisor outside the filtered command, so it stays out of your test runner's process handling.
# Gemfile
gem "straycall"
straycall --config .straycall.yml -- bundle exec rspec
failBlock and exit nonzero
warnAllow and report
recordGenerate a reviewable policy
promptAsk through the terminal
Policy as code
Keep the policy beside the project. Hosts resolve once at load time; paths expand without silently resolving symbolic links.
Read the configuration reference.straycall.yml
network:
default: deny
allow:
- host: 127.0.0.1
ports: [5432, 6379]
write:
default: deny
allow: [tmp, log, coverage]
deny_read: [~/.ssh, ~/.aws]
exec:
default: allow
deny: [/usr/bin/curl]
on_violation: fail
How it works
Linux pauses selected syscalls through seccomp user notifications.
An unfiltered supervisor evaluates the target against your policy.
The report joins the syscall target with the responsible Ruby backtrace.
Ready to listen?
Install Straycall and wrap your next Ruby build or test run.