{"id":14779814,"url":"https://github.com/jeroenrinzema/psql-wire","last_synced_at":"2026-02-27T18:45:41.770Z","repository":{"id":43151959,"uuid":"405053924","full_name":"jeroenrinzema/psql-wire","owner":"jeroenrinzema","description":"PostgreSQL server wire protocol. Build your own server and start serving connections.","archived":false,"fork":false,"pushed_at":"2025-12-17T13:12:28.000Z","size":319,"stargazers_count":206,"open_issues_count":9,"forks_count":39,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-21T01:23:29.807Z","etag":null,"topics":["go","hacktoberfest","postgres","postgresql","server","sql","wire-protocol"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jeroenrinzema.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-09-10T11:15:26.000Z","updated_at":"2025-12-17T13:12:31.000Z","dependencies_parsed_at":"2023-12-19T19:35:48.673Z","dependency_job_id":"a0d37e54-15e8-49fe-ad28-a64a0307f367","html_url":"https://github.com/jeroenrinzema/psql-wire","commit_stats":null,"previous_names":[],"tags_count":41,"template":false,"template_full_name":null,"purl":"pkg:github/jeroenrinzema/psql-wire","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeroenrinzema%2Fpsql-wire","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeroenrinzema%2Fpsql-wire/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeroenrinzema%2Fpsql-wire/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeroenrinzema%2Fpsql-wire/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeroenrinzema","download_url":"https://codeload.github.com/jeroenrinzema/psql-wire/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeroenrinzema%2Fpsql-wire/sbom","scorecard":{"id":515865,"data":{"date":"2025-08-11","repo":{"name":"github.com/jeroenrinzema/psql-wire","commit":"9ee9f05543dd96e5cfe04d4c2684fc1c52158890"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.7,"checks":[{"name":"Code-Review","score":4,"reason":"Found 13/30 approved changesets -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":10,"reason":"10 commit(s) and 3 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yaml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/jeroenrinzema/psql-wire/ci.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/jeroenrinzema/psql-wire/ci.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/jeroenrinzema/psql-wire/ci.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/jeroenrinzema/psql-wire/ci.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/jeroenrinzema/psql-wire/ci.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/jeroenrinzema/psql-wire/ci.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/jeroenrinzema/psql-wire/ci.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:55: update your workflow using https://app.stepsecurity.io/secureworkflow/jeroenrinzema/psql-wire/ci.yaml/main?enable=pin","Info:   0 out of   8 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 16 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":5,"reason":"5 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2025-3787 / GHSA-fv92-fjc5-jj9h","Warn: Project is vulnerable to: GO-2024-2567 / GHSA-fqpg-rq76-99pq","Warn: Project is vulnerable to: GO-2024-2606 / GHSA-mrww-27vc-gghv","Warn: Project is vulnerable to: GO-2024-3321 / GHSA-v778-237x-gjrc","Warn: Project is vulnerable to: GO-2025-3487 / GHSA-hcg3-q754-cr77"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T01:48:42.793Z","repository_id":43151959,"created_at":"2025-08-20T01:48:42.794Z","updated_at":"2025-08-20T01:48:42.794Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29908646,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T17:28:36.873Z","status":"ssl_error","status_checked_at":"2026-02-27T17:28:20.970Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["go","hacktoberfest","postgres","postgresql","server","sql","wire-protocol"],"created_at":"2024-09-17T01:01:00.301Z","updated_at":"2026-02-27T18:45:41.762Z","avatar_url":"https://github.com/jeroenrinzema.png","language":"Go","funding_links":[],"categories":["Recently Updated","Networking","网络"],"sub_categories":["[Sep 15, 2024](/content/2024/09/15/README.md)","Transliteration","音译"],"readme":"# PSQL wire protocol 🔌\n\n[![CI](https://github.com/jeroenrinzema/psql-wire/actions/workflows/ci.yaml/badge.svg)](https://github.com/jeroenrinzema/psql-wire/actions/workflows/ci.yaml)\n[![Go Reference](https://pkg.go.dev/badge/github.com/jeroenrinzema/psql-wire.svg)](https://pkg.go.dev/github.com/jeroenrinzema/psql-wire) [![Latest release](https://img.shields.io/github/release/jeroenrinzema/psql-wire.svg)](https://github.com/jeroenrinzema/psql-wire/releases) [![Go Report Card](https://goreportcard.com/badge/github.com/jeroenrinzema/psql-wire)](https://goreportcard.com/report/github.com/jeroenrinzema/psql-wire)\n\nA pure Go [PostgreSQL](https://www.postgresql.org/) server wire protocol implementation.\nBuild your own PostgreSQL server within a few lines of code.\nThis project attempts to make it as straight forward as possible to set-up and configure your own PSQL server.\nFeel free to check out the [examples](https://github.com/jeroenrinzema/psql-wire/tree/main/examples) directory for various ways on how to configure/set-up your own server.\n\nYou can use this package to build your own fully fledged, PostgreSQL compatible database, or simply play with the wire protocol by creating a PSQL honeypot, testing drivers, or experimenting with third-party integrations.\n\nIt’s designed to give you a high-level implementation out of the box, while staying hackable so you can bend it to whatever you want to build.\n\n\u003e 🚧 This project does not include a PSQL parser. Please check out other projects such as [auxten/postgresql-parser](https://github.com/auxten/postgresql-parser) to parse PSQL SQL queries.\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\twire \"github.com/jeroenrinzema/psql-wire\"\n)\n\nfunc main() {\n\twire.ListenAndServe(\"127.0.0.1:5432\", handler)\n}\n\nfunc handler(ctx context.Context, query string) (wire.PreparedStatements, error) {\n\treturn wire.Prepared(wire.NewStatement(func(ctx context.Context, writer wire.DataWriter, parameters []wire.Parameter) error {\n\t\tfmt.Println(query)\n\t\treturn writer.Complete(\"OK\")\n\t})), nil\n}\n```\n\n---\n\n## Session Attributes\n\nYou can store custom session attributes for each client connection, allowing you to track session state:\n\n```go\n// Set a session attribute\nwire.SetAttribute(ctx, \"tenant_id\", \"tenant-123\")\n\n// Get a session attribute\ntenantID, ok := wire.GetAttribute(ctx, \"tenant_id\")\n```\n\n---\n\n\u003e 🚧 When wanting to debug issues and or inspect the PostgreSQL wire protocol please check out the [psql-proxy](https://github.com/cloudproud/psql-proxy) cli\n\n## Support\n\nFeel free to start a new discussion to discuss feature requests or issues.\n\n## Used by\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://cloudproud.nl\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\n    \u003cimg src=\".github/assets/cloudproud_logo.svg\" alt=\"Cloudproud\" height=\"60\"\u003e\n  \u003c/a\u003e\n  \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\n  \u003ca href=\"https://www.shopify.com\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\n    \u003cimg src=\".github/assets/shopify_logo.svg\" alt=\"Shopify\" height=\"60\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## Contributing\n\nThank you for your interest in contributing to psql-wire!\nCheck out the open projects and/or issues and feel free to join any ongoing discussion.\nFeel free to checkout the [open TODO's](https://github.com/jeroenrinzema/psql-wire/issues?q=is%3Aissue+is%3Aopen+label%3Atodo) within the project.\n\nEveryone is welcome to contribute, whether it's in the form of code, documentation, bug reports, feature requests, or anything else. We encourage you to experiment with the project and make contributions to help evolve it to meet your needs!\n\nSee the [contributing guide](https://github.com/jeroenrinzema/psql-wire/blob/main/CONTRIBUTING.md) for more details.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeroenrinzema%2Fpsql-wire","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeroenrinzema%2Fpsql-wire","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeroenrinzema%2Fpsql-wire/lists"}