{"id":13453710,"url":"https://github.com/tomakehurst/saboteur","last_synced_at":"2025-07-29T06:33:21.756Z","repository":{"id":12236099,"uuid":"14847459","full_name":"tomakehurst/saboteur","owner":"tomakehurst","description":"Causing deliberate network mayhem for better resilience","archived":false,"fork":false,"pushed_at":"2015-08-28T17:27:07.000Z","size":660,"stargazers_count":386,"open_issues_count":7,"forks_count":20,"subscribers_count":23,"default_branch":"master","last_synced_at":"2025-05-20T05:02:12.999Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/tomakehurst.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-12-01T22:26:53.000Z","updated_at":"2025-03-10T18:22:55.000Z","dependencies_parsed_at":"2022-09-23T05:11:14.590Z","dependency_job_id":null,"html_url":"https://github.com/tomakehurst/saboteur","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/tomakehurst/saboteur","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomakehurst%2Fsaboteur","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomakehurst%2Fsaboteur/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomakehurst%2Fsaboteur/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomakehurst%2Fsaboteur/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomakehurst","download_url":"https://codeload.github.com/tomakehurst/saboteur/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomakehurst%2Fsaboteur/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267639569,"owners_count":24119780,"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","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-07-31T08:00:45.826Z","updated_at":"2025-07-29T06:33:21.731Z","avatar_url":"https://github.com/tomakehurst.png","language":"Python","funding_links":[],"categories":["Python","Capabilities"],"sub_categories":["Resilience"],"readme":"Saboteur\n========\n\nSaboteur is a network fault injection tool that aims to simplify resilience and stability testing.\nIts core component is an agent that accepts commands over HTTP and configures its host's network stack\nfor various common fault scenarios.\n\nCurrently these include:\n-   Total network partition\n-   Remote service dead (not listening on the expected port)\n-   Delays\n-   Packet loss\n-   TCP connection timeout (as often happens when two systems are separated by a stateful firewall)\n\nCurrently it is Linux only, but support may be added for OSX in future.\n\nRPM and DEB packages are available for the agent. See [Releases](https://github.com/tomakehurst/saboteur/releases \"Releases\").\n\nA CLI is also available as an RPM under releases, or you can just download and use it directly from source https://raw.github.com/tomakehurst/saboteur/master/bin/sab.\n\nInstalling the agent and CLI\n----------------------------\nSaboteur's only dependency is Python 2.6.6+.\n\nTo install from the RPM:\n\n``\n    $ rpm -ivh https://github.com/tomakehurst/saboteur/releases/download/v0.7/saboteur-0.7-1.noarch.rpm\n``\n\nAnd from the DEB package:\n\n``\n    $ wget -P /tmp https://github.com/tomakehurst/saboteur/releases/download/v0.7/saboteur_0.7_all.deb \u0026\u0026 dpkg --install /tmp/saboteur_0.7_all.deb\n``\n\nAfter installation, start the agent daemon in the usual way:\n\n``\n    $ service saboteur-agent start\n``\n\nCompatibility\n-------------\nSo far I've verified that Saboteur works on Centos 6.4, Red Hat 6.4 and Ubuntu 12.10. It currently has some issues with the\ntc defaults on Fedora 18, so only the NETWORK_FAILURE, SERVICE_FAILURE and FIREWALL_TIMEOUT fault types work on that OS.\n\nI'd welcome any feedback about successes/failures on other distros or versions.\n\n\nUsing the CLI\n-------------\nThe Saboteur package installs a CLI executable which can be used to configure and reset faults both locally and remotely.\nTyping ``sab`` without arguments (or with ``-h``) will display usage information.\n\nTo create a new fault:\n\n``\n    $ sab add --fault_type NETWORK_FAILURE --to_port 8818 --direction IN --hosts myhost1,myhost2\n``\n\nTo remove all faults:\n\n``\n    $ sab reset --hosts myhost1,myhost2\n``\n\nNote: omitting ``--hosts`` will cause commands to be sent to localhost.\n\n\nUsing the HTTP API directly\n---------------------------\nSaboteur has a simple JSON over HTTP API. To add a new rule, simply POST to the agent process on port 6660 e.g.\n``\n    $ curl -X POST -d '{ \"name\": \"packet-loss-to-app-server\",\n    \"type\": \"PACKET_LOSS\",\n    \"direction\": \"IN\",\n    \"to_port\": 8080,\n    \"probability\": 0.2,\n    \"correlation\": 25 }' http://192.168.2.11:6660/\n``\n\nSee [the tests](https://github.com/tomakehurst/saboteur/blob/master/tests/apicommands_tests.py \"the tests\")\nfor more examples of valid commands.\n\nTo reset all faults, send a DELETE request to the root path e.g.\n\n``\n    $ curl -X DELETE http://192.168.2.11:6660/\n``\n\nResilience testing Saboteur and JUnit\n-------------------------------------\n[Crash Lab](https://github.com/tomakehurst/crash-lab) is a Java library for automating resilience/stability type tests\n(or any scenario involving network faults), which has a Saboteur client as part of it, and\n[some examples](https://github.com/tomakehurst/crash-lab/blob/master/src/test/java/com/tomakehurst/crashlab/ExampleScenarios.java).\n\n\n\nLimitations\n-----------\nThe Saboteur agent currently implements its reset feature by deleting all iptables and tc rules, so it currently won't\nplay nicely on systems that have rules configured via other means. This will be improved in future, probably by having\nSaboteur keep track of rules it has created so that these can be targeted for reset.\n\nIt's also likely that adding multiple DELAY and/or PACKET_LOSS rules will not work correctly.\n\nFixes are coming for both of these issues.\n\nFinally, please don't use this in production (yet)! It's in no way secure, and would make an ideal attack vector for\nanyone wanting to DoS your site.\n\nI'm considering trying to make the agent secure enough to be used as a building block for a chaos monkey. Again, any\nfeedback on the usefulness of this would be appreciated!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomakehurst%2Fsaboteur","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomakehurst%2Fsaboteur","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomakehurst%2Fsaboteur/lists"}