
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
vite-plugin-manifest-sri
Advanced tools
Subresource Integrity for Vite.js Manifests
Vite does not provide support for subresource integrity.
Both vite-plugin-sri and rollup-plugin-sri are good
options to automatically add an integrity
hash to script and link tags. However, these rely on transforming an HTML file, which is typically not the case when using a backend integration such as Vite Ruby.
This plugin extends manifest.json
to include an integrity
field which can be used when rendering tags.
Install the package as a development dependency:
npm i -D vite-plugin-manifest-sri # pnpm i -D vite-plugin-manifest-sri
Add it to your plugins in vite.config.ts
:
import { defineConfig } from 'vite'
import manifestSRI from 'vite-plugin-manifest-sri'
export default defineConfig({
plugins: [
manifestSRI(),
],
})
Note that the build.manifest
option
must be enabled in order to generate a manifest.json
file (Vite Ruby enables it by default).
Experimental support is available, you can try it now by explicitly adding 4.0.0.alpha1
to your Gemfile
:
gem 'vite_rails', '~> 4.0.0.alpha1'
The following options can be provided:
algorithms
Hashing algorithms to use when calculate the integrity hash for each asset.
Default: ['sha384']
manifestSRI({ algorithms: ['sha384', 'sha512'] }),
The following plugins might be useful for Vite apps based around an index.html
file:
This library is available as open source under the terms of the MIT License.
FAQs
Subresource Integrity hashes for the Vite.js manifest.
The npm package vite-plugin-manifest-sri receives a total of 64,427 weekly downloads. As such, vite-plugin-manifest-sri popularity was classified as popular.
We found that vite-plugin-manifest-sri demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.