
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
fixtureserver
Advanced tools
A minimalistic testing server to easily create and serve fixtures (i.e. "simple testing pages with dummy or mock content to run tests on"). Supports edge side includes (ESI) and embedded Javascript (eJS). Only intended for use within testing setups, pipelines or development!
Install via npm (global or local)
npm install -g fixtureserver
Then either start using commandline (and optionally pass --docroot
, --host
and --port
as arguments) ...
fixtureserver --docroot=./your-docroot --host=localhost --port=9999
... or directly require and use within your node.js application as module
const fixtureserver = require('fixtureserver');
fixtureserver.start({
docroot: './your-docroot',
host: 'localhost',
port: 9999,
});
Put HTML fixture files in your docroot, then start the server and open the default location (http://localhost:8000). The fixtures can use ESI statements as well as the full feature set of embeddedJS. A simple example might look like this:
<!doctype html>
<html>
<body>
Here we include some external file:
<%- include('_header'); -%>
The following is an edge side include:
<esi:include src="http://example.com/some/remote/chunk.html" />
Let's add some more fancy embedded Javascript (anyone feels reminded of PHP? ;) ..):
<% if (server) { %>
<i>server-esi v<%= server.version %></i>
<% } %>
<%- include('_footer'); -%>
</body>
The include files _header.ejs
and _footer.ejs
(the extension is omitted in the include statement) are expected relative to the fixture's location. This makes it pretty convenient to serve a generic header or footer within your fixtures.
This tool is based on a very quick&dirty testing setup that we needed for functionally testing a set of server-side includes (SSI). We needed a setup that allowed us to run a functional test against the finally rendered and embedded includes. It should also handle some sort of dynamic scripting to allow stuff like includes and data mocking without too much repetition. This server does exactly that.
Why we chose ESI over SSI? SSIs may not contain a domain and therefore require a fairly complex setup using a local nginx as reverse proxy. That made everything unnecessarily complicated when just testing the integration. So we finally ditched the SSI in this setup (after wasting way too much time for 3 years).
MIT License, (c) Rico Pfaus 2018
FAQs
A minimal testing server with eJS and ESI support
The npm package fixtureserver receives a total of 0 weekly downloads. As such, fixtureserver popularity was classified as not popular.
We found that fixtureserver demonstrated a not healthy version release cadence and project activity because the last version was released 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 researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.