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.
schema-watcher
Advanced tools
A bare-bones command line utility that watches a JSON-schema file and a data file and validates the data against the schema in real time
npm i -g schema-watcher
or
yarn global add schema-watcher
> swatch [-h] -f FILE -s SCHEMA [-q QUERY] [-d]
--help
(-h
): Show the help message
--file
(-f
) FILE: Path to the data file (YAML or JSON)
--schema
(-s
) SCHEMA: Path to a schema file (YAML or JSON)
--query
(-q
) QUERY: JMESpath query to the schema if nested
within a larger document. Particularly useful when validating against a
nested portion of a larger schema.
For example, if you have a file with multiple schemas like this
schema-1:
type: object
properties:
something:
$ref: '#/.schema-2'
schema-2:
type: object
properties:
hello:
type: string
enum:
- world
- nurse
- dolly
you could validate a document against schema-2
by specifying --query schema-2
-d
: Dereference the Schema object (i.e. expand the '$ref' attributes).
This may be required when the schema is nested within a larger document,
but may increase memory usage and slow down validation. In the above example, when validing a docuemnt against schema-1
you may need to specify the -d
flag to dereference the $ref: ...
reference
FAQs
File Watcher + Schema Validator
The npm package schema-watcher receives a total of 0 weekly downloads. As such, schema-watcher popularity was classified as not popular.
We found that schema-watcher 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.