Files
chat_web_app/llm-fe/vendor/brace-expansion-compat/index.js
T
westfarn 44f412fffa
Unit Tests / test (push) Successful in 11s
Deploy Beta / unit-tests (push) Successful in 11s
Deploy Beta / deploy-beta (push) Failing after 51s
Remediate llm-fe npm audit critical/high vulnerabilities (#69)
## Summary
- Closes #53
- `npm audit` in `llm-fe`: **103 → 4** (0 critical, 0 high; 4 moderate remain)
- Applied `npm audit fix`, bumped direct floors (`axios`, `react-router-dom`), pinned `styled-components@6.1.15` for CRA typecheck stability
- Added npm `overrides` for vulnerable transitive leaves (`tar`, `postcss`, `svgo`, `sharp`, `ws`, `flatted`, etc.)
- Vendored CRA-compatible `brace-expansion@5.0.8` shim (v1 default-export API + GHSA-mh99 DoS limits)

## Remaining (documented)
- **moderate:** `react-router`/`react-router-dom` — needs v7 (breaking)
- **moderate:** `webpack-dev-server` via `react-scripts` — CRA incompatible with patched WDS 5.2.6+; needs CRA → Vite (or similar) follow-up
- Deprecation warnings from CRA/`eslint@8`/old `glob` tooling still present until toolchain migrate

## Test plan
- [x] `npm ci` in `llm-fe`
- [x] `npm audit` → 0 critical / 0 high
- [x] `npm run build`
- [x] `npm run test:ci` → 25 suites / 112 tests passedReviewed-on: #69
2026-07-29 17:41:00 -07:00

16 lines
502 B
JavaScript

'use strict';
// minimatch@3 and other CRA tooling expect module.exports to be the expand
// function (brace-expansion v1 API). Upstream 5.0.8 exports { expand } and
// includes the GHSA-mh99-v99m-4gvg DoS limits.
const safe = require('./lib');
function expandTop(str, options) {
return safe.expand(str, options);
}
module.exports = expandTop;
module.exports.expand = safe.expand;
module.exports.EXPANSION_MAX = safe.EXPANSION_MAX;
module.exports.EXPANSION_MAX_LENGTH = safe.EXPANSION_MAX_LENGTH;