
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
@aminzer/dir-diff
Advanced tools
NodeJS utility for recursive directory comparison.
npm i @aminzer/dir-diff
import { compareDirectories } from '@aminzer/dir-diff';
await compareDirectories('d:/work', 'e:/backups/work', {
onSourceOnlyEntry: (fsEntry) => {
console.log(`${fsEntry.isFile ? 'File' : 'Directory'} ${fsEntry.relativePath} exists in the source directory only`);
},
onTargetOnlyEntry: (fsEntry) => {
console.log(`${fsEntry.isFile ? 'File' : 'Directory'} ${fsEntry.relativePath} exists in the target directory only`);
},
onDifferentEntries: (sourceFsEntry, targetFsEntry) => {
console.log(`File ${sourceFsEntry.relativePath} exists in both source and target directories, but with different content`);
},
});
compareDirectories
compareDirectories is used for recursive comparison of 2 directories.
compareDirectories(sourceDirPath, targetDirPath, opts)
sourceDirPath (string, required) - path to the source directory.targetDirPath (string, required) - path to the target directory.opts (object, optional) - additional options to pass:
onSourceOnlyEntry (function, undefined by default) - function that is called for files and directories that are present in source directory, but are missing in target directory. Corresponding FsEntry instance is passed as parameter.onTargetOnlyEntry (function, undefined by default) - function that is called for files and directories that are missing in source directory, but are present in target directory. Corresponding FsEntry instance is passed as parameter.onDifferentEntries (function, undefined by default) - function that is called for files that are present in both source and target directories but have different content. Corresponding FsEntry instances are passed as parameters.onEachEntry (function, undefined by default) - function that is called for all files and directories from both source and target directories. Corresponding FsEntry instance is passed as parameter.skipContentComparison (boolean, false by default) - files are compared by size only. Content comparison is skipped. It speeds up execution by avoiding "expensive" content-comparison process for large files.skipExcessNestedIterations (boolean, false by default) - children of source-only and target-only directories are not considered. It speeds up execution by avoiding recursive calls for such directories.Promise that becomes fulfilled when directory comparison is completed.
FsEntry
FsEntry - class representing File System Entry (file or directory).
import { FsEntry } from '@aminzer/dir-diff';
Instance properties:
name (string) - name of entry.absolutePath (string) - absolute path to entry.relativePath (string) - relative path to entry. It's relative to source directory for source entries and relative to target directory for target entries.size (number) - size of file in bytes, 0 for directories.isFile (boolean) - true if entry is file.isDirectory (boolean) - true if entry is directory.FAQs
Utility for recursive directory iteration and comparison
We found that @aminzer/dir-diff 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
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.