{"id":34717967,"url":"https://github.com/ezhuk/astro-hash","last_synced_at":"2026-06-12T02:01:14.153Z","repository":{"id":294786537,"uuid":"980394665","full_name":"ezhuk/astro-hash","owner":"ezhuk","description":"Astro Integration to automatically generate Subresource Integrity (SRI) and Content Security Policy (CSP) hashes.","archived":false,"fork":false,"pushed_at":"2026-06-06T21:04:03.000Z","size":998,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-06T23:07:31.338Z","etag":null,"topics":["astro","astro-integration","security"],"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/ezhuk.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-05-09T04:03:00.000Z","updated_at":"2026-06-06T21:04:00.000Z","dependencies_parsed_at":"2025-06-12T01:25:45.919Z","dependency_job_id":"57bf25fd-7dc7-4788-abfd-f5254fbd0e27","html_url":"https://github.com/ezhuk/astro-hash","commit_stats":null,"previous_names":["ezhuk/astro-hash"],"tags_count":54,"template":false,"template_full_name":null,"purl":"pkg:github/ezhuk/astro-hash","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezhuk%2Fastro-hash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezhuk%2Fastro-hash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezhuk%2Fastro-hash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezhuk%2Fastro-hash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ezhuk","download_url":"https://codeload.github.com/ezhuk/astro-hash/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezhuk%2Fastro-hash/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34225351,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"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":["astro","astro-integration","security"],"created_at":"2025-12-25T01:18:03.470Z","updated_at":"2026-06-12T02:01:14.121Z","avatar_url":"https://github.com/ezhuk.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Astro Hash 🚀 #️⃣\n\n[![test](https://github.com/ezhuk/astro-hash/actions/workflows/test.yml/badge.svg)](https://github.com/ezhuk/astro-hash/actions/workflows/test.yml)\n[![codecov](https://codecov.io/github/ezhuk/astro-hash/graph/badge.svg?token=IOWJ17XM82)](https://codecov.io/github/ezhuk/astro-hash)\n[![prod](https://github.com/ezhuk/astro-hash/actions/workflows/prod.yml/badge.svg)](https://github.com/ezhuk/astro-hash/actions/workflows/prod.yml)\n\nAn [Astro Integration](https://docs.astro.build/en/guides/integrations-guide/) that automatically generates and injects [Subresource Integrity (SRI)](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) and [Content Security Policy (CSP)](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CSP) hashes for CSS and JavaScript assets at build time, helping mitigate supply-chain and cross-site scripting risks.\n\n##  Getting Started\n\nMake sure to configure your `.npmrc` to enable installing scoped packages. See [Installing a package from GitHub Packages](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry#installing-a-package) for instructions and more details.\n\n```bash\nnpm install --save-dev @ezhuk/astro-hash\n```\n\nIn your `astro.config.*` file, import and register the integration:\n\n```javascript\nimport { defineConfig } from 'astro/config';\nimport { security } from '@ezhuk/astro-hash';\n\nexport default defineConfig({\n  // ...\n  integrations: [\n    security()\n  ]\n});\n```\n\nBuild your site, and Astro Hash will automatically annotate `\u003clink\u003e`, `\u003cstyle\u003e`, and `\u003cscript\u003e` tags in the generated HTML files in the output directory with `SRI` and `CSP` hashes.\n\n```bash\nnpm run build\n```\n\nWhen the build finishes, take note of the injected attributes and add the generated hashes to your `Content-Security-Policy` HTTP headers so browsers can enforce them.\n\n## Documentation\n\nSee the [full documentation](https://docs.ezhuk.dev/astro-hash) for more details.\n\n## License\n\nThe integration is licensed under the [MIT License](https://github.com/ezhuk/astro-hash?tab=MIT-1-ov-file).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fezhuk%2Fastro-hash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fezhuk%2Fastro-hash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fezhuk%2Fastro-hash/lists"}