Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
grasshopper-cms
Advanced tools
Requires Node 6+.
Demo Project at https://github.com/grasshopper-cms/grasshopper-demo .
Docs at http://docs.grasshopper.ws . The below is an excerpt from the docs:
This is how to get started using Grasshopper.
Grasshopper is a headless CMS with an admin. It can be used to build both apis and websites.
To get started require grasshopper-cms and init with your config object:
const express = require('express');
const app = express();
const grasshopper = require('grasshopper-cms');
grasshopper
.start({
app,
express,
// Other configs here
})
.then(() => {
// grasshopper.authenticatedRequest is now available
// grasshopper.grasshopper is now available
console.log('listening on port 3000');
app.listen(3000);
})
.catch(err => {
console.log('startup error', err);
})
For an example config object see the grasshopper-demo.
In the example above, app
is a standard express app. You can set it up as you normally would for a website or api.
You can inform your models with queries via grasshopper.authenticatedRequest
, the grasshopper api is running at /api
,
and you can view the admin at https://localhost:3000/admin .
Queries are promise based. Query content involves looking for content by _id
, by querying for fields on the document, or query for meta
data on the document.
A Grasshopper content item has this form:
{
_id
fields : {
},
meta : {
type,
node,
labelfield,
typelabel,
created,
lastmodified
}
}
The keys for meta
are stable. The keys for fields
are defined in the admin by modifying the content type.
So querying all
return ghService
.authenticatedRequest.content.query({
filters : [
{
key : 'fields.title',
cmp : '=',
value : 'My Post'
},
{
key : 'meta.typelabel',
cmp : '=',
value : 'Standard Post'
}
],
nodes: [
// The id of the node
'58943396364f3b528af81f80'
],
options : {
sort: {
'fields.title' : 1
}
}
})
Note: Update the Release Notes when publishing new versions.
FAQs
Requires Node 6+.
We found that grasshopper-cms demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.