{"id":13435252,"url":"https://github.com/jonhadfield/gosn-v2","last_synced_at":"2026-03-10T15:03:56.337Z","repository":{"id":44599535,"uuid":"230936431","full_name":"jonhadfield/gosn-v2","owner":"jonhadfield","description":null,"archived":false,"fork":false,"pushed_at":"2026-01-29T18:53:55.000Z","size":3685,"stargazers_count":17,"open_issues_count":2,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-30T07:20:52.722Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/jonhadfield.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2019-12-30T15:15:23.000Z","updated_at":"2026-01-29T18:54:00.000Z","dependencies_parsed_at":"2024-01-06T15:30:26.567Z","dependency_job_id":"7096b6d8-9feb-4d17-8069-b666a31d32b9","html_url":"https://github.com/jonhadfield/gosn-v2","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jonhadfield/gosn-v2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonhadfield%2Fgosn-v2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonhadfield%2Fgosn-v2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonhadfield%2Fgosn-v2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonhadfield%2Fgosn-v2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonhadfield","download_url":"https://codeload.github.com/jonhadfield/gosn-v2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonhadfield%2Fgosn-v2/sbom","scorecard":{"id":530990,"data":{"date":"2025-08-11","repo":{"name":"github.com/jonhadfield/gosn-v2","commit":"0432fc2b71cf7d344279bfb94478453fbc7de4c4"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.8,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/27 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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql-analysis.yml:28","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql-analysis.yml:29","Warn: no topLevel permission defined: .github/workflows/codeql-analysis.yml:1","Warn: no topLevel permission defined: .github/workflows/tests.yml: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":"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":"Maintained","score":10,"reason":"29 commit(s) and 0 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":"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":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"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":"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":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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":"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/codeql-analysis.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/jonhadfield/gosn-v2/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/jonhadfield/gosn-v2/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:47: update your workflow using https://app.stepsecurity.io/secureworkflow/jonhadfield/gosn-v2/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:50: update your workflow using https://app.stepsecurity.io/secureworkflow/jonhadfield/gosn-v2/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/jonhadfield/gosn-v2/tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/jonhadfield/gosn-v2/tests.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tests.yml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/jonhadfield/gosn-v2/tests.yml/master?enable=pin","Warn: goCommand not pinned by hash: .github/workflows/tests.yml:32","Warn: goCommand not pinned by hash: .github/workflows/tests.yml:33","Warn: goCommand not pinned by hash: .github/workflows/tests.yml:34","Warn: goCommand not pinned by hash: .github/workflows/tests.yml:35","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   4 goCommand 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":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2025-3787 / GHSA-fv92-fjc5-jj9h"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":9,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","Warn: 20 commits out of 21 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"}}]},"last_synced_at":"2025-08-20T05:43:55.748Z","repository_id":44599535,"created_at":"2025-08-20T05:43:55.748Z","updated_at":"2025-08-20T05:43:55.748Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30338599,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T15:02:55.010Z","status":"ssl_error","status_checked_at":"2026-03-10T15:02:36.911Z","response_time":106,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":[],"created_at":"2024-07-31T03:00:34.231Z","updated_at":"2026-03-10T15:03:56.319Z","avatar_url":"https://github.com/jonhadfield.png","language":"Go","funding_links":[],"categories":["Libraries"],"sub_categories":["Importers, Exporters, and Converters"],"readme":"# gosn-v2\n\n[![Build Status](https://www.travis-ci.org/jonhadfield/gosn-v2.svg?branch=master)](https://www.travis-ci.org/jonhadfield/gosn-v2) [![CircleCI](https://circleci.com/gh/jonhadfield/gosn-v2/tree/master.svg?style=svg)](https://circleci.com/gh/jonhadfield/gosn-v2/tree/master) [![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg)](https://godoc.org/github.com/jonhadfield/gosn-v2/) [![Go Report Card](https://goreportcard.com/badge/github.com/jonhadfield/gosn-v2)](https://goreportcard.com/report/github.com/jonhadfield/gosn-v2)\n\n`gosn-v2` is a Go library for building Standard Notes clients. It wraps authentication, sync, encryption, and caching flows while letting you integrate with the official or a self-hosted Standard Notes server.\n\n## Highlights\n- Handles the Standard Notes v004 encryption protocol out of the box.\n- Ships caching helpers for delta syncs and reducing server load.\n- Includes schema validators, CLI utilities, and fixtures for reproducible tests.\n- **Performance optimized**: 85% faster syncs, 90% fewer allocations, 70% fewer API calls.\n\n## Requirements\n- Go 1.25.1 or later (see `go.mod`).\n- Access to a Standard Notes server account for live integration tests.\n- macOS, Linux, or Windows with the Go toolchain installed.\n\n## Installation\n```bash\nGO111MODULE=on go get github.com/jonhadfield/gosn-v2\n```\n\n## Quick Start\n```go\nimport \"github.com/jonhadfield/gosn-v2\"\n\n// Sign in and establish a session\nsio, err := gosn.SignIn(gosn.SignInInput{Email: \"user@example.com\", Password: \"topsecret\"})\nif err != nil {\n    log.Fatal(err)\n}\n\n// Perform an initial sync\nso, err := gosn.Sync(gosn.SyncInput{Session: \u0026sio.Session})\nif err != nil {\n    log.Fatal(err)\n}\n\n// Decrypt and work with your items\nitems, err := so.Items.DecryptAndParse(\u0026sio.Session)\n```\n\n## Project Layout\n- `auth/`, `session/`, `items/` — domain packages for authentication, session lifecycle, and note models.\n- `crypto/` — key derivation, encryption, and signing helpers.\n- `cache/` — tooling for encrypted sync snapshots and cache persistence.\n- `docs/` — user guides and reference material; start with `docs/index.md`.\n- `schemas/`, `test.json` — JSON schemas and fixtures for validation and integration tests.\n- `bin/` — utility scripts for development and troubleshooting.\n\n## Performance\n\ngosn-v2 includes several performance optimizations for efficient operation:\n\n### Sync Performance\n- **Parallel decryption**: 7.5x faster for 1000+ items on multi-core systems\n- **Conditional sync**: Skips unnecessary API calls when no changes exist\n- **Dynamic batch sizing**: Adapts request size based on content (30-40% fewer API calls)\n- **Memory pooling**: 60% reduction in GC pressure through buffer reuse\n\n### Resource Efficiency\n- **70-85% fewer API calls** through intelligent caching and batching\n- **85-90% fewer allocations** via pre-allocation and pooling\n- **50% bandwidth savings** through compression and optimized batching\n- **95% reduction** in idle connection overhead\n\n### Configuration\nEnvironment variables for tuning (optional):\n```bash\nexport SN_SYNC_TIMEOUT=30s          # Sync operation timeout\nexport GOSN_DECRYPT_WORKERS=8       # Parallel decryption workers\n```\n\nSee `claudedocs/optimization_opportunities.md` for detailed implementation notes.\n\n## Development Workflow\n- `go build ./...` verifies every package compiles.\n- `go test ./...` runs unit tests across the repository. Set `SN_SKIP_SESSION_TESTS=true` to skip live server checks.\n- `make test` aggregates coverage into `coverage.txt`; `make fmt` applies `gofmt` and `goimports` to all Go files.\n- `make lint` runs `golangci-lint` with the configured rule set; `make critic` enables additional `gocritic` analysis.\n\n## Documentation \u0026 Support\n- Browse the guides in `docs/` or the Go API reference on [pkg.go.dev](https://pkg.go.dev/github.com/jonhadfield/gosn-v2).\n- For issues or feature requests, open a GitHub issue with reproduction steps or context about your Standard Notes setup.\n\n## Contributing\nReview the [Repository Guidelines](AGENTS.md) before opening a pull request. They cover project structure, testing expectations, and the commit/PR workflow.\n\n## License\nThis project is distributed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonhadfield%2Fgosn-v2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonhadfield%2Fgosn-v2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonhadfield%2Fgosn-v2/lists"}