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.
A JavaScript library to parse .tar
and .tar.gz
(gzip-compressed tarballs) files. It supports extracting file metadata and content directly in the browser or Node.js environments.
You can install the library using npm or include it via a <script>
tag.
npm install tarparser
<script src="tarparser.js"></script>
Import the parseTar function to start using the library:
import { parseTar } from 'tarparser';
// Select file input from DOM
const fileInput = document.querySelector('input[type="file"]');
fileInput.addEventListener('change', async () => {
const file = fileInput.files[0];
// Read file as ArrayBuffer
const buffer = await file.arrayBuffer();
// Parse the .tar.gz file
const tarFiles = await parseTar(buffer);
// Log file names and content
tarFiles.forEach(file => {
console.log(`Name: ${file.name}`);
console.log(`Content: ${file.text}`);
});
});
parseTar(data: ArrayBuffer | Uint8Array): Promise<TarFileItem[]>
Each file item has the following properties:
File Attributes
File Types Supported
FAQs
TAR parser written in pure javascript
The npm package tarparser receives a total of 32 weekly downloads. As such, tarparser popularity was classified as not popular.
We found that tarparser 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.