{"id":21455282,"url":"https://github.com/louisbrulenaudet/srisaurus","last_synced_at":"2026-04-20T10:04:51.423Z","repository":{"id":161025226,"uuid":"635777105","full_name":"louisbrulenaudet/srisaurus","owner":"louisbrulenaudet","description":"Ultralight, non-dependent and minimalist open-source package to recursively generate subresource integrity (SRI) hashes.","archived":false,"fork":false,"pushed_at":"2023-05-07T13:12:43.000Z","size":23,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-29T21:29:57.656Z","etag":null,"topics":["deno","deno-module","denoland","javascript","open-source","open-sri","package","sri","srisaurus"],"latest_commit_sha":null,"homepage":"https://deno.land/x/srisaurus","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/louisbrulenaudet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"louisbrulenaudet"}},"created_at":"2023-05-03T12:39:09.000Z","updated_at":"2024-08-20T14:41:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"d5adfc02-fdb5-4d80-aa94-5f08bf0432b0","html_url":"https://github.com/louisbrulenaudet/srisaurus","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/louisbrulenaudet/srisaurus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/louisbrulenaudet%2Fsrisaurus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/louisbrulenaudet%2Fsrisaurus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/louisbrulenaudet%2Fsrisaurus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/louisbrulenaudet%2Fsrisaurus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/louisbrulenaudet","download_url":"https://codeload.github.com/louisbrulenaudet/srisaurus/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/louisbrulenaudet%2Fsrisaurus/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32042298,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"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":["deno","deno-module","denoland","javascript","open-source","open-sri","package","sri","srisaurus"],"created_at":"2024-11-23T05:11:25.035Z","updated_at":"2026-04-20T10:04:51.402Z","avatar_url":"https://github.com/louisbrulenaudet.png","language":"TypeScript","funding_links":["https://github.com/sponsors/louisbrulenaudet"],"categories":[],"sub_categories":[],"readme":"# srisaurus\n\n\u003cimg align=\"right\" src=\"https://deno.land/logo.svg\" height=\"150px\" alt=\"the deno mascot dinosaur standing in the rain\"\u003e\n\nUltralight, non-dependent and minimalist open-source package to recursively generate **sha-256**, **sha-384** or **sha-512** subresource integrity hashes to authenticate **.js** and **.css** files.\n\n```js\nimport { Srisaurus } from \"https://deno.land/x/srisaurus/mod.ts\"\n\nlet hash = new Srisaurus(\"SHA-256\")\nawait hash.get(\"./public/css\");\n```\n\n[Subresource Integrity](https://developer.mozilla.org/fr/docs/Web/Security/Subresource_Integrity) or SRI is a [W3C recommendation](https://www.w3.org/TR/SRI/) to provide a method to protect website delivery from CDN-served malicious code.\n\nTo use SRI, a website author wishing to include a static resource can specify a cryptographic hash of the resource in addition to the location of the resource. Browsers fetching the resource can then compare the hash provided by the website author with the hash computed from the resource. If the hashes don't match, the resource is discarded.\n\n```html\n\u003cscript src=\"https://cdn.example.com/app.js\"\n        integrity=\"sha384-+/M6kredJcxdsqkczBUjMLvqyHb1K/JThDXWsBVxMEeZHEaMKEOEct339VItX1zB\"\n\u003e\u003c/script\u003e\n```\n\nThis package aims at automating the process of generating cryptographic hashes in order to facilitate their access, by parsing directories and subdirectories to extract static files.\n\n[![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://choosealicense.com/licenses/mit/) \n[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/louisbrulenaudet/open-sri/issues)\n[![deno land](http://img.shields.io/badge/available%20on-deno.land/x-blue.svg?logo=deno)](https://deno.land/x/cli_badges)  \n\n## Features\n\n- Low memory usage\n- Executable for generating applications quickly\n- High availability for synchronization with CDN systems\n- Simple deployment with one-line integration\n\n## Installation\n\nThis is a [Deno third party module](https://deno.land/x) module available through the [Deno.land registry]https://deno.land/x).\n\nBefore installing, download and install [Deno.land](https://deno.com/manual@v1.33.2/getting_started/installation). Deno works on macOS, Linux, and Windows as a single binary executable. It has no external dependencies.\n\n## Importing\n\n```js\n// Using es6 syntax.\nimport { Srisaurus } from \"https://deno.land/x/srisaurus/mod.ts\"\n```\n\n## Usage/Examples\n\n```js\nimport { Srisaurus } from \"https://deno.land/x/srisaurus/mod.ts\"\n\nlet hash = new Srisaurus(\"SHA-256\")\nawait hash.get(\"./public/css\");\n```\n\n```javascript\n[\n  {\n    filepath: 'public/css/index.css',\n    hash: 'sha384-yTRuc6ItZNScTYLXkpwURSAsaZLKgfoWi69Nku5bK2/1HW2O8OOgcli2jdgvIJnE'\n  }\n]\n```\nThen, we can observe the creation of a JSON element, containing each filepath contained in the directory and its subdirectories, as well as the assignment of a unique hash preceded by the mention `\"sha256-\"`, `\"sha384-\"` or `\"sha512-\"` directly exploitable in your routes configuration file.\n\n## License\n\nCopyright (c) 2022 Louis Brulé Naudet \u003ccontact@louisbrulenaudet.com\u003e.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n## Feedback\n\nIf you have any feedback, please reach out to us at contact@louisbrulenaudet.com.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flouisbrulenaudet%2Fsrisaurus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flouisbrulenaudet%2Fsrisaurus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flouisbrulenaudet%2Fsrisaurus/lists"}