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.
yaml-transmute
Advanced tools
YAML parser that lets you write back the YAML file later without loosing the file structure (comments, field order, etc..)
If you need to change the content of a YAML file, without losing the key order or field comments, this is the right package for you.
While parsing, yaml-transmute
builds a context (key order + comments) that is returned to the caller and can be later used to stringify the original object that was slightly modified.
This package is based on Eemeli's YAML npm package.
import { parse, stringify, YAMLContext } from "yaml-transmute";
const [obj, ctx]: [unknown, YAMLContext] = parse(`# Comment
foo:
bar: a # Inline comment
baz: b
qux: 0
`);
console.log(obj); // { foo: {bar: "a", baz: "b" }, qux: 0 }
// Create a new object, similar to the original one
const newObj = { foo: { bar: 1 }, qux: true, quux: false };
// Stringify the new object, using the context gathered from `parse`
const stringifiedYaml = stringify(newObj, ctx);
console.log(stringifiedYaml);
// # Comment
// foo:
// bar: 1 # Inline comment
// qux: true
// quux: false
FAQs
YAML parser that lets you write back the YAML file later without loosing the file structure (comments, field order, etc..)
The npm package yaml-transmute receives a total of 478 weekly downloads. As such, yaml-transmute popularity was classified as not popular.
We found that yaml-transmute demonstrated a healthy version release cadence and project activity because the last version was released less than 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.