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.
openapi-filter
Advanced tools
Filter internal paths, operations, parameters, schemas etc from OpenAPI/Swagger definitions
Filter internal paths, operations, parameters, schemas etc from OpenAPI/Swagger/AsyncAPI definitions.
Simply flag any object within the definition with an x-internal
specification extension, and it will be removed from the output.
For example:
openapi: 3.0.0
info:
title: API
version: 1.0.0
paths:
/:
get:
x-internal: true
...
Works with OpenAPI/Swagger 2.0 and 3.0.x and AsyncAPI definitions.
openapi-filter.js <infile> [outfile]
Positionals:
infile the input file
outfile the output file
Options:
--info include complete info object with --valid [boolean]
--inverse, -i output filtered elements only [boolean]
--flags, -f flags to filter by [array] [default: ["x-internal"]]
--flagValues, -v flag String values to match [array] [default: []]
--checkTags filter if flags given in --flags are in the tags array
[boolean]
--overrides, -o prefixes used to override named properties[arr] [default: []]
--valid try to ensure inverse output is valid [boolean]
--strip, -s strip the flags from the finished product [boolean]
--servers include complete servers object with --valid [boolean]
--lineWidth, -l max line width of yaml output [number] [default: -1]
--maxAliasCount maximum YAML aliases allowed [number] [default: 100]
--configFile The file & path for the filter options [path]
--help Show help [boolean]
--verbose Output more details of the filter process [count]
use --
to separate flags or other array options from following options, i.e.:
openapi-filter --flags x-private x-hidden -- source.yaml target.yaml
or
let openapiFilter = require('openapi-filter');
let options = {}; // defaults are shown
//options.inverse = false;
//options.valid = false;
//options.flags = ['x-internal'];
let res = openapiFilter.filter(obj,options);
See the wiki for further examples.
FAQs
Filter internal paths, operations, parameters, schemas etc from OpenAPI/Swagger definitions
The npm package openapi-filter receives a total of 7,301 weekly downloads. As such, openapi-filter popularity was classified as popular.
We found that openapi-filter 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.
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.