Files
ruflo/v3/@claude-flow/plugins/src
rUv a3dee4ff8b fix(plugins): parameterize gnn.ts SQL generation to close SQL injection gap (#3564)
BaseGNNLayer.toSQL, GraphOperations' kHopNeighborsSQL/shortestPathSQL/
pageRankSQL/communityDetectionSQL, and GNNSQLGenerator's static SQL
builders interpolated schema/table/column identifiers and node id/
algorithm string values directly into executed SQL. TypeScript types
are erased at runtime, so any caller passing through untrusted input
reached executed SQL (CWE-89).

Adds sqlIdent/sqlLiteral/sqlNumber/sqlInt/sqlJson/sqlParamPrefix
helpers mirroring attention.ts's existing sqlNumber/sqlBool hardening
(PR #3530): identifiers are validated against ^[A-Za-z_][A-Za-z0-9_]*$
and quoted, string values are single-quote-escaped, numeric params are
validated finite/integer, and JSON config blobs are escaped before
embedding in a jsonb literal (a `'` inside a config value could
previously break out of the surrounding SQL string).

Adds __tests__/gnn-sql-injection.test.ts (24 tests, mirroring the
existing attention-sql-injection.test.ts pattern): byte-identical SQL
for legitimate input, and a TypeError for each malicious identifier/
value/numeric field. Verified baseline-fails/candidate-passes via
stash isolation (22/25 new tests fail against the unpatched file, all
pass against the fix). Full plugins suite: 473 passed/3 skipped both
before and after, tsc --noEmit clean.

Fixes #3531
2026-09-30 10:22:00 -04:00
..
2026-01-06 01:08:00 +00:00
2026-01-06 01:05:26 +00:00
2026-01-06 01:04:53 +00:00