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.
The pretenders
project creates flexible fakes for external network
services. These external services can be faked by setting pre-canned answers,
defining expectations, or just querying them on received data after [test]
execution.
They are loosely designed along the pattern of Record/Replay/Verify.
The server side of Pretenders is written in Python3:
In the cases we implement a client, we will be making this runnable in Python 3.x and Python 2.6/2.7.
Pretenders currently supports the mocking of HTTP and SMTP servers.
Future services we are considering to support include AMQP and ssh.
These represent the vast majority of the services that the software we write interacts with.
Some example use cases include:
Pretenders provides a unified RESTful API to verify the interactions of our code with external services, regardless of the service protocol.
Typical usage is to mock RESTful/SOAP APIs of external services.
This will normally require pre-programming the service with responses, and enquiring the service later about received requests. This can be done with specialised assertions / matchers, or by setting expectations and verifying fulfilment of such expectations.
The pre-programming step may be done by using specific proprietary HTTP headers, or by using an alternative HTTP port to the one used for mocking.
For example usage see the documentation
_.
.. _documentation
: http://pretenders.readthedocs.org/
Implementation is based on the bottle
web microframework.
One of our goals will be that the wire protocol is simple enough that you do not need any specialised client. That said, we will be providing client libraries (at least one in Python) to simplify interacting with the server, and to provide a comfortable API to use in tests.
For discussions about the usage, development, and future of pretenders, please
join the pretenders
_ mailing list.
.. _pretenders
: http://groups.google.com/group/pretenders-project
Full documentation of the project can be found here:
http://pretenders.readthedocs.org/
Pretenders welcomes contributions in any form - be it pull requests, adding an
issue or feedback via github
_ or sending a message on the pretenders
_
mailing list so don't be shy!
We have the following branching convention:
- master: This should look exactly like the latest release.
- develop: This is where ongoing work lands, only being merged into master
at release point.
In order to contribute, fork the repo in github
_ and branch from the develop
branch. Create your PRs into develop in the main repo.
.. _github
: https://github.com/pretenders/pretenders
build.sh
runs the full suite of tests, as well as building the sphinx docs
and checking for pep8 errors.
FAQs
Client for the pretenders mock server
We found that pretenders-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.