{"id":16299459,"url":"https://github.com/tommy351/zap-stackdriver","last_synced_at":"2025-10-07T09:53:13.925Z","repository":{"id":57481456,"uuid":"103807885","full_name":"tommy351/zap-stackdriver","owner":"tommy351","description":"Prints Stackdriver format logs with zap.","archived":false,"fork":false,"pushed_at":"2022-05-16T15:49:48.000Z","size":20,"stargazers_count":34,"open_issues_count":3,"forks_count":13,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-01T09:03:16.726Z","etag":null,"topics":["golang","golang-library","golang-package","logging","zap","zap-stackdriver"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/tommy351/zap-stackdriver","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/tommy351.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}},"created_at":"2017-09-17T06:23:33.000Z","updated_at":"2024-12-26T23:20:31.000Z","dependencies_parsed_at":"2022-09-19T18:23:56.892Z","dependency_job_id":null,"html_url":"https://github.com/tommy351/zap-stackdriver","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/tommy351/zap-stackdriver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tommy351%2Fzap-stackdriver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tommy351%2Fzap-stackdriver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tommy351%2Fzap-stackdriver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tommy351%2Fzap-stackdriver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tommy351","download_url":"https://codeload.github.com/tommy351/zap-stackdriver/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tommy351%2Fzap-stackdriver/sbom","scorecard":{"id":892984,"data":{"date":"2025-08-11","repo":{"name":"github.com/tommy351/zap-stackdriver","commit":"0055c77b095fc9cfe970e7474f97792f643b79c3"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/test.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":"Code-Review","score":2,"reason":"Found 3/15 approved changesets -- score normalized to 2","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":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":"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":"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/test.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/tommy351/zap-stackdriver/test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/tommy351/zap-stackdriver/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/tommy351/zap-stackdriver/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/tommy351/zap-stackdriver/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/tommy351/zap-stackdriver/test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/tommy351/zap-stackdriver/test.yml/master?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 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/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":"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":"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":"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":"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":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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 6 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":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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T12:34:33.585Z","repository_id":57481456,"created_at":"2025-08-24T12:34:33.585Z","updated_at":"2025-08-24T12:34:33.585Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278755147,"owners_count":26040034,"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-10-07T02:00:06.786Z","response_time":59,"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":["golang","golang-library","golang-package","logging","zap","zap-stackdriver"],"created_at":"2024-10-10T20:48:06.105Z","updated_at":"2025-10-07T09:53:13.909Z","avatar_url":"https://github.com/tommy351.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zap-stackdriver\n\n[![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/tommy351/zap-stackdriver)](https://github.com/tommy351/zap-stackdriver/releases) [![go.dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go\u0026logoColor=white)](https://pkg.go.dev/github.com/tommy351/zap-stackdriver) ![Test](https://github.com/tommy351/zap-stackdriver/workflows/Test/badge.svg) [![codecov](https://codecov.io/gh/tommy351/zap-stackdriver/branch/master/graph/badge.svg)](https://codecov.io/gh/tommy351/zap-stackdriver)\n\nPrints [Stackdriver format](https://cloud.google.com/error-reporting/docs/formatting-error-messages) logs with [zap](https://github.com/uber-go/zap).\n\n## Installation\n\n``` sh\ngo get github.com/tommy351/zap-stackdriver\n```\n\n## Usage\n\n``` go\npackage main\n\nimport (\n\t\"github.com/tommy351/zap-stackdriver\"\n\t\"go.uber.org/zap\"\n\t\"go.uber.org/zap/zapcore\"\n)\n\nfunc main() {\n\tconfig := \u0026zap.Config{\n\t\tLevel:            zap.NewAtomicLevelAt(zapcore.InfoLevel),\n\t\tEncoding:         \"json\",\n\t\tEncoderConfig:    stackdriver.EncoderConfig,\n\t\tOutputPaths:      []string{\"stdout\"},\n\t\tErrorOutputPaths: []string{\"stderr\"},\n\t}\n\n\tlogger, err := config.Build(zap.WrapCore(func(core zapcore.Core) zapcore.Core {\n\t\treturn \u0026stackdriver.Core{\n\t\t\tCore: core,\n\t\t}\n\t}), zap.Fields(\n\t\tstackdriver.LogServiceContext(\u0026stackdriver.ServiceContext{\n\t\t\tService: \"foo\",\n\t\t\tVersion: \"bar\",\n\t\t}),\n\t))\n\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tlogger.Info(\"Hello\",\n\t\tstackdriver.LogUser(\"token\"),\n\t\tstackdriver.LogHTTPRequest(\u0026stackdriver.HTTPRequest{\n\t\t\tMethod:             \"GET\",\n\t\t\tURL:                \"/foo\",\n\t\t\tUserAgent:          \"bar\",\n\t\t\tReferrer:           \"baz\",\n\t\t\tResponseStatusCode: 200,\n\t\t\tRemoteIP:           \"1.2.3.4\",\n\t\t}))\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftommy351%2Fzap-stackdriver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftommy351%2Fzap-stackdriver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftommy351%2Fzap-stackdriver/lists"}