{"id":49488273,"url":"https://github.com/wisscore/go-sqlcipher","last_synced_at":"2026-05-01T03:02:13.734Z","repository":{"id":354873584,"uuid":"1225295912","full_name":"WissCore/go-sqlcipher","owner":"WissCore","description":"Self-contained Go driver for SQLCipher — encrypted SQLite. Forked from mutecomm/go-sqlcipher to resume maintenance.","archived":false,"fork":false,"pushed_at":"2026-04-30T15:36:50.000Z","size":3949,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-30T17:17:01.875Z","etag":null,"topics":["cgo","database","encryption","golang","sqlcipher","sqlite"],"latest_commit_sha":null,"homepage":null,"language":"C","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/WissCore.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":"MAINTAINERS.md","copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-30T06:24:39.000Z","updated_at":"2026-04-30T15:41:20.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/WissCore/go-sqlcipher","commit_stats":null,"previous_names":["wisscore/go-sqlcipher"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/WissCore/go-sqlcipher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WissCore%2Fgo-sqlcipher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WissCore%2Fgo-sqlcipher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WissCore%2Fgo-sqlcipher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WissCore%2Fgo-sqlcipher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WissCore","download_url":"https://codeload.github.com/WissCore/go-sqlcipher/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WissCore%2Fgo-sqlcipher/sbom","scorecard":{"id":1246773,"data":{"date":"2026-04-30T15:37:12Z","repo":{"name":"github.com/WissCore/go-sqlcipher","commit":"1090ab8600dff0e4a3bc29a3fdea5486d7616f30"},"scorecard":{"version":"v5.3.0","commit":"c22063e786c11f9dd714d777a687ff7c4599b600"},"score":6,"checks":[{"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/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","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/c22063e786c11f9dd714d777a687ff7c4599b600/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/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#dangerous-workflow"}},{"name":"CI-Tests","score":-1,"reason":"no pull request found","details":null,"documentation":{"short":"Determines if the project runs tests before pull requests are merged.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#ci-tests"}},{"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/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#binary-artifacts"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Info: Found linked content: SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#security-policy"}},{"name":"Maintained","score":0,"reason":"project was created within the last 90 days. Please review its contents carefully","details":["Warn: Repository was created within the last 90 days."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":9,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'contents' permission set to 'read': .github/workflows/ci.yml:26","Info: jobLevel 'contents' permission set to 'read': .github/workflows/ci.yml:32","Info: jobLevel 'contents' permission set to 'read': .github/workflows/ci.yml:37","Warn: jobLevel 'security-events' permission set to 'write': .github/workflows/ci.yml:38","Info: jobLevel 'actions' permission set to 'read': .github/workflows/ci.yml:44","Info: jobLevel 'contents' permission set to 'read': .github/workflows/ci.yml:45","Warn: jobLevel 'security-events' permission set to 'write': .github/workflows/ci.yml:46","Info: jobLevel 'contents' permission set to 'read': .github/workflows/ci.yml:51","Warn: jobLevel 'security-events' permission set to 'write': .github/workflows/ci.yml:52","Info: jobLevel 'contents' permission set to 'read': .github/workflows/ci.yml:59","Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql.yml:23","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql.yml:24","Info: jobLevel 'contents' permission set to 'read': .github/workflows/osv-scanner.yml:26","Warn: jobLevel 'security-events' permission set to 'write': .github/workflows/osv-scanner.yml:27","Info: jobLevel 'contents' permission set to 'read': .github/workflows/scorecard.yml:20","Info: jobLevel 'actions' permission set to 'read': .github/workflows/scorecard.yml:21","Info: topLevel 'contents' permission set to 'read': .github/workflows/build-test.yml:11","Info: topLevel 'contents' permission set to 'read': .github/workflows/ci.yml:15","Info: topLevel 'contents' permission set to 'read': .github/workflows/codeql.yml:15","Info: topLevel 'contents' permission set to 'read': .github/workflows/dco.yml:12","Info: topLevel 'contents' permission set to 'read': .github/workflows/dependency-review.yml:7","Info: topLevel 'contents' permission set to 'read': .github/workflows/gitleaks.yml:13","Info: topLevel 'contents' permission set to 'read': .github/workflows/osv-scanner.yml:19","Info: topLevel permissions set to 'read-all': .github/workflows/scorecard.yml:11","Info: topLevel 'contents' permission set to 'read': .github/workflows/semantic-pr.yml:11","Info: topLevel 'contents' permission set to 'read': .github/workflows/zizmor.yml:11","Warn: topLevel 'security-events' permission set to 'write': .github/workflows/zizmor.yml:12"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#token-permissions"}},{"name":"SAST","score":10,"reason":"SAST tool detected: CodeQL","details":["Info: SAST configuration detected: CodeQL","Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":10,"reason":"all dependencies are pinned","details":["Info:  13 out of  13 GitHub-owned GitHubAction dependencies pinned","Info:  14 out of  14 third-party 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/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#pinned-dependencies"}},{"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/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#signed-releases"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#vulnerabilities"}},{"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/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#cii-best-practices"}},{"name":"Dependency-Update-Tool","score":0,"reason":"no update tool detected","details":["Warn: no dependency update tool configurations found"],"documentation":{"short":"Determines if the project uses a dependency update tool.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#dependency-update-tool"}},{"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/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#fuzzing"}},{"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/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#license"}},{"name":"Branch-Protection","score":6,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'main'","Info: 'force pushes' disabled on branch 'main'","Warn: 'branch protection settings apply to administrators' is disabled on branch 'main'","Info: 'stale review dismissal' is required to merge on branch 'main'","Warn: required approving review count is 1 on branch 'main'","Info: codeowner review is required on branch 'main'","Info: 'last push approval' is required to merge on branch 'main'","Warn: no status checks found to merge onto branch 'main'","Info: PRs are required in order to make changes on branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#branch-protection"}},{"name":"Contributors","score":3,"reason":"project has 1 contributing companies or organizations -- score normalized to 3","details":["Info: found contributions from: wisscore"],"documentation":{"short":"Determines if the project has a set of contributors from multiple organizations (e.g., companies).","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#contributors"}}]},"last_synced_at":"2026-04-30T17:22:49.034Z","repository_id":354873584,"created_at":"2026-04-30T17:22:49.034Z","updated_at":"2026-04-30T17:22:49.034Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32483406,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"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":["cgo","database","encryption","golang","sqlcipher","sqlite"],"created_at":"2026-05-01T03:02:08.519Z","updated_at":"2026-05-01T03:02:13.721Z","avatar_url":"https://github.com/WissCore.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-sqlcipher\n\n\u003e Self-contained Go driver for [SQLCipher](https://www.zetetic.net/sqlcipher/) — encrypted SQLite, audited, easy.\n\n\u003cp align=\"left\"\u003e\n  \u003ca href=\"LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-BSD--3--Clause-blue\" alt=\"License\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://pkg.go.dev/github.com/WissCore/go-sqlcipher/v4\"\u003e\u003cimg src=\"https://pkg.go.dev/badge/github.com/WissCore/go-sqlcipher/v4.svg\" alt=\"Go Reference\"\u003e\u003c/a\u003e\n  \u003ca href=\"SECURITY.md\"\u003e\u003cimg src=\"https://img.shields.io/badge/security-policy-orange\" alt=\"Security policy\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nA Go driver for SQLite that keeps every database file encrypted at rest with\nSQLCipher's audited AES-256 + HMAC-SHA-512 page format. Implements the standard\n`database/sql` interface, so any code that already speaks `database/sql` works\nunchanged — open the connection with a key, every read and write is encrypted\non the way to disk and decrypted on the way back.\n\n## Status\n\nThis package was originally written and maintained by Frank Braun and\ncontributors at [`mutecomm/go-sqlcipher`](https://github.com/mutecomm/go-sqlcipher)\nbetween 2017 and 2020. The upstream repository has not received commits since\nDecember 2020 and was flagged abandoned by automated dependency scanners; we\nforked it to resume maintenance, follow the SQLCipher upstream release cadence,\nand keep the supply-chain hygiene current.\n\nWe are deeply grateful for the original authors' work. Their architecture,\ntest suite, and tracking scripts (`track_go-sqlite3.sh`, `track_libtomcrypt.sh`)\nare the backbone of this fork; we are following the structure they laid down,\njust keeping the vendored sources fresh. See [`CONTRIBUTORS.md`](CONTRIBUTORS.md)\nfor full credits.\n\n## What's different from upstream\n\n- Vendored SQLCipher amalgamation tracks the latest [`sqlcipher/sqlcipher`](https://github.com/sqlcipher/sqlcipher)\n  release (currently v4.15.0). Quarterly bumps via a scripted `Makefile` target.\n- Vendored SQLite amalgamation follows the SQLCipher upstream snapshot\n  (currently 3.53.0).\n- Vendored libtomcrypt sources updated in lockstep.\n- Reproducible CI: `golangci-lint`, `gosec`, `govulncheck`, `osv-scanner`,\n  `gitleaks`, `trufflehog`, `addlicense`, `actionlint`, `zizmor` on every PR.\n- Signed releases: cosign keyless signature, SBOM (SPDX), SLSA build provenance.\n- Pinned tool versions via [`mise`](https://mise.jdx.dev) so local pre-commit\n  hooks and CI run the same scanners with the same arguments.\n\nWe did not change the public Go API. Code that imports\n`github.com/mutecomm/go-sqlcipher/v4` switches with a single line in `go.mod`:\n\n```go\nrequire github.com/WissCore/go-sqlcipher/v4 v4.15.0\n```\n\n```sh\ngo mod edit -replace github.com/mutecomm/go-sqlcipher/v4=github.com/WissCore/go-sqlcipher/v4@v4.15.0\ngo mod tidy\n```\n\n## Why a Go SQLCipher driver matters\n\nSQLCipher is the most widely audited open-source approach to file-level\nSQLite encryption — used in Mozilla, Microsoft, Adobe, and countless\nsecurity-sensitive applications. It encrypts every database page with AES-256\nin CBC mode and authenticates each page with HMAC-SHA-512, so a stolen disk\nimage, a leaked backup, or a mistyped `aws s3 cp` reveals only ciphertext.\n\nGo applications that need that property had to depend on a fork that fell\nbehind the SQLCipher release cadence years ago — bringing along old SQLite\nversions and unpatched CVEs. This fork brings the Go ecosystem back in step\nwith what SQLCipher upstream actually ships today.\n\n## Install\n\n```sh\ngo get github.com/WissCore/go-sqlcipher/v4\n```\n\n## Use\n\n```go\nimport (\n    \"database/sql\"\n    \"fmt\"\n\n    _ \"github.com/WissCore/go-sqlcipher/v4\"\n)\n\nfunc main() {\n    key := \"2DD29CA851E7B56E4697B0E1F08507293D761A05CE4D1B628663F411A8086D99\"\n    dsn := fmt.Sprintf(\"db?_pragma_key=x'%s'\u0026_pragma_cipher_page_size=4096\", key)\n    db, err := sql.Open(\"sqlite3\", dsn)\n    if err != nil {\n        panic(err)\n    }\n    defer db.Close()\n    // ...regular database/sql calls from here on; everything is encrypted.\n}\n```\n\n`_pragma_key` accepts a hex blob (64 characters for a 32-byte key) or a URL-\nescaped passphrase that goes through SQLCipher's PBKDF2 key derivation. See\nthe [SQLCipher API documentation](https://www.zetetic.net/sqlcipher/sqlcipher-api/)\nfor the full set of PRAGMAs.\n\n`sqlite3.IsEncrypted(path)` reports whether a given file already has a\nSQLCipher header.\n\nWorking examples live under [`_example/`](_example/).\n\n## Building\n\nThe package is self-contained — the only external requirement is a C\ncompiler (typically `gcc` or `clang`) and OpenSSL development headers for\nlinking `libcrypto`. The vendored sources compile via the standard `cgo`\nbuild pipeline:\n\n```sh\ngo build ./...\ngo test -race ./...\n```\n\nFor exotic platforms (musl, static linking, Apple Silicon cross-compile)\nsee [`docs/building.md`](docs/building.md).\n\n## Updating SQLCipher\n\nA `Makefile` target wraps the amalgamation refresh:\n\n```sh\nmake update-sqlcipher VERSION=4.15.0\nmake test\n```\n\nThis downloads the SQLCipher source archive from\n[`sqlcipher/sqlcipher`](https://github.com/sqlcipher/sqlcipher), runs their\nbuild to produce the standalone `sqlite3.c` / `sqlite3.h` files, and replaces\nthe vendored copies. The full procedure, including how to verify upstream\nsignatures, is documented in [`MAINTAINERS.md`](MAINTAINERS.md).\n\n## Security\n\nWe treat this as security-critical infrastructure for our own messenger\nproject and run it with the same supply-chain rigour we apply there:\n\n- Every release is signed with cosign and ships an SBOM and SLSA build\n  provenance attestation\n- Pinned tool versions and SHA-pinned GitHub Actions\n- Weekly OSV-scanner and CodeQL re-runs on `main`\n- Vulnerability disclosure: see [`SECURITY.md`](SECURITY.md)\n\nIf you find a vulnerability, please report it privately per the security\npolicy, not through a public issue.\n\n## Compatibility\n\n- Go ≥ 1.21 (we follow [Go's official release support window](https://go.dev/doc/devel/release#policy))\n- SQLCipher 4.x format (databases created by SQLCipher 3.x require\n  [`PRAGMA cipher_migrate`](https://www.zetetic.net/sqlcipher/sqlcipher-api/#cipher_migrate)\n  before they will open under this driver)\n- Linux, macOS, FreeBSD; Windows builds work but are not part of CI\n  matrix yet — contributions welcome\n\n## Contributing\n\nWe are a small team primarily focused on our own use case (an end-to-end\nencrypted messenger). That said, we benefit directly from the community\nthat built this driver before us, so we want to keep this fork open and\nuseful to others:\n\n- Issues are triaged on a best-effort basis; security reports take priority\n- Pull requests are welcome — please read [`CONTRIBUTING.md`](CONTRIBUTING.md)\n- Conventional Commits 1.0 + DCO sign-off + GPG-signed commits are required\n  by the pre-commit hooks (`lefthook` config in repo)\n\nIf you would like to step up as a co-maintainer, please open a discussion.\n\n## Lineage\n\n```text\nsqlite.org/sqlite           — public-domain SQLite (Hwaci)\n  └── sqlcipher/sqlcipher   — SQLite + AES-256 page encryption (Zetetic, BSD-3)\n        └── mattn/go-sqlite3 — Go cgo binding to SQLite (Yasuhiro Matsumoto, MIT)\n              └── mutecomm/go-sqlcipher — first SQLCipher Go binding (Frank Braun, BSD-3) ← origin of this fork\n                    └── WissCore/go-sqlcipher — this fork, resumed maintenance from 2026-04\n```\n\nSee [`NOTICE`](NOTICE) for the full attribution chain and\n[`LICENSE`](LICENSE) for the legal notices.\n\n## License\n\nBSD-3-Clause. The vendored SQLCipher, SQLite, libtomcrypt, and mattn/go-sqlite3\nsources keep their original licenses (BSD-3-Clause-with-patent, public\ndomain, public domain, and MIT respectively); see [`LICENSE`](LICENSE) for\nthe combined notice.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwisscore%2Fgo-sqlcipher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwisscore%2Fgo-sqlcipher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwisscore%2Fgo-sqlcipher/lists"}