{"id":18894182,"url":"https://github.com/trailofbits/eatmynetwork","last_synced_at":"2025-04-15T00:31:59.857Z","repository":{"id":53547260,"uuid":"520636132","full_name":"trailofbits/eatmynetwork","owner":"trailofbits","description":"A small script for running programs with (minimal) network sandboxing","archived":false,"fork":false,"pushed_at":"2024-03-18T22:24:29.000Z","size":39,"stargazers_count":49,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-06T07:18:40.686Z","etag":null,"topics":["linux","macos","resilience-testing","sandbox"],"latest_commit_sha":null,"homepage":"https://trailofbits.github.io/eatmynetwork/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trailofbits.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-08-02T20:10:40.000Z","updated_at":"2024-11-28T20:18:43.000Z","dependencies_parsed_at":"2024-02-13T00:49:29.905Z","dependency_job_id":null,"html_url":"https://github.com/trailofbits/eatmynetwork","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trailofbits%2Featmynetwork","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trailofbits%2Featmynetwork/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trailofbits%2Featmynetwork/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trailofbits%2Featmynetwork/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trailofbits","download_url":"https://codeload.github.com/trailofbits/eatmynetwork/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248984408,"owners_count":21193744,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["linux","macos","resilience-testing","sandbox"],"created_at":"2024-11-08T08:19:41.437Z","updated_at":"2025-04-15T00:31:58.060Z","avatar_url":"https://github.com/trailofbits.png","language":"Shell","readme":"eatmynetwork\n============\n\n[![Lint](https://github.com/trailofbits/eatmynetwork/actions/workflows/lint.yml/badge.svg)](https://github.com/trailofbits/eatmynetwork/actions/workflows/lint.yml)\n\n`eatmynetwork` is a small script for running programs with (minimal) network\nsandboxing.\n\n```console\n$ eatmynetwork ping 8.8.8.8\nPING 8.8.8.8 (8.8.8.8): 56 data bytes\nping: sendto: Operation not permitted\n```\n\n## Why/what/how?\n\nNetwork connectivity sneaks its way into programs \u0026mdash; many things that\n*shouldn't* need network access do, and fail in surprising ways when a network\nconnection isn't available.\n\n`eatmynetwork` makes it easy to quickly determine how a program behaves when it\ndoesn't have network access, without actually having to turn off your host's\nnetwork adapter(s). This makes it useful for:\n\n* Resiliency testing: ensuring that a program that *shouldn't* require network\n  access handles the lack of access gracefully\n\n* Unit testing: ensuring that network access does not creep into idempotent and\n  offline-only unit tests and, separately, ensuring that online unit tests\n  are correctly marked and filtered when testing offline\n\nUnder the hood, all `eatmynetwork` does is wrap a handful of platform-specific\nnetwork isolation techniques: on macOS it uses `sandbox-exec`, and on Linux\nit tries a handful of different network namespace management tools.\n\nImportantly, `eatmynetwork` **does not provide a security boundary**: it does\nnot guarantee that a motivated or malicious process **can't** access the\nnetwork, only that ordinary (\"honest\") programs will think that they're offline.\nIf you need strong isolation, you need another tool.\n\n## Installation\n\n`eatmynetwork` is a POSIX `sh` script, and should work correctly on\nmodern Linux and macOS installations.\n\nTo install it, just copy it wherever you need it:\n\n```console\n$ git clone https://github.com/trailofbits/eatmynetwork \u0026\u0026 cd eatmynetwork\n$ cp ./eatmynetwork /some/bin/dir/\n```\n\nThere's also a [manual page](./eatmynetwork.1) that you can copy.\n\n## Usage\n\nRun a command:\n\n```console\n$ eatmynetwork ls\n```\n\nRun a command, with arguments:\n\n```console\n$ eatmynetwork curl https://example.com\n```\n\nDo some debug logging while running:\n\n```console\n$ DEBUG=1 eatmynetwork ssh example.com\n```\n\nIn general, prefixing any command with `eatmynetwork` should run the command\nexactly the same, just without network access. There are no behavior-modifying\nflags or options.\n\n## License\n\n`eatmynetwork` is licensed under the terms of the\n[Apache-2.0 License](./LICENSE).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrailofbits%2Featmynetwork","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrailofbits%2Featmynetwork","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrailofbits%2Featmynetwork/lists"}