Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Outport is a versatile library for API testing and documentation, offering a user-friendly interface to define, test, and visualize API endpoints for seamless debugging and collaboration.
Outport is a versatile library for API testing and documentation, offering a user-friendly interface to define, test, and visualize API endpoints for seamless debugging and collaboration.
Check out a live demo of Outport here.
Install Outport via NPM:
npm install outport
To use Outport in your project, follow these steps:
Import Outport and initialize it with your configuration in an Express app:
import Outport from 'outport';
const outport = new Outport({
title: 'User Management APIs',
version: '1.1.4',
servers: [
'https://outport-demo-production.up.railway.app',
'http://localhost:8080',
'https://api.example.com/v1'
],
headers: [
{
key: "Authorization",
value: "Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
description: "Used for global session identification across requests"
}
],
description: `Outport is a versatile library for API testing and documentation, offering a user-friendly interface to define, test, and visualize API endpoints for seamless debugging and collaboration.`,
playground:true
});
Define your API endpoints using the outport.use()
method. Here’s an example with routes for Authentication
and Users
:
outport.use("Authentication", [
{
path: "/login",
method: "POST",
summary: "Authenticate user and return token.",
body: {
type: "json",
data: [
{ key: "username", value: "johndoe" },
{ key: "email", value: "johndoe@example.com" },
{ key: "password", value: "testing123!" }
]
},
responses: [
{
status: 200,
description: "Login successful.",
value: {
message: "Login successful",
user: {
id: 1,
username: "johndoe",
email: "johndoe@example.com",
token: "abc123xyz"
}
}
}
]
}
]);
outport.use("Users", [
{
path: "/users",
method: "GET",
summary: "Fetch a list of users.",
parameters: [
{ key: "page", value: "1", description: "Page number" },
{ key: "limit", value: "10", description: "Items per page" }
],
responses: [
{
status: 200,
description: "List of users.",
value: {
message: "Fetched all users successfully",
users: [
{ id: 1, username: "johndoe", email: "johndoe@example.com" },
{ id: 2, username: "janedoe", email: "janedoe@example.com" }
]
}
}
]
}
]);
Integrate Outport’s documentation in your Express app by adding:
app.use('/docs', outport.serve());
Start your app and navigate to /docs
to access the interactive documentation of your API.
npm run build
: Transpiles TypeScript files and copies public assets to the lib/
directory.npm run test
: Placeholder for tests, currently outputs a test error.The project relies on the following development dependencies:
src/public
to lib
.This project is licensed under the ISC License.
Find the source code and contribute at GitHub.
FAQs
Outport is a versatile library for API testing and documentation, offering a user-friendly interface to define, test, and visualize API endpoints for seamless debugging and collaboration.
The npm package outport receives a total of 4 weekly downloads. As such, outport popularity was classified as not popular.
We found that outport demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.