Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@solid/jose
Advanced tools
Lightweight isomorphic JSON Object Signing and Encryption (JOSE) library for browser and Node.js
TBD
Requires Node.js 8+.
npm install @solid/jose
Important:
If you're using this library as a dependency and you plan to use Webpack, don't
forget to add the following lines to your webpack.config.js
externals:
section:
externals: {
'@sinonjs/text-encoding': 'TextEncoder',
'isomorphic-webcrypto': 'crypto'
}
const { JWT } = require('@solid/jose')
const decoded = JWT.decode(data) // throws an error if invalid
If you npm install @solid/jose
as a dependency, the Webpack'd minified bundle will be
available in the dist/
directory as jose.min.js
.
If you're actively developing/testing this lib, you can npm run dist
, and the
bundle will be rebuilt.
To use in the browser, simply import the bundle in a <script>
tag, and the lib
will be loaded into the window.JOSE
global variable.
Example test.html
file, to illustrate:
<html>
<head>
<script src="dist/jose.min.js"></script>
<script>
// You can now start using the library
let jwt = new JOSE.JWT({
header: { alg: 'HS256' },
payload: { iss: 'https://forge.anvil.io' }
})
</script>
</head>
<body>
Sample usage of JOSE lib in a browser.
</body>
</html>
$ npm test
Copyright (c) 2016 Anvil Research, Inc. Copyright (c) 2017-2019 The Solid Project
FAQs
JSON Object Signing and Encryption
We found that @solid/jose demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 17 open source maintainers 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
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.