Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Documented Kubernetes/IaC as follow-up work rather than a current
blocker for this static app.

### Security

- Removed the dynamic `new RegExp(...)` in `parseMsProjectXml`'s `tag()` helper
(`cloud-sync.js`) that the SAST gate flagged for potential ReDoS
(`detect-non-literal-regexp`). Every caller passes a hardcoded tag name and
the pattern was linear, so it was not exploitable, but the extractor now uses
`indexOf` slicing with identical semantics — clearing the finding at base
rather than suppressing it. Verified unchanged by the MS Project import unit
tests.
- Upgraded the `@hono/node-server` runtime dependency from `^1.19.14` to
`^2.0.12` to clear GHSA-frvp-7c67-39w9 (moderate: `serve-static` path
traversal on Windows via an encoded backslash). ScopeWeave only calls the
stable `serve()` entry — it does not use `@hono/node-server`'s `serveStatic`
helper, so the vulnerable path was unreachable, but the dependency is bumped
to keep the lockfiles clean. Verified with `npm run test:unit` and
`npm run test:api` (server boots and passes the API + rate-limit smoke under
v2); both `package-lock.json` and `pnpm-lock.yaml` updated.

## [1.0.0] - 2026-04-20

<!-- markdownlint-disable-next-line MD024 -->
Expand Down
15 changes: 13 additions & 2 deletions cloud-sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -739,9 +739,20 @@ function openReportModal() {
// no DOMParser needed → node-testable); swap for a real XML parser if
// hand-edited files ever matter.
export function parseMsProjectXml(xml) {
// Extract the text of a simple <name>…</name> element without building a
// dynamic RegExp from `name` (which trips SAST ReDoS/regex-injection rules,
// even though every caller passes a hardcoded tag). indexOf slicing mirrors
// the original /<name>([^<]*)<\/name>/ semantics: the run must contain no
// '<', so a nested tag yields '' rather than a false capture.
const tag = (block, name) => {
const m = block.match(new RegExp(`<${name}>([^<]*)</${name}>`));
return m ? m[1].trim() : '';
const open = `<${name}>`;
const start = block.indexOf(open);
if (start === -1) return '';
const from = start + open.length;
const end = block.indexOf(`</${name}>`, from);
if (end === -1) return '';
const content = block.slice(from, end);
return content.includes('<') ? '' : content.trim();
};
const unescape = (s) => s
.replace(/&lt;/g, '<').replace(/&gt;/g, '>').replace(/&quot;/g, '"')
Expand Down
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"fuzz": "node --test tests/fuzz/*.mjs"
},
"dependencies": {
"@hono/node-server": "^1.19.14",
"@hono/node-server": "^2.0.12",
"hono": "^4.12.27"
},
"devDependencies": {
Expand Down
12 changes: 6 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading