{"id":18493773,"url":"https://github.com/neurocode-io/azure-sas-token","last_synced_at":"2026-04-27T08:32:25.569Z","repository":{"id":38022021,"uuid":"298994723","full_name":"neurocode-io/azure-sas-token","owner":"neurocode-io","description":"Cloudflare worker lib to issue limited access to Azure Storage resources using shared access signatures (SAS)","archived":false,"fork":false,"pushed_at":"2023-07-31T14:43:36.000Z","size":76,"stargazers_count":3,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-09T02:45:45.674Z","etag":null,"topics":["azure-sas","azure-storage","cloudflare-workers","javascript","serverless","typescript"],"latest_commit_sha":null,"homepage":"","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/neurocode-io.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}},"created_at":"2020-09-27T09:13:25.000Z","updated_at":"2025-06-23T17:40:42.000Z","dependencies_parsed_at":"2024-12-25T16:26:36.838Z","dependency_job_id":"e704bf87-b174-4629-9f55-ec84f0fe1060","html_url":"https://github.com/neurocode-io/azure-sas-token","commit_stats":{"total_commits":38,"total_committers":3,"mean_commits":"12.666666666666666","dds":0.5,"last_synced_commit":"ddfb070a3ba61c15def84e848dd7c12e76fb60fe"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/neurocode-io/azure-sas-token","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neurocode-io%2Fazure-sas-token","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neurocode-io%2Fazure-sas-token/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neurocode-io%2Fazure-sas-token/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neurocode-io%2Fazure-sas-token/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neurocode-io","download_url":"https://codeload.github.com/neurocode-io/azure-sas-token/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neurocode-io%2Fazure-sas-token/sbom","scorecard":{"id":681422,"data":{"date":"2025-08-11","repo":{"name":"github.com/neurocode-io/azure-sas-token","commit":"3cb35df2666d57c297403532e48dc5c2693b4f9d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/2 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":"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":"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":"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":"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":"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":-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":"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":"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":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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 29 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"}}]},"last_synced_at":"2025-08-21T23:17:59.659Z","repository_id":38022021,"created_at":"2025-08-21T23:17:59.659Z","updated_at":"2025-08-21T23:17:59.659Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32329463,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"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":["azure-sas","azure-storage","cloudflare-workers","javascript","serverless","typescript"],"created_at":"2024-11-06T13:15:59.319Z","updated_at":"2026-04-27T08:32:25.541Z","avatar_url":"https://github.com/neurocode-io.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Azure-SAS-token\n\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=NeuroCode-io_azure-sas-token\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=NeuroCode-io_azure-sas-token)\n[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=NeuroCode-io_azure-sas-token\u0026metric=sqale_rating)](https://sonarcloud.io/dashboard?id=NeuroCode-io_azure-sas-token)\n[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=NeuroCode-io_azure-sas-token\u0026metric=reliability_rating)](https://sonarcloud.io/dashboard?id=NeuroCode-io_azure-sas-token)\n[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=NeuroCode-io_azure-sas-token\u0026metric=security_rating)](https://sonarcloud.io/dashboard?id=NeuroCode-io_azure-sas-token)\n[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=NeuroCode-io_azure-sas-token\u0026metric=vulnerabilities)](https://sonarcloud.io/dashboard?id=NeuroCode-io_azure-sas-token)\n\n\nGenerate Azure SAS tokens on the edge with cloudflare workers and this library. \nThis library has zero depdendencies.\n\nWe used it in our [sepa-form-recogizer](https://neurocode.io/blog/sepa-payment-recognizer?s=github) API\n\n## What is a SAS token?\n\n![sas](./sas-storage-uri.png)\n\n\nSAS token is a string that you generate and give your client for temp access to your Azure storage. The Azure Storage client library does not work in the browser since it uses NodeJS crypto to compute the HMAC SHA256.\n\nThis library uses webCrypto to compute the HMAC SHA256 and is thus compatible with cloudflare workers.\n\n\n## Install\n\nUse either npm or yarn\n```\nnpm i @neurocode.io/azure-sas-token\nyarn add @neurocode.io/azure-sas-token\n```\n\n## How to use the library\n\n```ts\nimport { createBlobSas } from '@neurocode.io/azure-sas-token'\n\nconst expireInMin = 5\n\nconst { blobSasUrl } = await createBlobSas({\n      accountKey: 'yourStorageAccountKey',\n      accountName: 'yourAccountName',\n      containerName: 'youStorageContainerName',\n      blobName: 'someBlob.txt',\n      permissions: 'rw',\n      expiresOn: new Date(new Date().valueOf() + expireInMin * 60 * 1000)\n})\n\n```\n\nBe careful with **startsOn** property. If you set the start time for a SAS to the current time, you may observe failures occurring intermittently for the first few minutes due to different machines having slight variations of the current time (known as clock skew). \n\nIn general, set the start time to be at least 15 minutes in the past. Or, don't set it at all :)\n\n\n\n## Current implementation\n\n- [x] Blob SAS token\n- [ ] Container SAS token\n- [ ] Account SAS token\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneurocode-io%2Fazure-sas-token","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneurocode-io%2Fazure-sas-token","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneurocode-io%2Fazure-sas-token/lists"}