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.
@atproto/xrpc
Advanced tools
import xrpc from '@atproto/xrpc'
xrpc.addLexicon({
lexicon: 1,
id: 'io.example.ping',
defs: {
main: {
type: 'query',
description: 'Ping the server',
parameters: {
type: 'params',
properties: {message: { type: 'string' }}
},
output: {
encoding: 'application/json',
schema: {
type: 'object',
required: ['message'],
properties: {message: { type: 'string' }},
},
}
},
},
})
const res1 = await xrpc.call('https://example.com', 'io.example.ping', {message: 'hello world'})
res1.encoding // => 'application/json'
res1.body // => {message: 'hello world'}
const res2 = await xrpc.service('https://example.com').call('io.example.ping', {message: 'hello world'})
res2.encoding // => 'application/json'
res2.body // => {message: 'hello world'}
xrpc.addLexicon({
lexicon: 1,
id: 'io.example.writeJsonFile',
defs: {
main: {
type: 'procedure',
description: 'Write a JSON file',
parameters: {
type: 'params',
properties: {fileName: { type: 'string' }},
},
input: {
encoding: 'application/json'
},
},
},
})
const res3 = await xrpc
.service('https://example.com')
.call('io.example.writeJsonFile',
{fileName: 'foo.json'}, // query parameters
{hello: 'world', thisIs: 'the file to write'} // input body
)
MIT
FAQs
atproto HTTP API (XRPC) client library
The npm package @atproto/xrpc receives a total of 24,785 weekly downloads. As such, @atproto/xrpc popularity was classified as popular.
We found that @atproto/xrpc demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.