From 6d27d1ccb6860e4cb245ac220fd10a7f13fcff0c Mon Sep 17 00:00:00 2001 From: johndoe6345789 Date: Mon, 19 Jan 2026 10:10:37 +0000 Subject: [PATCH] stuff --- .claude/settings.local.json | 2 +- .../default/cache/predicates/13.pack | Bin 156 -> 156 bytes .../default/cache/predicates/20.pack | Bin 308 -> 308 bytes .../default/cache/predicates/c8.pack | Bin 153 -> 153 bytes .../default/cache/predicates/d5.pack | Bin 155 -> 155 bytes ...-diagnostics-add-20260119T094435.362Z.json | 0 codeql-db-optimized/diagnostic/mcp-test.sarif | 1 + .../queries/ComponentCustomHookUsage.bqrs | 2 +- .../ComponentFilesInMigrationTargets.bqrs | Bin 6321 -> 6321 bytes .../queries/ComponentFilesWithJSX.bqrs | 2 +- .../queries/ComponentHooksUsage.bqrs | Bin 7466 -> 7466 bytes .../ImportsConvertedJsonComponents.bqrs | Bin 406 -> 406 bytes .../queries/ImportsJsonDefinitions.bqrs | Bin 388 -> 388 bytes .../queries/LegacyComponentBarrelImports.bqrs | 2 +- .../queries/LegacyComponentImports.bqrs | Bin 373 -> 373 bytes .../LegacyImportsInMigrationTargets.bqrs | Bin 396 -> 396 bytes .../results/run-info-20260119.094435.912.yml | 649 ++++++++++++++++++ codeql-migration.skill | Bin 0 -> 1591 bytes scripts/mcp/{codeql-mcp.js => codeql-mcp.cjs} | 55 +- 19 files changed, 708 insertions(+), 5 deletions(-) create mode 100644 codeql-db-optimized/diagnostic/cli-diagnostics-add-20260119T094435.362Z.json create mode 100644 codeql-db-optimized/diagnostic/mcp-test.sarif create mode 100644 codeql-db-optimized/results/run-info-20260119.094435.912.yml create mode 100644 codeql-migration.skill rename scripts/mcp/{codeql-mcp.js => codeql-mcp.cjs} (80%) diff --git a/.claude/settings.local.json b/.claude/settings.local.json index ea50b6b..7ee3330 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -48,7 +48,7 @@ "mcpServers": { "codeql": { "command": "node", - "args": ["scripts/mcp/codeql-mcp.js"] + "args": ["scripts/mcp/codeql-mcp.cjs"] } } } diff --git a/codeql-db-optimized/db-javascript/default/cache/predicates/13.pack b/codeql-db-optimized/db-javascript/default/cache/predicates/13.pack index e8c7124270e27ff6a052a37f5b7076c20e5ffc9e..4b60ce6071e4ff8285a00aff16a9f494d2239d6b 100644 GIT binary patch delta 18 acmbQkIEQh98pq4#PgAMsR107<(A?f?J) delta 21 ccmdmJxY2Nfi#Ug|p{cQ+g_*@>AMsR107=UQ^Z)<= diff --git a/codeql-db-optimized/results/custom/low-code-react-migration/queries/ComponentFilesWithJSX.bqrs b/codeql-db-optimized/results/custom/low-code-react-migration/queries/ComponentFilesWithJSX.bqrs index 809c532..ea80072 100644 --- a/codeql-db-optimized/results/custom/low-code-react-migration/queries/ComponentFilesWithJSX.bqrs +++ b/codeql-db-optimized/results/custom/low-code-react-migration/queries/ComponentFilesWithJSX.bqrs @@ -28,7 +28,7 @@   ۈ           Ŗ  ˛     ۀӨ ́    ܉ ߊ֋ָ ݌ˍ Ȏ      ݙК ӛŜ ǝ              ʹ̺ ݻ޼        Ї     Ύ   ő     ̗   ƛ       ɭ Ѯ  Բ  ܵ    Ĺ  ڻ м    ڙ ٚ͛ ќ  Ѡء     Ƭ ۭ׮ ʰ   ص ϶    ۾ ٿ             ̃    ׇ          ğ    ˮ   ؁Ƶ ʂ  ӆ Ç   Ҍ   --- -runFileName: run-info-20260119.093153.868.yml +runFileName: run-info-20260119.094435.912.yml relativeBqrsPath: custom/low-code-react-migration/queries/ComponentFilesWithJSX.bqrs metadata: name: Component files with JSX diff --git a/codeql-db-optimized/results/custom/low-code-react-migration/queries/ComponentHooksUsage.bqrs b/codeql-db-optimized/results/custom/low-code-react-migration/queries/ComponentHooksUsage.bqrs index 10110b7848f187813626fbaf007546c49444a061..023844f604a7fa5683dbf54685885ff959d816ab 100644 GIT binary patch delta 21 ccmZ2wwaRM48)*&`6Jt|7OGBg0U!=_#0apVD8vpLsMft3p0z&U!=_#0ap_TApigX diff --git a/codeql-db-optimized/results/custom/low-code-react-migration/queries/ImportsConvertedJsonComponents.bqrs b/codeql-db-optimized/results/custom/low-code-react-migration/queries/ImportsConvertedJsonComponents.bqrs index a4194c2396e31b1bd32f4190128489709b58430d..4a9a8aca291b1e7e7d4963993dffad3842099866 100644 GIT binary patch delta 19 acmbQnJdJsR1BZ!;v8kS=q0vSUKSlsE$OP>G delta 19 acmbQnJdJsR1BbDpsj;4gnZ-sAKSlsE(ggDW diff --git a/codeql-db-optimized/results/custom/low-code-react-migration/queries/ImportsJsonDefinitions.bqrs b/codeql-db-optimized/results/custom/low-code-react-migration/queries/ImportsJsonDefinitions.bqrs index 4ee6316be72d16ce3e56f9934b6dd9d89c291411..80406f86d7fec80620b37c19e8b225ecbe715232 100644 GIT binary patch delta 19 acmZo+ZegC_z+qxyY^rBzXtdG8h7kZU90a!j delta 19 acmZo+ZegC_z+r4?YOH5rX0g%3h7kZUCIr0z diff --git a/codeql-db-optimized/results/custom/low-code-react-migration/queries/LegacyComponentBarrelImports.bqrs b/codeql-db-optimized/results/custom/low-code-react-migration/queries/LegacyComponentBarrelImports.bqrs index 86be41c..c9b2da3 100644 --- a/codeql-db-optimized/results/custom/low-code-react-migration/queries/LegacyComponentBarrelImports.bqrs +++ b/codeql-db-optimized/results/custom/low-code-react-migration/queries/LegacyComponentBarrelImports.bqrs @@ -123,7 +123,7 @@ jԩ ]@5 /  @f  @H7 - /`3-35-5 8 I3I/Oǵ3-3͵5-5ӵ6f6嵐I3I/ 8 Û  `--- -runFileName: run-info-20260119.093153.868.yml +runFileName: run-info-20260119.094435.912.yml relativeBqrsPath: custom/low-code-react-migration/queries/LegacyComponentBarrelImports.bqrs metadata: name: Legacy component barrel imports diff --git a/codeql-db-optimized/results/custom/low-code-react-migration/queries/LegacyComponentImports.bqrs b/codeql-db-optimized/results/custom/low-code-react-migration/queries/LegacyComponentImports.bqrs index efc0ba8f74a2b1b561019ced466e2ee93824d4a0..2bf473b4b461bf1628016fe9045d2c56527ad25d 100644 GIT binary patch delta 19 acmey$^p$CX1BZ!;v8kS=q0vSUT}A*vzy*i^ delta 19 acmey$^p$CX1BbDpsj;4gnZ-sAT}A*v$_0)9 diff --git a/codeql-db-optimized/results/custom/low-code-react-migration/queries/LegacyImportsInMigrationTargets.bqrs b/codeql-db-optimized/results/custom/low-code-react-migration/queries/LegacyImportsInMigrationTargets.bqrs index 97a5e47728e46f31189085622b92b01a7fcfd93a..857503cd5421bc6b9156b488a6e56512b60384db 100644 GIT binary patch delta 19 acmeBS?qQzbz+qxyY^rBzXtdG8g%JQUOa#vW delta 19 acmeBS?qQzbz+r4?YOH5rX0g%3g%JQURs_`m diff --git a/codeql-db-optimized/results/run-info-20260119.094435.912.yml b/codeql-db-optimized/results/run-info-20260119.094435.912.yml new file mode 100644 index 0000000..94844e6 --- /dev/null +++ b/codeql-db-optimized/results/run-info-20260119.094435.912.yml @@ -0,0 +1,649 @@ +--- +queries: + - + pack: custom/low-code-react-migration#0 + relativeQueryPath: queries/ComponentCustomHookUsage.ql + relativeBqrsPath: custom/low-code-react-migration/queries/ComponentCustomHookUsage.bqrs + metadata: + name: Custom hook usage in components + description: Flags calls to hooks (useX) inside src/components files to guide + hook extraction. + kind: problem + severity: warning + id: custom/component-custom-hook-usage + - + pack: custom/low-code-react-migration#0 + relativeQueryPath: queries/ComponentFilesInMigrationTargets.ql + relativeBqrsPath: custom/low-code-react-migration/queries/ComponentFilesInMigrationTargets.bqrs + metadata: + name: Components in migration target folders + description: Lists TSX files under src/components/atoms|molecules|organisms (primary + migration targets). + kind: problem + severity: warning + id: custom/components-in-migration-target-folders + - + pack: custom/low-code-react-migration#0 + relativeQueryPath: queries/ComponentFilesWithJSX.ql + relativeBqrsPath: custom/low-code-react-migration/queries/ComponentFilesWithJSX.bqrs + metadata: + name: Component files with JSX + description: Lists component TSX files that contain JSX (candidate for JSON conversion). + kind: problem + severity: warning + id: custom/component-files-with-jsx + - + pack: custom/low-code-react-migration#0 + relativeQueryPath: queries/ComponentHooksUsage.ql + relativeBqrsPath: custom/low-code-react-migration/queries/ComponentHooksUsage.bqrs + metadata: + name: React hook usage in components + description: Flags component files that call React hooks (likely needs custom + hook extraction). + kind: problem + severity: warning + id: custom/component-hooks-usage + - + pack: custom/low-code-react-migration#0 + relativeQueryPath: queries/ImportsConvertedJsonComponents.ql + relativeBqrsPath: custom/low-code-react-migration/queries/ImportsConvertedJsonComponents.bqrs + metadata: + name: Imports of converted JSON components + description: Flags imports of components now in json-components to help update + call sites. + kind: problem + severity: warning + id: custom/imports-converted-json-components + - + pack: custom/low-code-react-migration#0 + relativeQueryPath: queries/ImportsJsonDefinitions.ql + relativeBqrsPath: custom/low-code-react-migration/queries/ImportsJsonDefinitions.bqrs + metadata: + name: Direct JSON definition imports + description: Flags imports from '@/components/json-definitions' to enforce centralized + exports. + kind: problem + severity: warning + id: custom/imports-json-definitions + - + pack: custom/low-code-react-migration#0 + relativeQueryPath: queries/LegacyComponentBarrelImports.ql + relativeBqrsPath: custom/low-code-react-migration/queries/LegacyComponentBarrelImports.bqrs + metadata: + name: Legacy component barrel imports + description: "Flags imports from '@/components/atoms', '@/components/molecules',\ + \ '@/components/organisms', or '@/components/ui'." + kind: problem + severity: warning + id: custom/legacy-component-barrel-imports + - + pack: custom/low-code-react-migration#0 + relativeQueryPath: queries/LegacyComponentImports.ql + relativeBqrsPath: custom/low-code-react-migration/queries/LegacyComponentImports.bqrs + metadata: + name: Legacy component imports + description: Finds imports still referencing legacy components instead of JSON + components. + kind: problem + severity: warning + id: custom/legacy-component-imports + - + pack: custom/low-code-react-migration#0 + relativeQueryPath: queries/LegacyImportsInMigrationTargets.ql + relativeBqrsPath: custom/low-code-react-migration/queries/LegacyImportsInMigrationTargets.bqrs + metadata: + name: Legacy imports in migration targets + description: Flags imports from '@/components/*' inside atoms/molecules/organisms. + kind: problem + severity: warning + id: custom/legacy-imports-in-migration-targets +extensionPacks: [] +packs: + custom/low-code-react-migration#0: + name: custom/low-code-react-migration + version: 0.0.1 + isLibrary: false + isExtensionPack: false + localPath: file:///Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/codeql/custom-queries/ + localPackDefinitionFile: file:///Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/codeql/custom-queries/qlpack.yml + runDataExtensions: + - + pack: codeql/javascript-all#1 + relativePath: ext/apollo-server.model.yml + index: 0 + firstRowId: 0 + rowCount: 1 + locations: + lineNumbers: A=6 + columnNumbers: A=9 + - + pack: codeql/javascript-all#1 + relativePath: ext/apollo-server.model.yml + index: 1 + firstRowId: 1 + rowCount: 2 + locations: + lineNumbers: A=12+1 + columnNumbers: A=9*2 + - + pack: codeql/javascript-all#1 + relativePath: ext/apollo-server.model.yml + index: 2 + firstRowId: 3 + rowCount: 10 + locations: + lineNumbers: A=19+1*9 + columnNumbers: A=9*10 + - + pack: codeql/javascript-all#1 + relativePath: ext/aws-sdk.model.yml + index: 0 + firstRowId: 13 + rowCount: 8 + locations: + lineNumbers: A=6+1*7 + columnNumbers: A=9*8 + - + pack: codeql/javascript-all#1 + relativePath: ext/aws-sdk.model.yml + index: 1 + firstRowId: 21 + rowCount: 10 + locations: + lineNumbers: A=18+1*9 + columnNumbers: A=9*10 + - + pack: codeql/javascript-all#1 + relativePath: ext/aws-sdk.model.yml + index: 2 + firstRowId: 31 + rowCount: 8 + locations: + lineNumbers: A=32+1*7 + columnNumbers: A=9*8 + - + pack: codeql/javascript-all#1 + relativePath: ext/aws-sdk.model.yml + index: 3 + firstRowId: 39 + rowCount: 9 + locations: + lineNumbers: A=44+1*8 + columnNumbers: A=9*9 + - + pack: codeql/javascript-all#1 + relativePath: ext/axios.model.yml + index: 0 + firstRowId: 48 + rowCount: 1 + locations: + lineNumbers: A=6 + columnNumbers: A=9 + - + pack: codeql/javascript-all#1 + relativePath: ext/axios.model.yml + index: 1 + firstRowId: 49 + rowCount: 1 + locations: + lineNumbers: A=12 + columnNumbers: A=9 + - + pack: codeql/javascript-all#1 + relativePath: ext/call-me-maybe.model.yml + index: 0 + firstRowId: 50 + rowCount: 1 + locations: + lineNumbers: A=6 + columnNumbers: A=9 + - + pack: codeql/javascript-all#1 + relativePath: ext/cors.model.yml + index: 0 + firstRowId: 51 + rowCount: 1 + locations: + lineNumbers: A=6 + columnNumbers: A=9 + - + pack: codeql/javascript-all#1 + relativePath: ext/default-threat-models-fixup.model.yml + index: 0 + firstRowId: 52 + rowCount: 1 + locations: + lineNumbers: A=8 + columnNumbers: A=9 + - + pack: codeql/javascript-all#1 + relativePath: ext/graph-ql.model.yml + index: 0 + firstRowId: 53 + rowCount: 1 + locations: + lineNumbers: A=6 + columnNumbers: A=9 + - + pack: codeql/javascript-all#1 + relativePath: ext/graph-ql.model.yml + index: 1 + firstRowId: 54 + rowCount: 1 + locations: + lineNumbers: A=11 + columnNumbers: A=9 + - + pack: codeql/javascript-all#1 + relativePath: ext/hana-db-client.model.yml + index: 0 + firstRowId: 55 + rowCount: 4 + locations: + lineNumbers: A=6+1*3 + columnNumbers: A=9*4 + - + pack: codeql/javascript-all#1 + relativePath: ext/hana-db-client.model.yml + index: 1 + firstRowId: 59 + rowCount: 2 + locations: + lineNumbers: A=15+1 + columnNumbers: A=9*2 + - + pack: codeql/javascript-all#1 + relativePath: ext/hana-db-client.model.yml + index: 2 + firstRowId: 61 + rowCount: 6 + locations: + lineNumbers: A=22+1*5 + columnNumbers: A=9*6 + - + pack: codeql/javascript-all#1 + relativePath: ext/make-dir.model.yml + index: 0 + firstRowId: 67 + rowCount: 1 + locations: + lineNumbers: A=6 + columnNumbers: A=9 + - + pack: codeql/javascript-all#1 + relativePath: ext/markdown-table.model.yml + index: 0 + firstRowId: 68 + rowCount: 1 + locations: + lineNumbers: A=6 + columnNumbers: A=9 + - + pack: codeql/javascript-all#1 + relativePath: ext/mkdirp.model.yml + index: 0 + firstRowId: 69 + rowCount: 2 + locations: + lineNumbers: A=6+1 + columnNumbers: A=9*2 + - + pack: codeql/javascript-all#1 + relativePath: ext/open.model.yml + index: 0 + firstRowId: 71 + rowCount: 2 + locations: + lineNumbers: A=6+1 + columnNumbers: A=9*2 + - + pack: codeql/javascript-all#1 + relativePath: ext/react-relay-threat.model.yml + index: 0 + firstRowId: 73 + rowCount: 10 + locations: + lineNumbers: A=6+1*9 + columnNumbers: A=9*10 + - + pack: codeql/javascript-all#1 + relativePath: ext/react.model.yml + index: 0 + firstRowId: 83 + rowCount: 1 + locations: + lineNumbers: A=6 + columnNumbers: A=9 + - + pack: codeql/javascript-all#1 + relativePath: ext/rimraf.model.yml + index: 0 + firstRowId: 84 + rowCount: 3 + locations: + lineNumbers: A=6+1*2 + columnNumbers: A=9*3 + - + pack: codeql/javascript-all#1 + relativePath: ext/shelljs.model.yml + index: 0 + firstRowId: 87 + rowCount: 1 + locations: + lineNumbers: A=6 + columnNumbers: A=9 + - + pack: codeql/javascript-all#1 + relativePath: ext/tanstack.model.yml + index: 0 + firstRowId: 88 + rowCount: 6 + locations: + lineNumbers: A=6+1*5 + columnNumbers: A=9*6 + - + pack: codeql/javascript-all#1 + relativePath: ext/underscore.string.model.yml + index: 0 + firstRowId: 94 + rowCount: 5 + locations: + lineNumbers: A=6+1*4 + columnNumbers: A=9*5 + - + pack: codeql/javascript-all#1 + relativePath: ext/underscore.string.model.yml + index: 1 + firstRowId: 99 + rowCount: 20 + locations: + lineNumbers: A=16+1*19 + columnNumbers: A=9*20 + - + pack: codeql/javascript-all#1 + relativePath: semmle/javascript/frameworks/NoSQL.model.yml + index: 0 + firstRowId: 119 + rowCount: 4 + locations: + lineNumbers: A=8+3+1*2 + columnNumbers: A=9*4 + - + pack: codeql/javascript-all#1 + relativePath: semmle/javascript/frameworks/NodeJSLib.model.yml + index: 0 + firstRowId: 123 + rowCount: 5 + locations: + lineNumbers: A=6+1*4 + columnNumbers: A=9*5 + - + pack: codeql/javascript-all#1 + relativePath: semmle/javascript/frameworks/SQL.model.yml + index: 0 + firstRowId: 128 + rowCount: 5 + locations: + lineNumbers: A=6+1*4 + columnNumbers: A=9*5 + - + pack: codeql/javascript-all#1 + relativePath: semmle/javascript/frameworks/SQL.model.yml + index: 1 + firstRowId: 133 + rowCount: 4 + locations: + lineNumbers: A=16+1*3 + columnNumbers: A=9*4 + - + pack: codeql/javascript-all#1 + relativePath: semmle/javascript/frameworks/helmet/Helmet.Required.Setting.model.yml + index: 0 + firstRowId: 137 + rowCount: 2 + locations: + lineNumbers: A=6+1 + columnNumbers: A=9*2 + - + pack: codeql/javascript-all#1 + relativePath: semmle/javascript/frameworks/minimongo/model.yml + index: 0 + firstRowId: 139 + rowCount: 75 + locations: + lineNumbers: A=6+1*74 + columnNumbers: A=9*75 + - + pack: codeql/javascript-all#1 + relativePath: semmle/javascript/frameworks/mongodb/model.yml + index: 0 + firstRowId: 214 + rowCount: 26 + locations: + lineNumbers: A=6+1*25 + columnNumbers: A=9*26 + - + pack: codeql/javascript-all#1 + relativePath: semmle/javascript/frameworks/mongodb/model.yml + index: 1 + firstRowId: 240 + rowCount: 611 + locations: + lineNumbers: A=37+1*610 + columnNumbers: A=9*611 + - + pack: codeql/javascript-all#1 + relativePath: semmle/javascript/frameworks/mongodb/model.yml + index: 2 + firstRowId: 851 + rowCount: 32 + locations: + lineNumbers: A=653+1*31 + columnNumbers: A=9*32 + - + pack: codeql/javascript-all#1 + relativePath: semmle/javascript/frameworks/mongodb/model.yml + index: 3 + firstRowId: 883 + rowCount: 102 + locations: + lineNumbers: A=690+1*101 + columnNumbers: A=9*102 + - + pack: codeql/javascript-all#1 + relativePath: semmle/javascript/frameworks/mssql/model.yml + index: 0 + firstRowId: 985 + rowCount: 34 + locations: + lineNumbers: A=6+1*33 + columnNumbers: A=9*34 + - + pack: codeql/javascript-all#1 + relativePath: semmle/javascript/frameworks/mysql/model.yml + index: 0 + firstRowId: 1019 + rowCount: 57 + locations: + lineNumbers: A=6+1*56 + columnNumbers: A=9*57 + - + pack: codeql/javascript-all#1 + relativePath: semmle/javascript/frameworks/mysql/model.yml + index: 1 + firstRowId: 1076 + rowCount: 3 + locations: + lineNumbers: A=68+1*2 + columnNumbers: A=9*3 + - + pack: codeql/javascript-all#1 + relativePath: semmle/javascript/frameworks/pg/model.yml + index: 0 + firstRowId: 1079 + rowCount: 65 + locations: + lineNumbers: A=6+1*64 + columnNumbers: A=9*65 + - + pack: codeql/javascript-all#1 + relativePath: semmle/javascript/frameworks/pg/model.yml + index: 1 + firstRowId: 1144 + rowCount: 5 + locations: + lineNumbers: A=76+1*4 + columnNumbers: A=9*5 + - + pack: codeql/javascript-all#1 + relativePath: semmle/javascript/frameworks/pg/model.yml + index: 2 + firstRowId: 1149 + rowCount: 23 + locations: + lineNumbers: A=86+1*22 + columnNumbers: A=9*23 + - + pack: codeql/javascript-all#1 + relativePath: semmle/javascript/frameworks/sequelize/model.yml + index: 0 + firstRowId: 1172 + rowCount: 7 + locations: + lineNumbers: A=6+1*6 + columnNumbers: A=9*7 + - + pack: codeql/javascript-all#1 + relativePath: semmle/javascript/frameworks/sequelize/model.yml + index: 1 + firstRowId: 1179 + rowCount: 248 + locations: + lineNumbers: A=18+1*247 + columnNumbers: A=9*248 + - + pack: codeql/javascript-all#1 + relativePath: semmle/javascript/frameworks/sequelize/model.yml + index: 2 + firstRowId: 1427 + rowCount: 5 + locations: + lineNumbers: A=271+1*4 + columnNumbers: A=9*5 + - + pack: codeql/javascript-all#1 + relativePath: semmle/javascript/frameworks/sequelize/model.yml + index: 3 + firstRowId: 1432 + rowCount: 2 + locations: + lineNumbers: A=281+1 + columnNumbers: A=9*2 + - + pack: codeql/javascript-all#1 + relativePath: semmle/javascript/frameworks/spanner/model.yml + index: 0 + firstRowId: 1434 + rowCount: 174 + locations: + lineNumbers: A=6+1*173 + columnNumbers: A=9*174 + - + pack: codeql/javascript-all#1 + relativePath: semmle/javascript/frameworks/spanner/model.yml + index: 1 + firstRowId: 1608 + rowCount: 5 + locations: + lineNumbers: A=185+1*4 + columnNumbers: A=9*5 + - + pack: codeql/javascript-all#1 + relativePath: semmle/javascript/frameworks/sqlite3/model.yml + index: 0 + firstRowId: 1613 + rowCount: 15 + locations: + lineNumbers: A=6+1*14 + columnNumbers: A=9*15 + - + pack: codeql/javascript-all#1 + relativePath: semmle/javascript/frameworks/sqlite3/model.yml + index: 1 + firstRowId: 1628 + rowCount: 3 + locations: + lineNumbers: A=26+1*2 + columnNumbers: A=9*3 + - + pack: codeql/javascript-all#1 + relativePath: semmle/javascript/security/domains/IntegrityCheckingRequired/integrity_checking_required.model.yml + index: 0 + firstRowId: 1631 + rowCount: 3 + locations: + lineNumbers: A=6+1*2 + columnNumbers: A=9*3 + - + pack: codeql/javascript-all#1 + relativePath: semmle/javascript/security/domains/compromised/compromised_domains.model.yml + index: 0 + firstRowId: 1634 + rowCount: 1 + locations: + lineNumbers: A=6 + columnNumbers: A=9 + - + pack: codeql/javascript-all#1 + relativePath: semmle/javascript/security/domains/untrusted/untrusted_domains.model.yml + index: 0 + firstRowId: 1635 + rowCount: 6 + locations: + lineNumbers: A=7+1+3+1*3 + columnNumbers: A=9*6 + - + pack: codeql/threat-models#2 + relativePath: ext/supported-threat-models.model.yml + index: 0 + firstRowId: 1641 + rowCount: 1 + locations: + lineNumbers: A=6 + columnNumbers: A=9 + - + pack: codeql/threat-models#2 + relativePath: ext/threat-model-grouping.model.yml + index: 0 + firstRowId: 1642 + rowCount: 15 + locations: + lineNumbers: A=8+3+1+3+1*5+3+1+5+1*3 + columnNumbers: A=9*15 + codeql/threat-models#2: + name: codeql/threat-models + version: 1.0.39 + isLibrary: true + isExtensionPack: false + localPath: file:///Users/rmac/.codeql/packages/codeql/threat-models/1.0.39/ + localPackDefinitionFile: file:///Users/rmac/.codeql/packages/codeql/threat-models/1.0.39/qlpack.yml + headSha: b4f4b0e6b0d0e819d1242d1911d54af219e065db + runDataExtensions: [] + codeql/javascript-all#1: + name: codeql/javascript-all + version: 2.6.19 + isLibrary: true + isExtensionPack: false + localPath: file:///Users/rmac/.codeql/packages/codeql/javascript-all/2.6.19/ + localPackDefinitionFile: file:///Users/rmac/.codeql/packages/codeql/javascript-all/2.6.19/qlpack.yml + headSha: b4f4b0e6b0d0e819d1242d1911d54af219e065db + runDataExtensions: [] + codeql/util#3: + name: codeql/util + version: 2.0.26 + isLibrary: true + isExtensionPack: false + localPath: file:///Users/rmac/.codeql/packages/codeql/util/2.0.26/ + localPackDefinitionFile: file:///Users/rmac/.codeql/packages/codeql/util/2.0.26/qlpack.yml + headSha: b4f4b0e6b0d0e819d1242d1911d54af219e065db + runDataExtensions: [] diff --git a/codeql-migration.skill b/codeql-migration.skill new file mode 100644 index 0000000000000000000000000000000000000000..8aa88050e87853e463461f3b2dd0734940e271e5 GIT binary patch literal 1591 zcmai!XHXLc7=|NB*g*s$LRgV$*%F2#ih}?RBb3!+3xp6hAxuF8M3gB=88QR{0%er4 zg6xq9h)gvK1VLtErN0B{447FteFkxls< z8~{KI2mlace?0;{F~NSS{x~fDDghT5pl*#aH8WH5_e``I37FLo>|`n*ACkvkg2g!F zQFF(=?~@!5NgT(_>*V@{hJ&ifV=u!^hmjBvouXqh78K^?4Zq^$nSm|wOSCMahc00z zsGiWQtr^NZwqbd$0|mc>0N1+3^7}B~U^ivrp`w&g?d_d0aYWqe`xHSJ2Sh^)@PwyR z!vYsDbyA@uTxx&}u>?k?5qJ?hT|1wkrFuPI4%ZRI^_|y|t2*QKQ!dQTRu?W#4dI)1 z!V!e9VxD3p{h3Uc^}*q?Je;k#-PGxM!@duURaL!es?~gY{>Ftu-*DZu2Clkimb7roaI;}5+Vz~0ZKrGf*}|p<*)|vgm?9H1^m-)-hXGd%iW`V0Hq&dfit-j^ z_!A2DZ1bbjg?aH+ggPjnzT0BaLgwPTu)tDtz z;$zE5A7q_*h56;-9s2Nv%|?BQ#YCU26&3@ zr6s0ua$PTTKnGu!OC2G1=Jt*>M-`A495Foe(`w$4R1=9Vx`!LBv?)EqvO zcWM)kasmXL{7iGX={294cVs5WI#%V78$^!9QVUdgc%kdV)Ta@w*PYmnzFv)NbY5~S ztT*ofJ#g4dduR?qO5`UswV$W&e)zDU<=QX!`4?sd8nl)cU(mZQ5%gSG6t#RNKt9m z>Kf2kOR!6W)15~~>ZvZkAqfXfW!VIE%3YHgFbM)CV%?=wN`=Iqu#%RjD|Yaarq!&D zLP~P#t0AHI`nJTaO7~qdMM};0cUFK~tACttU~bE?8DX2j+N!P*hDmq4`E06l$0|A8 zqnycYjwU+2-rj0Rv7rYir(5Q&&~>#&dlfI~XZ+O7Z@+4XN_c^!;jzo{gPpU-a;w&k ztVL^yR_X*_Jk>lB7L{oAgx*$CFY!(^Aq996Pd&-iREqE6Lg&c$^^`f!3R7>oQJ`Vo zJo?U{o+>`W`(yk(%a*e36w|Om$$&!=R*Jb0m1TIB`3;=zVQT zND8FXuH?5O-0kynqmQX73`NChD}3JV9~jco3dsk`muJbk$Wg|FyV { + const loc = r.locations?.[0]?.physicalLocation + return { + file: loc?.artifactLocation?.uri || 'unknown', + line: loc?.region?.startLine || 0, + message: r.message?.text || '', + } + }) + summary.push({ ruleId: rule, count: items.length, sample }) + } + + summary.sort((a, b) => b.count - a.count) + return Promise.resolve({ + total: results.length, + rules: summary, + }) +} + async function handleRequest(message) { const { id, method, params } = message @@ -221,6 +270,8 @@ async function handleRequest(message) { result = await runCodeqlResolvePacks(args) } else if (name === 'codeql_resolve_languages') { result = await runCodeqlResolveLanguages(args) + } else if (name === 'codeql_sarif_summary') { + result = await summarizeSarif(args) } else { return respondError(id, -32601, `Unknown tool: ${name}`) } @@ -228,7 +279,9 @@ async function handleRequest(message) { content: [ { type: 'text', - text: `exit: ${result.code}\nstdout:\n${result.stdout}\nstderr:\n${result.stderr}`, + text: result.code !== undefined + ? `exit: ${result.code}\nstdout:\n${result.stdout}\nstderr:\n${result.stderr}` + : JSON.stringify(result, null, 2), }, ], })