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.
@jota-one/drosse
Advanced tools
Drosse is a stateful and programmable mock server written in javascript.
Based on h3, Drosse uses loki
to store your mock data in memory so you can modify them in your
POST
, PUT
, PATCH
and DELETE
requests.
It comes out of the box with all the features you need to completely simulate a backend API, making it the best companion for any frontend developer 🤓
Tight to your project: your mocks and your mock-server are part of your project. You can run as many drosse instances as you want simultaneously.
Easy configuration: configuring drosse is as simple as writing its port number in a .drosserc.js
file and writing route definitions in a routes.json
file.
Cascading configs: routes are defined as a JSON tree of sub-paths - plugins (throttle, proxy, ...) are inherited by child routes.
Static mocks: write mocks directly in the routes.json
file (inline mode) or in JSON files (static mode).
Dynamic mocks: build dynamic responses in javascript and access to the persisted data api, the request object and the NodeJS environment.
Assets handling: serve multimedia files with patterns and wild cards for easy fallback.
Dynamic URL params: match any route/endpoint pattern with dynamic parameters => /api/users/:id
.
Data persistence: work with stateful and interactive mocks thanks to the in-memory JSON database accessible via an easy-to-use API.
Throttling: delay response time of your routes, even the proxied ones.
Proxying: super-flexible proxy mechanism with inheritance and overwriting of sub-routes (with different proxy or local route).
Middlewares: extend Drosse with custom express middlewares to fulfill your use cases.
Templates: use response templates to avoid repeating yourself.
Scraping: scrape proxied endpoints and save the content to Drosse's database or static files.
Extensible REPL CLI: build custom commands and execute them at runtime => simulate interaction with 3rp-party services.
Find example code in the examples folder.
npm install -g yarn
yarn
yarn build
or yarn build:stub
for live rebuildyarn serve examples/<example-folder-name>
Drosse is crafted by Jota and licensed under the MIT license.
FAQs
A stateful and programmable mock server
The npm package @jota-one/drosse receives a total of 83 weekly downloads. As such, @jota-one/drosse popularity was classified as not popular.
We found that @jota-one/drosse 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
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.