
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
openapi-directory
Advanced tools
Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS
Part of HTTP Toolkit: powerful tools for building, testing & debugging HTTP(S)
This repo builds & bundles the OpenAPI Directory, so you can easily find, require and use any OpenAPI spec from the directory in your JS projects.
It provides files that can be individually required or remotely downloaded (via https://unpkg.com/openapi-directory/) for every API in the collection, and an index to quickly find the relevant OpenAPI spec for a given URL.
All specs are:
That means you can import them, and immediately & consistently start using them.
First up, install it with:
npm install openapi-directory
All OpenAPI specs can be now required with:
const spec = require('openapi-directory/api/<spec-id>.json');
(or read from https://unpkg.com/openapi-directory/api/<spec-id>.json
)
The easiest way to obtain a spec id is to use the index. You can look up a URL in the index with:
const { findApi } = require('openapi-directory');
findApi('wikimedia.org/api/rest_v1/feed/availability');
findApi
takes a URL (host and path, without the protocol) within any API, and will return either:
Alternatively if you know in advance which spec you want you can require it directly. The id for every spec in the directory is made up of the provider name, followed by a slash and the service name if a service name exists. Some example ids:
xkcd.com
(provider is xkcd.com, no service name)amazonaws.com/acm
(provider is amazonaws.com, service name is acm).You can find the provider and service name in the spec itself (under info
, x-providerName
and x-serviceName
), and you can browse the raw specs directly at https://github.com/APIs-guru/openapi-directory.
This repo/npm module is licensed as MIT.
The license for API definitions varies by spec, see https://github.com/APIs-guru/openapi-directory#licenses for more information.
In general it's very likely that your use of any API definition is covered either by CC0 (for specs submitted directly to the directory), the spec's own license (check info.license
) or by Fair Use provisions when communicating with the corresponding service. This is not formal legal advice though, its your responsibility to confirm this for yourself for the specs you're using.
FAQs
Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS
The npm package openapi-directory receives a total of 5,671 weekly downloads. As such, openapi-directory popularity was classified as popular.
We found that openapi-directory demonstrated a healthy version release cadence and project activity because the last version was released less than 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
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.