
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
@dsbn/unrest
Advanced tools
npm i -D @dsbn/unrest
// main.js
import Vue from 'vue'
import Unrest from '@dsbn/unrest'
Vue.use(Unrest, {
application: 'your-site.com/data/v1/my-application',
token: Promise.resolve(`my.JWT.token`),
vue: Vue
})
// my-component.vue
<script>
export default {
methods: {
setupDB() {
this.$db.create('new-bucket', {
create: 'Role:Developers,Role:ERT',
read: '*', // readable by anyone
write: '@self'
})
this.$db.list() // return all buckets for app-slug
this.$db.update('new-bucket', {new_permissions})
this.$db.remove('new-bucket') // and all documents inside
}
},
data() {
let [items, othertable] = this.$db.sync('new-bucket', 'othertable')
othertable.on('delete', (deletedItem) => doSomething());
return { items, othertable }
}
}
</script>
<template>
<ul>
<!-- .new() return a promise if you need it -->
<li @click="items.new({ template_object })">Create New</li>
<li v-for="item in items">
<!-- patch only the `title` property -->
<input type="text" v-model="item.title" @keyup="item.patch('title')">
<!-- PUT the entire object with .save() -->
<input type="checkbox" v-model="item.done" @change="item.save()">
<button @click="item.remove()"></button>
</li>
</ul>
</template>
For modifing the bucket structure, requires Admin permissions. AKA having your Role: be in the Admin section of an application.
$db.list() : Promise<Array<String>>Returns a list of buckets that are attached to this application.
$db.create(name, permissions) : Promise<Object>Returns a promise for when the given bucket named name is created with the given permissions. An example of a permission object is below.
{ create: 'Role:Developers,Role:ERT',
read: '*',
write: '@self' }
The above object allows only users with the "Developer" or "ERT" roles to create new documents, allow anyone to read anyone elses document inside this bucket, but restrict the editors of a document to only the author who created it.
$db.update(name, permissions) : Promise<Object>It's the exact same as .create, just for an existing bucket.
$db.remove(name) : Promise<Object>Does what you'd expect.
$db.sync(bucket...) : Array<Table>Begins syncing the entire bucket, all documents inside, into the returned Object asyncronously.
let [ people ] = this.$db.sync('people')
...
<li v-for="person in people">{{person.name}}</li>
table.new(obj) : Promise<Item>Creates a new object, will inject the given object with the ._id property when saved to the database. Will also resolve the returned promise.
table.on(event, callback<Item>)Allows you to recieve events as they happen and react to them. create patch update delete or meta.
table.synced : PromiseThis property is a promise that is resolved when the entire table has been synced to the client. AKA fully "loaded".
item.save()Does a PUT, saving all properties attached to the object.
item.remove()Removes the item from the database, doesn't change the local item instance at all.
item.patch(property)Saves a single updated property of the item. Good for multi-user collaberation without squashing changes.
let item = $db.tables['some-table']['111111111']
item.something = 'new-val'
item.patch('something')
FAQs
A websocket api for realtime communication and collaboration.
We found that @dsbn/unrest demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.