{"id":19298248,"url":"https://github.com/casbin/zap-logger","last_synced_at":"2026-02-01T10:00:59.019Z","repository":{"id":41890273,"uuid":"305955393","full_name":"casbin/zap-logger","owner":"casbin","description":"Zap logger for Casbin","archived":false,"fork":false,"pushed_at":"2023-09-24T12:07:13.000Z","size":28,"stargazers_count":5,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-13T06:22:59.189Z","etag":null,"topics":["abac","access-control","acl","auth","authz","casbin","log","logger","rbac","zap"],"latest_commit_sha":null,"homepage":"https://github.com/casbin/casbin","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/casbin.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},"funding":{"github":"casbin"}},"created_at":"2020-10-21T08:18:02.000Z","updated_at":"2023-09-27T06:00:07.000Z","dependencies_parsed_at":"2022-08-11T20:20:38.242Z","dependency_job_id":"43a7a160-c9a5-4085-8272-3ff6388f1297","html_url":"https://github.com/casbin/zap-logger","commit_stats":{"total_commits":9,"total_committers":7,"mean_commits":"1.2857142857142858","dds":0.7777777777777778,"last_synced_commit":"871ffedb5ca34e031abb15953b82aca4739c2dc6"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/casbin/zap-logger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casbin%2Fzap-logger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casbin%2Fzap-logger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casbin%2Fzap-logger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casbin%2Fzap-logger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/casbin","download_url":"https://codeload.github.com/casbin/zap-logger/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casbin%2Fzap-logger/sbom","scorecard":{"id":267058,"data":{"date":"2025-08-11","repo":{"name":"github.com/casbin/zap-logger","commit":"871ffedb5ca34e031abb15953b82aca4739c2dc6"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.1,"checks":[{"name":"Code-Review","score":8,"reason":"Found 8/9 approved changesets -- score normalized to 8","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":"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":"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":"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":["Warn: no topLevel permission defined: .github/workflows/build.yml:1","Warn: no topLevel permission defined: .github/workflows/ci.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":"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/build.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/casbin/zap-logger/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/casbin/zap-logger/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:47: update your workflow using https://app.stepsecurity.io/secureworkflow/casbin/zap-logger/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:51: update your workflow using https://app.stepsecurity.io/secureworkflow/casbin/zap-logger/build.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:57: update your workflow using https://app.stepsecurity.io/secureworkflow/casbin/zap-logger/build.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:66: update your workflow using https://app.stepsecurity.io/secureworkflow/casbin/zap-logger/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/casbin/zap-logger/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/casbin/zap-logger/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/casbin/zap-logger/ci.yml/master?enable=pin","Warn: goCommand not pinned by hash: .github/workflows/ci.yml:24","Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:39","Info:   0 out of   7 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned","Info:   0 out of   1 goCommand dependencies pinned","Info:   0 out of   1 npmCommand 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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: 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":"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 11 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":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2022-0603 / GHSA-hp87-p4gw-j4gq"],"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-17T12:21:40.720Z","repository_id":41890273,"created_at":"2025-08-17T12:21:40.720Z","updated_at":"2025-08-17T12:21:40.720Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28975278,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T09:57:52.632Z","status":"ssl_error","status_checked_at":"2026-02-01T09:57:49.143Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["abac","access-control","acl","auth","authz","casbin","log","logger","rbac","zap"],"created_at":"2024-11-09T23:07:23.445Z","updated_at":"2026-02-01T10:00:59.012Z","avatar_url":"https://github.com/casbin.png","language":"Go","funding_links":["https://github.com/sponsors/casbin"],"categories":[],"sub_categories":[],"readme":"\n\u003ch1 align=\"center\" style=\"border-bottom: none;\"\u003eZap Logger\u003c/h1\u003e\n\u003ch3 align=\"center\"\u003eZap logger is the Zap logger for Casbin. With this library, Casbin can log information more powerful.\u003c/h3\u003e\n\u003cdiv class=\"labels\"\u003e\n  \u003cp  align=\"center\"\u003e\n    \u003ca href=\"https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg\"\u003e\n      \u003cimg src=\"https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg\" alt=\"semantic-release\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://goreportcard.com/report/github.com/casbin/zap-logger\"\u003e\n      \u003cimg src=\"https://goreportcard.com/badge/github.com/casbin/zap-logger\" alt=\"Go Report Card\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://coveralls.io/github/casbin/zap-logger?branch=master\"\u003e\n      \u003cimg src=\"https://coveralls.io/repos/github/casbin/zap-logger/badge.svg?branch=master\" alt=\"Coverage Status\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://pkg.go.dev/github.com/casbin/zap-logger/v2\"\u003e\n      \u003cimg src=\"https://godoc.org/github.com/casbin/zap-logger?status.svg\" alt=\"Godoc\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/casbin/zap-logger/releases/latest\"\u003e\n      \u003cimg src=\"https://img.shields.io/github/release/casbin/zap-logger.svg\" alt=\"Release\"\u003e\n    \u003c/a\u003e\n  \u003c/p\u003e\n    \n  \u003cp  align=\"center\"\u003e\n    \u003ca href=\"https://github.com/casbin/zap-logger/blob/master/LICENSE\"\u003e\n      \u003cimg src=\"https://img.shields.io/github/license/casbin/zap-logger?style=flat-square\" alt=\"license\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/casbin/zap-logger/issues\"\u003e\n      \u003cimg src=\"https://img.shields.io/github/issues/casbin/zap-logger?style=flat-square\" alt=\"GitHub issues\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"#\"\u003e\n      \u003cimg src=\"https://img.shields.io/github/stars/casbin/zap-logger?style=flat-square\" alt=\"GitHub stars\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/casbin/zap-logger/network\"\u003e\n      \u003cimg src=\"https://img.shields.io/github/forks/casbin/zap-logger?style=flat-square\" alt=\"GitHub forks\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://discord.gg/5rPsrAzK7S\"\u003e\n      \u003cimg src=\"https://img.shields.io/discord/1022748306096537660?style=flat-square\u0026logo=discord\u0026label=discord\u0026color=5865F2\" alt=\"Discord\"\u003e\n    \u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n## Installation\n\n    go get github.com/casbin/zap-logger\n\n## How to use it\n\nYou could import the zap-logger module like:\n```\nimport (\n    zaplogger \"github.com/casbin/zap-logger/v3\"\n    \"github.com/casbin/casbin/v3\"\n)\n```\nYou could let your enforcer use this logger when you first initialize your enforcer like:\n```go\ne, _ := casbin.NewEnforcer(\"examples/rbac_model.conf\", a)\ne.EnableLog(true)\ne.SetLogger(zaplogger.NewLogger(true, true))\n```\nor with and existing zap instance.\n```go\nlogger := zaplogger.NewLoggerByZap(yourZapLogger, true)\ne, _ := casbin.NewEnforcer(\"examples/rbac_model.conf\", a)\ne.EnableLog(true)\ne.SetLogger(logger)\n```\n\nAnd the method `NewLogger` have two params: enabled and jsonEncode, you could initialize logger's log status and decide whether to output information with json encoded or not.\n\n## Getting Help\n\n- [Casbin](https://github.com/casbin/casbin)\n\n## License\n\nThis project is under Apache 2.0 License. See the [LICENSE](LICENSE) file for the full license text.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcasbin%2Fzap-logger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcasbin%2Fzap-logger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcasbin%2Fzap-logger/lists"}