{"id":24082144,"url":"https://github.com/levidurfee/gowafp","last_synced_at":"2025-10-05T16:47:55.385Z","repository":{"id":57543437,"uuid":"119599639","full_name":"levidurfee/gowafp","owner":"levidurfee","description":"A Web Application Firewall for PHP written in Go","archived":false,"fork":false,"pushed_at":"2018-02-11T22:34:23.000Z","size":29,"stargazers_count":25,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-03T23:30:36.871Z","etag":null,"topics":["fastcgi","fpm","go","golang","php","security","waf"],"latest_commit_sha":null,"homepage":"","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/levidurfee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-30T21:59:03.000Z","updated_at":"2024-12-26T13:33:35.000Z","dependencies_parsed_at":"2022-08-27T19:10:39.754Z","dependency_job_id":null,"html_url":"https://github.com/levidurfee/gowafp","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/levidurfee/gowafp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levidurfee%2Fgowafp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levidurfee%2Fgowafp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levidurfee%2Fgowafp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levidurfee%2Fgowafp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/levidurfee","download_url":"https://codeload.github.com/levidurfee/gowafp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levidurfee%2Fgowafp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275440142,"owners_count":25465045,"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-09-16T02:00:10.229Z","response_time":65,"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":["fastcgi","fpm","go","golang","php","security","waf"],"created_at":"2025-01-09T23:45:39.680Z","updated_at":"2025-09-16T15:31:36.087Z","avatar_url":"https://github.com/levidurfee.png","language":"Go","readme":"# gowafp\n\n[![Build Status](https://travis-ci.org/levidurfee/gowafp.svg?branch=master)](https://travis-ci.org/levidurfee/gowafp)\n\nA Go WAF (Web Application Firewall) that sits between your webserver (nginx)\nand your FastCGI application.\n\nnginx \u003c- (tcp) -\u003e gowafp \u003c- (FastCGI) -\u003e PHP-FPM\n\nThe goal of this package is to prevent any attacks from reaching the FastCGI\napplication. It should block all\n[SQL injection](https://www.owasp.org/index.php/SQL_Injection)\nattempts and filter\n[XSS](https://www.owasp.org/index.php/Cross-site_Scripting_(XSS))\nattempts.\nMaybe down the road it could also handle\n[CSRF](https://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF)).\n\nThe Application and the Web Application Firewall should not be on different\nservers. While the services out there do a good job, they're expensive and\nslower. Of course, you could recompile your web server with some additional\nfeatures, but that is harder to deploy while scaling.\n\n## usage\n\nFirst, you need to have Go get the repo.\n\n```Shell\ngo get github.com/levidurfee/gowafp\n```\n\nBelow is simple `main.go` example.\n\n```Go\npackage main\n\nimport (\n\t\"github.com/levidurfee/gowafp\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\thttp.Handle(\"/\", gowafp.AnalyzeRequest(gowafp.PhpHandler(\"/app/index.php\", \"tcp\", \"127.0.0.1:9000\")))\n\n\tlog.Fatal(http.ListenAndServe(\":8080\", nil))\n}\n```\n\nThen build and run it.\n\n```Shell\ngo build main.go\n./main\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevidurfee%2Fgowafp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flevidurfee%2Fgowafp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevidurfee%2Fgowafp/lists"}