# Risk map — stylelint/stylelint

> Canonical page: https://codevetter.com/unpack/stylelint/risk-map

# Risk map — stylelint/stylelint

Scanned commit bc06c7cdb1413de3d8dc939b33af138ab7e59df1 (2026-10-01). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

The main sensitive boundaries are executable extensions, arbitrary configured filesystem paths, cache invalidation, and privileged workflow automation. Several source details warrant focused regression checks, particularly custom cwd handling and shared mutable state. Observations below describe behavior or explicitly labeled hypotheses; they are not confirmed vulnerabilities.
- Plugin, processor, syntax, loader, and formatter paths load JavaScript into the current Node process; dynamicImport directly invokes import rather than providing an execution sandbox. — [lib/augmentConfig.mjs#L400-410](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/augmentConfig.mjs#L400-L410) [lib/augmentConfig.mjs#L447-456](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/augmentConfig.mjs#L447-L456) [lib/utils/getCustomSyntax.mjs#L12-17](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/utils/getCustomSyntax.mjs#L12-L17) [lib/utils/dynamicImport.mjs#L14-26](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/utils/dynamicImport.mjs#L14-L26)
- Module resolution tries the configuration directory, cwd, and global node_modules; config explorers use global search strategy, so resolution can cross the project directory boundary. — [lib/utils/getModulePath.mjs#L24-39](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/utils/getModulePath.mjs#L24-L39) [lib/createStylelint.mjs#L20-29](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/createStylelint.mjs#L20-L29)
- Caller-controlled paths reach stylesheet/reference reads and fix/report writes; report output recursively creates parent directories, while FileCache can remove and recreate its configured cache file after a load failure. — [lib/getPostcssResult.mjs#L38-41](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/getPostcssResult.mjs#L38-L41) [lib/utils/getReferenceRoots.mjs#L26-32](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/utils/getReferenceRoots.mjs#L26-L32) [lib/writeOutputFile.mjs#L11-14](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/writeOutputFile.mjs#L11-L14) [lib/utils/FileCache.mjs#L33-44](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/utils/FileCache.mjs#L33-L44)
- Hypothesis: heterogeneous per-file configurations need careful cache regression coverage because FileCache.calcHashOfConfig retains only its first hash, although lintSource calls it with each file's resolved config. (inferred) — [lib/utils/FileCache.mjs#L54-60](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/utils/FileCache.mjs#L54-L60) [lib/utils/FileCache.mjs#L78-95](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/utils/FileCache.mjs#L78-L95) [lib/lintSource.mjs#L81-86](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/lintSource.mjs#L81-L86) [lib/getConfigForFile.mjs#L89-106](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/getConfigForFile.mjs#L89-L106)
- Suppression file location is resolved against standalone's cwd, but suppression entry keys are calculated using process.cwd(); persistence uses plain writeFile, and suppression matches counts rather than individual diagnostic identities. — [lib/standalone.mjs#L327-350](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/standalone.mjs#L327-L350) [lib/utils/suppressionsService.mjs#L160-183](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/utils/suppressionsService.mjs#L160-L183) [lib/utils/suppressionsService.mjs#L274-287](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/utils/suppressionsService.mjs#L274-L287)
- computeEditInfo invokes fix.apply and mutates nodes even without config.fix; it suppresses overlapping edits and records a narrowed replacement, making rule order and mutation behavior material to editor integration. — [lib/utils/report.mjs#L230-267](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/utils/report.mjs#L230-L267) [lib/lintPostcssResult.mjs#L55-60](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/lintPostcssResult.mjs#L55-L60)
- Rule callbacks share PostCSS roots/results and are collected into promises; deprecated context.fix remains supported but is disabled for rules affected by inline disable ranges. — [lib/lintPostcssResult.mjs#L110-154](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/lintPostcssResult.mjs#L110-L154) [lib/lintPostcssResult.mjs#L157-166](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/lintPostcssResult.mjs#L157-L166)
- The privileged workflow_run comment job consumes downloaded preview artifact metadata; postCustomComment takes output.number as its target and constructs comments from package URLs. The inspected workflow has a repository guard but no success-condition guard. — [.github/workflows/update-pkg.pr.new-comment.yml#L9-23](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/.github/workflows/update-pkg.pr.new-comment.yml#L9-L23) [.github/workflows/update-pkg.pr.new-comment.yml#L35-54](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/.github/workflows/update-pkg.pr.new-comment.yml#L35-L54) [scripts/pkg.pr.new-custom-comment.mjs#L14-28](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/scripts/pkg.pr.new-custom-comment.mjs#L14-L28) [scripts/pkg.pr.new-custom-comment.mjs#L67-98](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/scripts/pkg.pr.new-custom-comment.mjs#L67-L98)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
