{"id":22433704,"url":"https://github.com/gavinning/signature","last_synced_at":"2025-09-05T13:45:02.506Z","repository":{"id":57093692,"uuid":"260838168","full_name":"gavinning/signature","owner":"gavinning","description":"简单签名认证","archived":false,"fork":false,"pushed_at":"2020-10-15T15:40:20.000Z","size":155,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-12T08:49:33.870Z","etag":null,"topics":["sign","signature","simple-sign","simple-signature"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gavinning.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-03T05:56:30.000Z","updated_at":"2020-10-15T15:40:23.000Z","dependencies_parsed_at":"2022-08-22T21:40:25.803Z","dependency_job_id":null,"html_url":"https://github.com/gavinning/signature","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/gavinning/signature","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavinning%2Fsignature","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavinning%2Fsignature/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavinning%2Fsignature/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavinning%2Fsignature/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gavinning","download_url":"https://codeload.github.com/gavinning/signature/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavinning%2Fsignature/sbom","scorecard":{"id":420016,"data":{"date":"2025-08-11","repo":{"name":"github.com/gavinning/signature","commit":"42c9574e9ec3f8e4b4126693240d729c08e29e6c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.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":"SAST","score":0,"reason":"no SAST tool detected","details":["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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"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":"Code-Review","score":0,"reason":"Found 0/10 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":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":-1,"reason":"no dependencies found","details":null,"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":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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"}},{"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":"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"}}]},"last_synced_at":"2025-08-19T00:57:37.371Z","repository_id":57093692,"created_at":"2025-08-19T00:57:37.371Z","updated_at":"2025-08-19T00:57:37.371Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273767403,"owners_count":25164461,"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-09-05T02:00:09.113Z","response_time":402,"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":["sign","signature","simple-sign","simple-signature"],"created_at":"2024-12-05T22:15:42.572Z","updated_at":"2025-09-05T13:44:57.487Z","avatar_url":"https://github.com/gavinning.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Signature\n---\n简单签名认证，默认采用hmac-sha256加密，应对大多数场景足够用了\n\n### Install\n```sh\nnpm i @4a/sign\n```\n\n\n### Usage\n```js\nconst Sign = require('@4a/sign')\nconst sign = new Sign({ appId, appSecret })\n```\n**创建签名**\n```js\nparams = sign.append(params)\n\n// Or\nparams.sign = sign.create(params)\n```\n**验证签名**\n```js\nsign.verify(params) // 此时params包含sign\n```\n\n### Options 实例化参数\n```yaml\nappId: test\nappSecret: test\n\n# 可选参数\ndebug: false # 调试模式，显示调试日志\nredis: new Redis() # ioredis实例，允许为空，为空则verify方法不验证once字段\ntimeout: 300 # 单位分，默认5分钟\n```\n\n### 公共签名参数\n请求参数字段应避免与签名参数字段冲突\n```yaml\n# 商户id\nappId\n\n\n# 一次性随机字符串\n# 推荐为空，为空时自动生成，大多数场景无须主动设置\n# options.redis参数存在时会验证该参数，有效防止重放攻击\nonce\n\n\n# 签名时间戳\n# 用于验证签名是否过期，默认5分钟\n# 推荐为空，为空时自动生成，大多数场景无须主动设置\ntimestamp \n```\n\n\n### Example\n```sh\nnode demo.js\n```\n**签名结果示例**\n```\nBC6AE3D7628B554F8624548327446B0A977A4EC12D48FC855ED783254105EDD3\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgavinning%2Fsignature","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgavinning%2Fsignature","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgavinning%2Fsignature/lists"}