{"id":22854945,"url":"https://github.com/np-guard/netpol-synthesizer","last_synced_at":"2025-04-30T12:16:59.765Z","repository":{"id":40426503,"uuid":"369230484","full_name":"np-guard/netpol-synthesizer","owner":"np-guard","description":"Produces a set of network policies, given a json describing the connectivity in a given cluster","archived":false,"fork":false,"pushed_at":"2023-12-26T06:59:06.000Z","size":99,"stargazers_count":4,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-12-26T07:58:54.094Z","etag":null,"topics":["kubernetes","microsegmentation","network-security","network-segmentation","networkpolicy","policies"],"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/np-guard.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}},"created_at":"2021-05-20T14:09:34.000Z","updated_at":"2022-10-30T18:25:42.000Z","dependencies_parsed_at":"2023-12-11T15:30:22.339Z","dependency_job_id":"c08c2889-138c-46ec-ab48-a553e52b48d6","html_url":"https://github.com/np-guard/netpol-synthesizer","commit_stats":null,"previous_names":[],"tags_count":3,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/np-guard%2Fnetpol-synthesizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/np-guard%2Fnetpol-synthesizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/np-guard%2Fnetpol-synthesizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/np-guard%2Fnetpol-synthesizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/np-guard","download_url":"https://codeload.github.com/np-guard/netpol-synthesizer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229504578,"owners_count":18083397,"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":["kubernetes","microsegmentation","network-security","network-segmentation","networkpolicy","policies"],"created_at":"2024-12-13T07:09:16.109Z","updated_at":"2025-04-30T12:16:59.760Z","avatar_url":"https://github.com/np-guard.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e [!WARNING]  \n\u003e This repo is no longer being maintained.\n\n# netpol-synthesizer\nThis application takes a JSON file, describing the connectivity in a given Kubernetes cluster,\nand produces a set of policies (Kubernetes NetworkPolicies or Istio AuthorizationPolicies) that allow only the specified connectivity\nand nothing more.\n\n### Requirements:\n\n* Python 3.8 or above\n\n### Installation:\n```commandline\ngit clone --recurse-submodules https://github.com/np-guard/netpol-synthesizer.git\ncd netpol-synthesizer\npython3 -m venv venv\nsource venv/bin/activate.csh  # the exact script may depend on the shell you are using\npip install -r requirements.txt\n```\n\n### Usage:\n```commandline\npython src/netpol_synth.py [-o \u003coutput_file\u003e] [-b baseline_rules_file] [--policy_type=\u003cpolicy_type_str\u003e] \u003cconnectivity_file\u003e\n```\n* `connectivity_file` is the path to a JSON file describing connectivity. This should be the output of running the [Network Topology Analyzer](https://github.com/np-guard/cluster-topology-analyzer).\n* `output_file` *(optional)* is a path to output file where the resulting policy resources will be dumped (in YAML format). If omitted, output will be sent to stdout.\n* `baseline_rules_file` is a yaml file containing a list of baseline rules. See [these examples](https://github.com/np-guard/baseline-rules/tree/master/examples)\n* `policy_type_str` is one of the values: `['k8s', 'istio']`, *default:* `k8s`\n\nFor example:\n```commandline\n python src/netpol_synth.py -o test.yaml -b baseline-rules/examples/allow_load_generation.yaml tests/connectivity_jsons/microservices-demo.json\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnp-guard%2Fnetpol-synthesizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnp-guard%2Fnetpol-synthesizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnp-guard%2Fnetpol-synthesizer/lists"}