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.
A mock server generated from an arbitrary Swagger file. Supports seeding, timeouts, response picking, entity memory, semantic action inference, etc.
A mock server generated from an arbitrary Swagger file. Supports seeding, timeouts, response picking, entity memory, semantic action inference, etc.
Syntax:
pokemock <swagger-url-or-file> [-h] [-v] [-w] [-p <port>]
Options:
-h, --help Show help
-v, --version Show version
-p, --port <port> Set server port, default is 8000
-w, --watch Watch mode: Restart on Swagger changes
-k, --killable Publish /kill endpoint to stop the service
The mock server listens to the specified port and
mocks endpoints defined in the provided Swagger document.
Additionally, it publishes a Swagger UI under /ui
,
the Swagger API under /api-docs
and a /kill
endpoint for shutdown.
Using optional headers, clients can control the server's behavior:
<definitionName|attributeName>: <size>
pairs<jsonPath>: <data>
pairs<data>
is arbitrary JSONWhenever an entity containing an ID is generated it is remembered by the server. If the entity is requested again, the remembered data is returned. This also applies to sub-entities across endpoints.
Additionally, the server tries to infer semantic actions from requests, such as:
These actions are applied to known entities in memory. For example, requesting a deleted entity will result in a 404 response.
Pokemock provides a set of Express middlewares
which you can use independently.
The default app defined in createDefaultApp.js
is an opinionated stack of
middlewares which you're encouraged to hack on.
By re-arranging and adding middlewares (especially generators)
you can tailor Pokemock to fit your APIs.
FAQs
A mock server generated from one or more arbitrary Swagger files. Supports seeding, timeouts, response picking, entity memory, semantic action inference, etc.
The npm package pokemock receives a total of 11 weekly downloads. As such, pokemock popularity was classified as not popular.
We found that pokemock demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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.