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.
@bengourley/source-map-decoder
Advanced tools
Parse a source map and output the data in a way that makes sense to humans
Parse a source map and output the data in a way that makes sense to humans
This started life as a gist for the purpose of this blog post.
It reads a source map, and outputs an object with a similar structure, replacing the VLQ mappings
property with a human-readable format:
"mappings": {
"0": [
^
└── the line number of the output file
"231 => source.js 5:64 foo"
^ ^ ^ ^
│ │ │ └── the symbol name from the source file
│ │ │
│ │ └── the line:column position in the source file
│ │
│ └── the name of the source file
│
└── the column number of the output file
]
}
npm i -g @bengourley/source-map-decoder
cat my-source-map.js.map | decode-source-map
This will output some not very pretty JSON so I recommend combining it with the jq
tool (available on a mac with brew install jq
) to pretty-print and colourise the output:
cat my-source-map.js.map | decode-source-map | jq .
The above command will pretty print the entire source map structure, potentially including all sources. So to just view the mappings property, use jq's selector interface:
cat my-source-map.js.map | decode-source-map | jq .mappings
ISC
FAQs
Parse a source map and output the data in a way that makes sense to humans
The npm package @bengourley/source-map-decoder receives a total of 98 weekly downloads. As such, @bengourley/source-map-decoder popularity was classified as not popular.
We found that @bengourley/source-map-decoder 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.