{"id":15516314,"url":"https://github.com/daenney/ssrf","last_synced_at":"2025-04-23T03:29:12.505Z","repository":{"id":64071696,"uuid":"573069228","full_name":"daenney/ssrf","owner":"daenney","description":"SSRF protection in Go","archived":false,"fork":false,"pushed_at":"2023-07-06T15:57:50.000Z","size":32,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T00:26:13.722Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://code.dny.dev/ssrf","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daenney.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":"2022-12-01T16:22:38.000Z","updated_at":"2024-09-03T05:31:22.000Z","dependencies_parsed_at":"2024-06-21T08:39:43.614Z","dependency_job_id":"09e5e083-82c1-453b-bc27-7a72d50416f1","html_url":"https://github.com/daenney/ssrf","commit_stats":{"total_commits":20,"total_committers":2,"mean_commits":10.0,"dds":0.09999999999999998,"last_synced_commit":"d310348fedf154729a11932b37c4a2b9d9a61e56"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daenney%2Fssrf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daenney%2Fssrf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daenney%2Fssrf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daenney%2Fssrf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daenney","download_url":"https://codeload.github.com/daenney/ssrf/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250364460,"owners_count":21418490,"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":[],"created_at":"2024-10-02T10:06:40.889Z","updated_at":"2025-04-23T03:29:12.485Z","avatar_url":"https://github.com/daenney.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n🌐 ssrf 🔐\n\u003c/h1\u003e\n\u003ch4 align=\"center\"\u003eA Go library for implementing SSRF protections\u003c/h4\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/daenney/ssrf/actions/workflows/test.yaml)\"\u003e\u003cimg src=\"https://github.com/daenney/ssrf/actions/workflows/test.yaml/badge.svg?branch=main\" alt=\"Build Status\"\u003e\u003c/a\u003e\n\t\u003ca href=\"https://github.com/daenney/ssrf/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/release/daenney/ssrf.svg\" alt=\"Release\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://goreportcard.com/report/code.dny.dev/ssrf\"\u003e\u003cimg src=\"https://goreportcard.com/badge/code.dny.dev/ssrf\" alt=\"Go report card\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://pkg.go.dev/code.dny.dev/ssrf\"\u003e\u003cimg src=\"https://pkg.go.dev/badge/code.dny.dev/ssrf.svg\" alt=\"GoDoc\"\u003e\u003c/a\u003e\n    \u003ca href=\"LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/daenney/ssrf\" alt=\"License: MIT\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nThis package aims to help with implementing SSRF protections. It differs from\nother packages in that it is kept automatically in sync with the IANA Special\nPurpose Registries for both [IPv4][ipv4] and [IPv6][ipv6] with some additions.\n\nThe generation is done by [ssrfgen](cmd/ssrfgen).\n\nA `Safe()` method is provided that you can hook into a `net.Dialer` to prevent\nit from ever dialing to endpoints using certain protocols, destination ports\nor IPs in certain networks.\n\nOnce you have the dialer, you can pass it into things like an `http.Transport`\nto create an `http.Client` that won't allow requests to certain destinations.\nIt's worth pointing out that DNS resolution of the destination will still take\nplace, so that a name can be translated to an IP first.\n\n## Usage\n\nYou can retrieve this package with:\n\n```\ngo get code.dny.dev/ssrf\n```\n\nYou can then call the `New()` method to get a Guardian and pass it on to your\n`net.Dialer` of choice.\n\n```go\ns := ssrf.New()\n\ndialer := \u0026net.Dialer{\n\tControl: s.Safe,\n}\n\ntransport := \u0026http.Transport{\n\tDialContext: dialer.DialContext,\n}\n\nclient := \u0026http.Client{\n\tTransport: transport,\n}\n```\n\n[ipv4]: https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml\n[ipv6]: https://www.iana.org/assignments/iana-ipv6-special-registry/iana-ipv6-special-registry.xhtml\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaenney%2Fssrf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaenney%2Fssrf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaenney%2Fssrf/lists"}