intent-driven-template icon indicating copy to clipboard operation
intent-driven-template copied to clipboard

gherkin-lint fails npm audit (1 critical, 4 high) and is no longer maintained

Open siraj-samsudeen opened this issue 1 month ago • 0 comments

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, via gherkin → 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

  1. gherklin (on a current @cucumber/gherkin). The audit came back clean, but its rules also skip scenarios inside Rule:. We had to rewrite about ten rules ourselves, and add tsx and a zod override.
  2. No separate linter. cucumber-js already rejects malformed Gherkin and undefined steps on every run. npm audit is 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.

siraj-samsudeen avatar Oct 31 '26 10:10 siraj-samsudeen