
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
remark-message-control
Advanced tools
Enable, disable, and ignore messages with remark.
npm:
npm install remark-message-control
Say we have the following file, example.md
:
<!--foo ignore-->
## Heading
And our script, example.js
, looks as follows:
var vfile = require('to-vfile');
var report = require('vfile-reporter');
var remark = require('remark');
var control = require('remark-message-control');
remark()
.use(warn)
.use(control, {name: 'foo'})
.process(vfile.readSync('example.md'), function (err, file) {
console.error(report(err || file));
});
function warn() {
return function (tree, file) {
file.message('Whoops!', tree.children[1], 'foo:thing');
};
}
Now, running node example
yields:
example.md: no issues found
remark.use(control, options)
Let comment markers control messages from a certain sources.
options.name
string
— Name of markers that can control the message sources.
For example, {name: 'alpha'}
controls alpha
markers:
<!--alpha ignore-->
options.known
Array.<string>
, optional — List of allowed ruleId
s. When given, a warning
is shown when someone tries to control an unknown rule.
For example, {name: 'alpha', known: ['bravo']}
results in a warning if
charlie
is configured:
<!--alpha ignore charlie-->
options.reset
boolean
, default: false
— Whether to treat all messages as turned off
initially.
options.enable
Array.<string>
, optional — List of allowed ruleId
s used when reset: true
to initially turn on. By default (reset: false
), all rules are turned on.
options.disable
Array.<string>
, optional — List of disallowed ruleId
s used when
reset: false
to initially turn off.
options.sources
string
or Array.<string>
, optional — One or more sources which markers by
the specified name
can control. Defaults to options.name
.
disable
The disable marker turns off all messages of the given rule identifiers. When without identifiers, all messages are turned off.
For example, to turn off certain messages:
<!--lint disable list-item-bullet-indent strong-marker-->
* **foo**
A paragraph, and now another list.
* __bar__
enable
The enable marker turns on all messages of the given rule identifiers. When without identifiers, all messages are turned on.
For example, to enable certain messages:
<!--lint enable strong-marker-->
**foo** and __bar__.
ignore
The ignore marker turns off all messages of the given rule identifiers occurring in the following node. When without identifiers, all messages are turned off.
After the end of the following node, messages are allowed again.
For example, to turn off certain messages for the next node:
<!--lint ignore list-item-bullet-indent strong-marker-->
* **foo**
* __bar__
See contribute.md
in remarkjs/remarkjs
for ways to get
started.
This organisation has a Code of Conduct. By interacting with this repository, organisation, or community you agree to abide by its terms.
FAQs
remark plugin to enable, disable, and ignore messages with remark
The npm package remark-message-control receives a total of 183,817 weekly downloads. As such, remark-message-control popularity was classified as popular.
We found that remark-message-control demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.