{"id":42671149,"url":"https://github.com/calibr/node-s3layer","last_synced_at":"2026-01-29T11:00:05.337Z","repository":{"id":28280532,"uuid":"31791340","full_name":"calibr/node-s3layer","owner":"calibr","description":"The layer between S3 and Internet that aims to authorize access to objects","archived":false,"fork":false,"pushed_at":"2022-12-06T19:05:17.000Z","size":51,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-21T03:34:08.810Z","etag":null,"topics":["acl","connect","express","middleware","permissions","s3"],"latest_commit_sha":null,"homepage":"","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/calibr.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":"2015-03-06T22:11:53.000Z","updated_at":"2021-06-09T13:12:22.000Z","dependencies_parsed_at":"2023-01-14T08:32:40.866Z","dependency_job_id":null,"html_url":"https://github.com/calibr/node-s3layer","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/calibr/node-s3layer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calibr%2Fnode-s3layer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calibr%2Fnode-s3layer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calibr%2Fnode-s3layer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calibr%2Fnode-s3layer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/calibr","download_url":"https://codeload.github.com/calibr/node-s3layer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calibr%2Fnode-s3layer/sbom","scorecard":{"id":262710,"data":{"date":"2025-08-11","repo":{"name":"github.com/calibr/node-s3layer","commit":"59c5a1dbee6be8404b3f4b3bc137034434fbf64b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.3,"checks":[{"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":"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":"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":"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":"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":"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":"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":"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":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":"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":"Vulnerabilities","score":0,"reason":"26 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-rrc9-gqf8-8rwg","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-9vvw-cc9w-f27h","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc","Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx","Warn: Project is vulnerable to: GHSA-mpcf-4gmh-23w8","Warn: Project is vulnerable to: GHSA-9qj9-36jm-prpv","Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695","Warn: Project is vulnerable to: GHSA-fvqr-27wr-82fm","Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574","Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-wrvr-8mpx-r7pp","Warn: Project is vulnerable to: GHSA-3fx5-fwvr-xrjg","Warn: Project is vulnerable to: GHSA-w9mr-4mfr-499f","Warn: Project is vulnerable to: GHSA-7mc5-chhp-fmc3","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-gqgv-6jq5-jjj9","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-776f-qx25-q3cc"],"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-17T11:11:52.914Z","repository_id":28280532,"created_at":"2025-08-17T11:11:52.914Z","updated_at":"2025-08-17T11:11:52.914Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28876674,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T10:31:27.438Z","status":"ssl_error","status_checked_at":"2026-01-29T10:31:01.017Z","response_time":59,"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":["acl","connect","express","middleware","permissions","s3"],"created_at":"2026-01-29T11:00:02.248Z","updated_at":"2026-01-29T11:00:05.305Z","avatar_url":"https://github.com/calibr.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Express/Connect middleware for proxying files from S3 to Internet\n\nWith this middleware you can:\n- check authorization of a user to access a target object(using ACL, RBAC, etc.)\n- translate urls to S3 keys\n\nThis middleware supports:\n- Caching objects\n- Piping objects from S3 to response, so objects don't fully loaded in memory\n\n## Install\n\n`npm install s3layer`\n\nUsage example:\n\n```javascript\nvar\n  app = require(\"express\")(),\n  S3Layer = require(\"s3layer\");\n\nAWS_SETUP = {\n  accessKeyId: \"...\",\n  secretAccessKey: \"...\",\n  bucket: \"...\" // default bucket\n};\n\n// create a middleware\nvar s3l = S3Layer({\n  AWS: AWS_SETUP,\n  // the default bucket, can be overwritten by a getS3Key's returned value\n  bucket: AWS_SETUP.bucket,\n  /**\n  * params has fields:\n  * req - http request\n  * res - http response\n  * url - requested url\n  */\n  getS3Key: function(params, cb) {\n    params.url = params.url.replace(/^\\//, \"\");\n    if(params.url == \"restricted-file.png\") {\n      params.res.status(403).send(\"Forbidden\");\n      return;\n    }\n    // proxy request to Key = params.url\n    cb(null, params.url);\n  }\n});\n\n// use the middleware in the express application\napp.use(\"/files\", s3l);\n```\n\n### getS3Key\n\nAccepts a request params and a callback function, in the callback function you can return:\n\n- `string` - interpreted as S3 Key\n- `object` which can contain `key` and `bucket` fields\n\nFor example:\n\n```javascript\n  getS3Key: function(params, cb) {\n    params.url = params.url.replace(/^\\//, \"\");\n    if(params.url == \"restricted-file.png\") {\n      params.res.status(403).send(\"Forbidden\");\n      return;\n    }\n    // proxy request to Key = params.url\n    cb(null, {\n      key: params.url,\n      bucket: \"another-bucket\"\n    });\n  }\n```\n\n### modifyHeaders\n\nYou can modify headers returned for a file, with `modifyHeaders` callback:\n\nFor example\n\n```javascript\n  /**\n   * @param  {Object} params\n   * @return {Object} params.headers - headers returned by Amazon S3\n   * @return {Object} params.outHeaders - headers that will be returned in a HTTP response, you can modify them directly\n   */\n  modifyHeaders: function(params) {\n    if(params.headers[\"content-type\"] \u0026\u0026 params.headers[\"content-type\"].indexOf(\"image/\") === 0) {\n      // force download all images\n      params.outHeaders[\"Content-Disposition\"] = 'attachment; filename=\"img.jpg\"';\n    }\n  }\n```\n\n**`modifyHeaders` is synchronous!**","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcalibr%2Fnode-s3layer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcalibr%2Fnode-s3layer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcalibr%2Fnode-s3layer/lists"}