
Research
GemStuffer Campaign Abuses RubyGems as Exfiltration Channel Targeting UK Local Government
GemStuffer abuses RubyGems as an exfiltration channel, packaging scraped UK council portal data into junk gems published from new accounts.
remark-autofix
Advanced tools
This project, remark-autofix, is a remark plugin
to apply fixes from warnings raised by retext plugins.
The fixes are applied to the markdown abstract syntax tree when running
remark-retext in bridge mode.
By default, this plugin only fixes vfile messages emitted from the following retext plugins:
By passing the options parameter, following the API, this plugin is tested to support:
npm install remark-autofix
# or
yarn add remark-autofix
NOTE Chained calls to a remark processor's use method must occur in the following order with the following arguments:
use(remark2retext, retextProcessor)
retextProcessor must define a retext processor, which should emit vfile messages.use(autofix[, options])
With retext-repeated-words:
const remark = require('remark');
const unified = require('unified');
const english = require('retext-english');
const remark2retext = require('remark-retext');
const repeated = require('retext-repeated-words');
const autofix = require('remark-autofix');
const inputMarkdown = `## Example
This link [link](https://example.com/) is not not duplicated.
`
const processor = remark().use(
remark2retext, unified().use(english).use(repeated)
).use(autofix);
const outputMarkdown = processor.processSync(inputMarkdown).toString();
The outputMarkdown should be:
## Example
This [link](https://example.com/) is not duplicated.
With retext-profanities:
const remark = require('remark');
const unified = require('unified');
const english = require('retext-english');
const remark2retext = require('remark-retext');
const profanities = require('retext-profanities');
const autofix = require('remark-autofix');
const inputMarkdown = `Ah geez, you are not a loser.
`
const processor = remark().use(
remark2retext, unified().use(english).use(profanities)
).use(autofix, {
fixers: {
'retext-profanities': (message) => {
// Censor all but first letter of certain cuss words
if (message.profanitySeverity >= 2 ) {
return message.actual.replace(/\B./g,'-')
}
}
});
const outputMarkdown = processor.processSync(inputMarkdown).toString();
The outputMarkdown should be:
Ah g---, you are not a l----.
remark().use(remark2retext, retextProcessor).use(autofix, options)remark and remark2retextThese must be imported from remark and remark-retext.
retextProcessorA retext processor created by chaining unified's use method on:
retext-englishretext plugins to emit vfile messagesautofixThis is imported from this package, remark-autofix.
It applies fixes to markdown from all supported vfile messages emitted from retextProcessor.
optionsThis is an optional object with one fixers property containing an object defined below.
options.fixersThis is an object to map retext plugin names to custom functions.
See supported plugin names.
Each function provided in fixers should have the following signature:
Parameters:
message (vfile-message)For supported plugins, each message has the following relevant custom properties in addition to the vfile-message standard:
actual string identifying the part of the vfile that should be altered or removed.expected array of strings. For certain plugins, the array may be empty to indicate that the actual value should be removed.Return:
null)The plugin takes no action if the function returns null. A returned string becomes the sole value to consider from the message.
The plugin evaluates all returned values from partially overlapping location ranges for the value of a single replacement.
The plugin replaces all mdast nodes in the range with a single mdast node taking on the following value:
location.start) of the unique values returned for all overlapping messagesThis repository works in conjunction with
remark processorremark-retext processorretext processor created by chaining unified's use method on:
retext supported plugins to emit vfile messagesThe plugin works with mdast to represent markdown and nlcst to represent text.
FAQs
A remark plugin to apply fixes from warnings raised by other plugins
We found that remark-autofix 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
GemStuffer abuses RubyGems as an exfiltration channel, packaging scraped UK council portal data into junk gems published from new accounts.

Company News
Socket was named to the Rising in Cyber 2026 list, recognizing 30 private cybersecurity startups selected by CISOs and security executives.

Research
Socket detected 84 compromised TanStack npm package artifacts modified with suspected CI credential-stealing malware.