intent-driven-template
intent-driven-template copied to clipboard
gherkin-lint fails npm audit (1 critical, 4 high) and is no longer maintained
The JavaScript acceptance stack (.agents/skills/acceptance-test-authoring/references/javascript/SETUP.md) installs gherkin-lint for lint:specs. Its latest release, 4.2.4, came out in December 2023. A fresh install of it alone fails npm audit:
npm init -y && npm install [email protected] && npm audit
8 vulnerabilities (3 moderate, 4 high, 1 critical)
- critical:
protobufjs, viagherkin→cucumber-messages(arbitrary code execution) - high:
lodash(code injection, prototype pollution),cucumber-messages,gherkin,gherkin-lint - moderate:
minimatch,uuid,glob
npm audit fix --force offers only gherkin-lint 0.0.15, so there's no clean fix. The setup notes also say its AST rules don't look inside Rule: blocks.
What we tried in a project that uses this template
- gherklin (on a current
@cucumber/gherkin). The audit came back clean, but its rules also skip scenarios insideRule:. We had to rewrite about ten rules ourselves, and addtsxand azodoverride. - No separate linter.
cucumber-jsalready rejects malformed Gherkin and undefined steps on every run.npm auditis clean. What's lost is style-only checks, such as unnamed scenarios and tag or whitespace hygiene.
We went with option 2. If you'd take it, we can send a PR that removes gherkin-lint and .gherkin-lintrc from the JavaScript and shared references and updates the lint section. Or tell us if you'd prefer another linter.