
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
const {Service} = require('vtex-io')
// Create a service instance
service = new Service()
// Do your page, API and event bindings
// And start the service
service.start()
service.api({
'/products': {
get: (req, res, ctx) => {
// get a list of products
return Promise.resolve()
},
post: (req, res, ctx) => {
// create a new product
return Promise.resolve()
},
'/:id': {
get: (req, res, ctx) => {
// get a specific product
return Promise.resolve()
},
put: (req, res, ctx) => {
// update a product
return Promise.resolve()
}
}
},
'/categories': (req, res, ctx) => {
// a handler without a method defaults to GET
// get all categories
return Promise.resolve()
}
})
request
(Object
) - a Koa Requestresponse
(Object
) - a Koa Responsecontext
(Object
) - the context object, with the folowing fields:
account
(String
) - current account nameworkspace
(String
) - current workspaceparams
(Object
) - URL parameter values obtained from the routeservice.events({
'apps:installed,uninstalled:render': (body, ctx) => {},
'vbase:file-changed:render:*': (body, ctx) => {},
'vtex.render:hotreload:product-page': (body, ctx) => {}
})
Each event subscription has a key and a callback.
Each key has at least two segments, separated by a colon (:
). The two first are always:
apps
, vbase
, vtex.render
, vtex.payments
etc.)The remaining segments are arbitrary and defined by the sender.
Each segment of a subscription key may use one of two special characters:
*
is a wildcard, which represents "anything". It will match any value for that segment. Example: apps:installed:*
will match any value for the last segment.,
is a shorthand to describe many key variations in one. Example: apps:installed,uninstalled:render
will match both apps:installed:render
and apps:uninstalled:render
.Parameters:
body
(String
) - the event body.context
(Object
) - the context, with the following fields:
account
(String
) - current account nameworkspace
(String
) - current workspacesender
(String
) - platform service name (apps
, vbase
etc.) or app ID (vtex.render@1.2.3
) of the senderkey
(String
) - the actual event key (for instance, foo:bar:lala
is a valid key for subscriptions foo:bar:lala
, foo:*:lala
or foo:bar,zaz:lala
)FAQs
Deprecated lib, see @vtex/api
The npm package vtex-io receives a total of 5 weekly downloads. As such, vtex-io popularity was classified as not popular.
We found that vtex-io 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.