srisaurus
Ultralight, non-dependent and minimalist open-source package to recursively generate subresource integrity (SRI) hashes.
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.2%) to scientific vocabulary
Keywords
Repository
Ultralight, non-dependent and minimalist open-source package to recursively generate subresource integrity (SRI) hashes.
Basic Info
- Host: GitHub
- Owner: louisbrulenaudet
- License: mit
- Language: TypeScript
- Default Branch: main
- Homepage: https://deno.land/x/srisaurus
- Size: 22.5 KB
Statistics
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
- Releases: 1
Topics
Metadata Files
README.md
srisaurus
Ultralight, 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.
```js import { Srisaurus } from "https://deno.land/x/srisaurus/mod.ts"
let hash = new Srisaurus("SHA-256") await hash.get("./public/css"); ```
Subresource Integrity or SRI is a W3C recommendation to provide a method to protect website delivery from CDN-served malicious code.
To 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.
```html <script src="https://cdn.example.com/app.js" integrity="sha384-+/M6kredJcxdsqkczBUjMLvqyHb1K/JThDXWsBVxMEeZHEaMKEOEct339VItX1zB"
```
This 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.
Features
- Low memory usage
- Executable for generating applications quickly
- High availability for synchronization with CDN systems
- Simple deployment with one-line integration
Installation
This is a Deno third party module module available through the [Deno.land registry]https://deno.land/x).
Before installing, download and install Deno.land. Deno works on macOS, Linux, and Windows as a single binary executable. It has no external dependencies.
Importing
js
// Using es6 syntax.
import { Srisaurus } from "https://deno.land/x/srisaurus/mod.ts"
Usage/Examples
```js import { Srisaurus } from "https://deno.land/x/srisaurus/mod.ts"
let hash = new Srisaurus("SHA-256") await hash.get("./public/css"); ```
javascript
[
{
filepath: 'public/css/index.css',
hash: 'sha384-yTRuc6ItZNScTYLXkpwURSAsaZLKgfoWi69Nku5bK2/1HW2O8OOgcli2jdgvIJnE'
}
]
Then, 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.
License
Copyright (c) 2022 Louis Brulé Naudet contact@louisbrulenaudet.com.
Permission 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:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE 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.
Feedback
If you have any feedback, please reach out to us at contact@louisbrulenaudet.com.
Owner
- Name: Louis Brulé Naudet
- Login: louisbrulenaudet
- Kind: user
- Location: Paris
- Company: Université Paris-Dauphine (Paris Sciences et Lettres - PSL)
- Website: https://louisbrulenaudet.com
- Twitter: BruleNaudet
- Repositories: 81
- Profile: https://github.com/louisbrulenaudet
Research in business taxation and development (NLP, LLM, Computer vision...), University Dauphine-PSL 📖 | Backed by the Microsoft for Startups Hub program
Citation (CITATION.cff)
cff-version: 1.2.0 message: "If you use this software, please cite it as below." authors: - family-names: "Brulé Naudet" given-names: "Louis" orcid: "https://orcid.org/0000-0001-9111-4879" title: "srisaurus" version: 1.0.0 date-released: 2023-05-03 url: "https://github.com/louisbrulenaudet/srisaurus"
GitHub Events
Total
Last Year
Issues and Pull Requests
Last synced: about 1 year ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0