
Security News
The Nightmare Before Deployment
Season’s greetings from Socket, and here’s to a calm end of year: clean dependencies, boring pipelines, no surprises.
Node.js script for adding integrity attributes to same domain <script src> and stylesheet <link> tags on html markup.
npm install srify
const srify = require('srify')
const markup = `
<html>
<head>
<link rel="stylesheet" href="/style.css" />
<link rel="stylesheet" href="https://some.cdn/style.css" />
<script src="https://some.cdn/script.js"></script>
</head>
<body>
<script src="/script.js"></script>
</body>
</html>
`
const markupSrified = srify(markup, {
style: true, // default: false
script: true, // default: false
algorithm: 'sha384', // default!
baseDir: 'build/assets' // default: ''
})
console.log(markupSrified)
output:
<html>
<head>
<link rel="stylesheet" href="/style.css" integrity="sha384-OHOO3P0V8mBnd24oTanI8YyewsyftnJMiEZs6HkCBi+OwqzBuXhdF/2SkMK4BIGZ" />
<link rel="stylesheet" href="https://some.cdn/style.css" />
<script src="https://some.cdn/script.js"></script>
</head>
<body>
<script src="/script.js" integrity="sha384-Hu7SkqY3fsGrlxpcjDcNGNyTFizFfXWWga1eZACsk/MGVg1IUN/4VtNQb+fi7hrd"></script>
</body>
</html>
npm test
1.0.1: fix main entry in package.json1.0.0: initial releaseFAQs
Adds integrity attributes to script and stylesheet link tags on html markup
The npm package srify receives a total of 2 weekly downloads. As such, srify popularity was classified as not popular.
We found that srify 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.

Security News
Season’s greetings from Socket, and here’s to a calm end of year: clean dependencies, boring pipelines, no surprises.

Research
/Security News
Impostor NuGet package Tracer.Fody.NLog typosquats Tracer.Fody and its author, using homoglyph tricks, and exfiltrates Stratis wallet JSON/passwords to a Russian IP address.

Security News
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.