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.
openapi-graph-core
Advanced tools
A TS library to manage large API projects defined by OpenAPIv3 specification.
A TS library to manage large API projects defined by OpenAPIv3 specification.
Just run
npm install openapi-graph-core
and you are good to go.
This README.md
is only for the API of this library. You can check the cli to run it in the console here
OpenAPI-graph provide two major classes that are accesible called: OpenAPIGraphs
and Analyzer
.
This class will create the graphs of the APIs. You can provide a root path, which will be used to look for the API specifications. For example, a valid root path if we use one of the examples would be:
const OpenAPIGrahCore = require('openapi-graph-core');
(async () => {
const graphs = await new OpenAPIGrahCore.OpenAPIGraphs('./tests/resources/social-network').build()
/* It will return
{
"social-network.yaml": { Omitting graph ... },
"./posts/posts.yaml": { Omitting graph ... },
"./users/users.yaml": { Omitting graph ... },
}
*/
})();
It will analyze the graphs checking different conditions. You can initiazlie as follows (you need to initialize OpenAPIGrahps
):
const OpenAPIGrahCore = require('openapi-graph-core');
(async () => {
const graphs = await new OpenAPIGrahCore.OpenAPIGraphs('./tests/resources/social-network').build()
const analyzer = OpenAPIGrahCore.Analyzer(graphs)
})();
For now, these function have been developed:
Function | Description | Returns |
---|---|---|
getUnusedSchemas() | It will check all the schemas declared but not being used in the components.schemas container | JSON |
getDeprecatedSchemasBeingUsed() | It will check all the deprecated schemas declared being in used | JSON |
FAQs
A TS library to manage large API projects defined by OpenAPIv3 specification.
The npm package openapi-graph-core receives a total of 2 weekly downloads. As such, openapi-graph-core popularity was classified as not popular.
We found that openapi-graph-core 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’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.