{"id":18151251,"url":"https://github.com/msantos/nonetexec","last_synced_at":"2025-10-09T20:14:03.660Z","repository":{"id":184193283,"uuid":"622540742","full_name":"msantos/nonetexec","owner":"msantos","description":"nonetexec: prevent an exec(3)'ed command from opening new sockets","archived":false,"fork":false,"pushed_at":"2025-02-22T14:11:33.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-22T15:22:31.124Z","etag":null,"topics":["exec","firewall","seccomp"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/msantos.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-02T12:27:19.000Z","updated_at":"2025-02-22T14:11:37.000Z","dependencies_parsed_at":"2024-06-09T13:57:16.312Z","dependency_job_id":"cf3ecbf0-9a1d-41c7-8db7-dcd5ec39e18a","html_url":"https://github.com/msantos/nonetexec","commit_stats":null,"previous_names":["msantos/nonetexec"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msantos%2Fnonetexec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msantos%2Fnonetexec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msantos%2Fnonetexec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msantos%2Fnonetexec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/msantos","download_url":"https://codeload.github.com/msantos/nonetexec/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247568773,"owners_count":20959753,"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":["exec","firewall","seccomp"],"created_at":"2024-11-02T01:07:05.425Z","updated_at":"2025-10-09T20:13:58.628Z","avatar_url":"https://github.com/msantos.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SYNOPSIS\n\nnonetexec *cmd* *...*\n\n# DESCRIPTION\n\nnonetexec: prevent an exec(3)'ed command from opening sockets\n\n`nonetexec` removes the capability of an executed command to open network\nsockets. The process can open filesystem objects or use sockets inherited\nfrom the parent.\n\nThe process may still access the network by using:\n\n* systemd socket activation\n\n* a inetd or [UCSPI](https://jdebp.uk/FGA/UCSPI.html) service with\n  standard input and output attached to a socket\n\n* file descriptor passing over a socketpair(2) inherited from the parent\n\n# EXAMPLES\n\n## curl(1): process does not access network\n\n```\n$ nonetexec curl file:///etc/hosts\n# The following lines are desirable for IPv6 capable hosts\n::1 ip6-localhost ip6-loopback\nfe00::0 ip6-localnet\nff00::0 ip6-mcastprefix\nff02::1 ip6-allnodes\nff02::2 ip6-allrouters\nff02::3 ip6-allhosts\n```\n\n## curl(1): process attempts to access network\n\n```\n$ nonetexec curl http://1.1.1.1\ncurl: (7) Couldn't connect to server\n```\n\n## Network socket attached to stdin/stdout\n\nUses [tcpexec](https://github.com/msantos/tcpexec):\n\n```\n$ tcpexec :8080 nonetexec cat\n```\n\n```\n$ nc localhost 8080\ntest\ntest\n```\n\n# Build\n\n```\nmake\n\n#### static executable using musl\n## sudo apt install musl-dev musl-tools\n\n## linux seccomp process restrictions: requires kernel headers\nexport MUSL_INCLUDE=/tmp\ngit clone https://github.com/sabotage-linux/kernel-headers.git $MUSL_INCLUDE/kernel-headers\n./musl-make\n```\n\n# OPTIONS\n\nNone\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsantos%2Fnonetexec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmsantos%2Fnonetexec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsantos%2Fnonetexec/lists"}