Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
read-cmd-shim
Advanced tools
Figure out what a cmd-shim is pointing at. This acts as the equivalent of fs.readlink.
Figure out what a cmd-shim
is pointing at. This acts as the equivalent of
fs.readlink
.
const readCmdShim = require('read-cmd-shim')
readCmdShim('/path/to/shim.cmd').then(destination => {
…
})
const destination = readCmdShim.sync('/path/to/shim.cmd')
Reads the cmd-shim
located at path
and resolves with the relative
path that the shim points at. Consider this as roughly the equivalent of
fs.readlink
.
This can read both .cmd
style that are run by the Windows Command Prompt
and Powershell, and the kind without any extension that are used by Cygwin.
This can return errors that fs.readFile
returns, except that they'll
include a stack trace from where readCmdShim
was called. Plus it can
return a special ENOTASHIM
exception, when it can't find a cmd-shim in the
file referenced by path
. This should only happen if you pass in a
non-command shim.
Same as above but synchronous. Errors are thrown.
5.0.0 (2024-09-24)
read-cmd-shim
now supports node ^18.17.0 || >=20.5.0
ab0eecd
#109 enable auto publish (#109) (@reggi)442a62a
#107 run template-oss-apply (@hashtagchris)b41ae60
#104 bump cmd-shim from 6.0.3 to 7.0.0 (@dependabot[bot])994fac3
#105 bump @npmcli/eslint-config from 4.0.5 to 5.0.0 (@dependabot[bot])c4f85f3
#94 linting: no-unused-vars (@lukekarrys)a0a4b33
#94 bump @npmcli/template-oss to 4.22.0 (@lukekarrys)20721b4
#54 deps: remove rimraf (#54) (@lukekarrys)b41c7e9
#42 bump cmd-shim from 5.0.0 to 6.0.0 (@dependabot[bot])73b8dd5
#43 bump @npmcli/eslint-config from 3.1.0 to 4.0.0 (@dependabot[bot])19bd13d
#106 postinstall for dependabot template-oss PR (@hashtagchris)0b8954c
#106 bump @npmcli/template-oss from 4.23.1 to 4.23.3 (@dependabot[bot])FAQs
Figure out what a cmd-shim is pointing at. This acts as the equivalent of fs.readlink.
The npm package read-cmd-shim receives a total of 2,853,158 weekly downloads. As such, read-cmd-shim popularity was classified as popular.
We found that read-cmd-shim demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 open source maintainers 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.