{"id":19177720,"url":"https://github.com/jessety/simple-hmac-auth-express","last_synced_at":"2026-03-07T02:32:39.716Z","repository":{"id":57360220,"uuid":"198336378","full_name":"jessety/simple-hmac-auth-express","owner":"jessety","description":"Express middleware for creating APIs that implement hmac signatures","archived":false,"fork":false,"pushed_at":"2025-03-27T11:10:55.000Z","size":73,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-20T05:52:16.685Z","etag":null,"topics":["api-security","express","express-middleware","hmac-authentication","request-signatures","request-signing","simple-hmac-auth"],"latest_commit_sha":null,"homepage":"https://npmjs.com/package/simple-hmac-auth-express","language":"TypeScript","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/jessety.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}},"created_at":"2019-07-23T02:28:40.000Z","updated_at":"2024-07-22T20:04:20.000Z","dependencies_parsed_at":"2025-05-07T20:41:47.166Z","dependency_job_id":"afaa7f97-1bc7-4ff7-92c8-14ef9a89d1f2","html_url":"https://github.com/jessety/simple-hmac-auth-express","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/jessety/simple-hmac-auth-express","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jessety%2Fsimple-hmac-auth-express","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jessety%2Fsimple-hmac-auth-express/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jessety%2Fsimple-hmac-auth-express/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jessety%2Fsimple-hmac-auth-express/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jessety","download_url":"https://codeload.github.com/jessety/simple-hmac-auth-express/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jessety%2Fsimple-hmac-auth-express/sbom","scorecard":{"id":516636,"data":{"date":"2025-08-11","repo":{"name":"github.com/jessety/simple-hmac-auth-express","commit":"be9ff6afc03bc23a38d122fbf1a69b6aec1f6a01"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"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":"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":"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Warn: no topLevel permission defined: .github/workflows/coverage.yml:1","Warn: no topLevel permission defined: .github/workflows/publish.yml:1","Warn: no topLevel permission defined: .github/workflows/release.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":"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":"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/ci.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/jessety/simple-hmac-auth-express/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/jessety/simple-hmac-auth-express/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/jessety/simple-hmac-auth-express/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/jessety/simple-hmac-auth-express/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/jessety/simple-hmac-auth-express/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/jessety/simple-hmac-auth-express/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/coverage.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/jessety/simple-hmac-auth-express/coverage.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/coverage.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/jessety/simple-hmac-auth-express/coverage.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/coverage.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/jessety/simple-hmac-auth-express/coverage.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/jessety/simple-hmac-auth-express/publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/jessety/simple-hmac-auth-express/publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/jessety/simple-hmac-auth-express/publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/jessety/simple-hmac-auth-express/publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/jessety/simple-hmac-auth-express/publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/jessety/simple-hmac-auth-express/publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/jessety/simple-hmac-auth-express/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/jessety/simple-hmac-auth-express/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/jessety/simple-hmac-auth-express/release.yml/main?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:53","Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:18","Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:38","Warn: npmCommand not pinned by hash: .github/workflows/coverage.yml:21","Warn: npmCommand not pinned by hash: .github/workflows/publish.yml:21","Info:   0 out of  17 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   5 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":"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":"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":"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":"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":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for 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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-20T01:59:07.065Z","repository_id":57360220,"created_at":"2025-08-20T01:59:07.065Z","updated_at":"2025-08-20T01:59:07.065Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30206069,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T19:07:06.838Z","status":"online","status_checked_at":"2026-03-07T02:00:06.765Z","response_time":53,"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":["api-security","express","express-middleware","hmac-authentication","request-signatures","request-signing","simple-hmac-auth"],"created_at":"2024-11-09T10:34:51.642Z","updated_at":"2026-03-07T02:32:39.687Z","avatar_url":"https://github.com/jessety.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# simple-hmac-auth-express\n\nExpress middleware for creating APIs that implement [simple-hmac-auth](https://github.com/jessety/simple-hmac-auth).\n\n[![ci](https://github.com/jessety/simple-hmac-auth-express/workflows/ci/badge.svg)](https://github.com/jessety/simple-hmac-auth-express/actions)\n[![coverage](https://codecov.io/gh/jessety/simple-hmac-auth-express/branch/main/graph/badge.svg?token=L2TEZZKSVJ)](https://codecov.io/gh/jessety/simple-hmac-auth-express)\n[![npm](https://img.shields.io/npm/v/simple-hmac-auth-express.svg)](https://www.npmjs.com/package/simple-hmac-auth-express)\n[![license](https://img.shields.io/github/license/jessety/simple-hmac-auth-koa.svg)](https://github.com/jessety/simple-hmac-auth-express/blob/master/LICENSE)\n\n## Usage\n\nTwo parameters are required. `secretForKey` must be a function that returns a promise with the secret for a specified API key, and `onRejected` must be a function that handles requests that have failed authentication.\n\n```javascript\nconst auth = require('simple-hmac-auth-express')\n\napp.use(auth({\n\n  // Return a promise that resolves with the secret for the specified API key\n  secretForKey: async (apiKey) =\u003e {\n    return 'SECRET';\n  },\n\n  // Handle requests that have failed authentication\n  onRejected: (error, request, response, next) =\u003e {\n    console.log(`\"${request.apiKey}\" failed authentication: ${request.method} ${request.url}`);\n    response.status(401).json({\n      error: {\n        message: error.message\n      }\n    });\n  },\n  \n  // Optional\n  onAccepted: (request, response) =\u003e {\n    console.log(`\"${request.apiKey}\" authenticated request to ${request.method} ${request.url} with signature \"${request.signature}\"`);\n  }\n}));\n```\n\nBecause the unparsed body of the request must be loaded and hashed to authenticate, the included middleware also handles parsing the request body. If you would like to parse the contents of the request body, use the same parameters as [body-parser](https://github.com/expressjs/body-parser) in the `body` node:\n\n```javascript\nconst auth = require('simple-hmac-auth-express')\n\napp.use(auth({\n\n  // Required\n  secretForKey: (apiKey, callback) =\u003e callback(null, 'secret'),\n  onRejected: (error, request, response, next) =\u003e response.status(401).end('401'),\n  onAccepted: (request, response) =\u003e console.log(`authenticated ${request.method} ${request.url}`)\n\n  // Body-parser options. All optional.\n  body: {\n    json: { strict: false, limit: '1mb' }\n    urlencoded: { extended: true, limit: '5mb' },\n    text: { type: 'application/octet-stream' }\n  }\n}));\n```\n\n## License\n\nMIT © Jesse Youngblood\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjessety%2Fsimple-hmac-auth-express","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjessety%2Fsimple-hmac-auth-express","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjessety%2Fsimple-hmac-auth-express/lists"}