This commit is contained in:
2026-01-19 10:10:37 +00:00
parent b98fa82109
commit 6d27d1ccb6
19 changed files with 708 additions and 5 deletions

View File

@@ -48,7 +48,7 @@
"mcpServers": {
"codeql": {
"command": "node",
"args": ["scripts/mcp/codeql-mcp.js"]
"args": ["scripts/mcp/codeql-mcp.cjs"]
}
}
}

File diff suppressed because one or more lines are too long

View File

@@ -16,7 +16,7 @@ G/GK
ÐÛ®…øó ‡!1å®…øõ‡!#ë®…øï!‡!*ËÆ…øƒ"" ÷"ÜÎ…ø#¤#Ž$ØÜ…ø#­$Ž$ßÜ…ø%­$?öëÜ…ø§%­$%ôÜ…ø»%­$ fÐ¸è…ø#Ï%Ž$¿è…øõÏ%)Åè…øµ&Ï%  2É&Ìè…øè&Ï% "Ðµí…ø#ü& , 3Ž$¼í…øõü&
%
<03>‰†øå'ù'¡¡ç(ÈŸ†ø—)¨)ÍÍ#”*ÍŸ†ø»*¨)ÎÎ<Ï*ÜŸ†ø¿¨)Ï埆ø¿¨)ÐøÈ ¨)ѹ©†øö*Š+/ñ°†øö+Š,ü°†øõŠ,!€±†ø»%Š,
Ѐ¶†øô,‰-
Ѐ¶†øô,‰-
'
†¶†øð-‰- Ѐˆø„.˜.€/Óˆøª/˜.88S¾/´Û†øï/ƒ0//8ô0¸â†ø¦1¶1JX¤2Ãâ†øÊ2¶1&=Þ2àâ†ø<0F>3¶1œ3åâ†øÁ3¶1EÏ*ðâ†øÕ3¶1 Ðùö†ø¿é3)‚÷†øÑ4é3”Cå4Ž÷†øˆ5é3•!•Hå4º‰‡øœ5±5ÄËŸ6±¢‡ø¿Ò6£º¢‡ø¿Ò6¤榇øö*Ò6<C392>1<>ÿ½‡ø½7Ð7··*º8†¾‡øã8Ð7¸3¸«¾‡ø÷8Ð7ÀÀ19ŽÒ‡ø¾9Ó9³öÔÓ‡ø½7Ó9áZº8åÓ‡ø½:Ó9çç?Ñ:ÏÞ‡øö*ú:/<03>æ‡øä;ø;Dâ<Øï‡øŠ=<3D>=+<„>Šð‡ø­><3E>=½>¡ð‡øã><3E>=!!7÷>®ð‡øŸ?<3F>=""?ö½ð‡ø³?<3F>=##"ö¿÷‡ø¿?Ñ?(â<˜û‡øŠ=Á@ + <„>Êû‡ø­>Á@½>áû‡øã>Á@7÷>îû‡øŸ?Á@ ýû‡ø³?Á@!!"ö°©‰ø®AÂA


View File

@@ -28,7 +28,7 @@
íÖä×éƒè
ëØãÙé¨ê
ëÚãÛéçð
ëÜèÝéÛˆ õÞÛß鎌 ÐàÍáé<01><> Úâ×ã鑎 ääâåé¬<> ðæóç飑 …é‚ê醒 <0B>ëŒìéé’ ™í—îé•” ¥ï¢ðéñ” ¯ñ«òéè• ·óµôéÅ– Ãõ¹ö铘 ¿÷¡øéË› ’ùûù餜 óúÖûé°ž Èüªýéå  ›þ‚ÿéõ¥ øÿÛ€éÓ¨ Í<>²‚é–¬ ¦ƒ‡„éÀ° ÷„í…éé² ó†æ‡é€´ éˆ܉éíµ ßŠÖ‹éÖ¸ ÝŒË<>é¥À ÈŽº<>é£Ã ¼<>³‘騯 º’¨“éêÈ ¥”<04>éÅÔ ¥–Š—é¿Ö þ—æ˜é‰Ø Ý™Кéî٠ӛŜéÒÚ Ç<>¹žéÊÛ »Ÿ­ éñÜ ¯¡ ¢ééÝ ¡£’¤éêÞ “¥‰¦éãß <0B>§„¨éÇà ‰©õ©é›â ðªõ«éãã ‰­‡®éôå •¯‘°éÑæ <0B>±˜²é÷ç £³Ÿ´é<01>é «µ¨¶éìé µ·¸¸éÉê ʹ̺é‡ì ݻ޼éÿì î½í¾éãí ü¿ÿÀéáï ‘Â”Ãé’ñ ¦Ä Åéìñ ªÆ¨ÇéÉò ¶È¬ÉéÀô ²Ê•Ëé÷û ‡ÌêÌéЇ ÜÍãÎ阉 ùÏúÐ鵋 ŠÒˆÓé’Œ –Ô“Õé<>  Öž×éÎŽ ¬Ø«Ùé«<> ºÚ¿Ûéˆ<> ÓÜ×ÝéÅ‘ êÞíßé½’ ÿà<04>âé¡“ ’ã—ä韕 «å°æéò– ÄçÀèéÌ— ÌéÍê騘 ÝëÕìéžš ÝíËî鯛 Èïºðéµ<> ¼ñ¨ò镟 £óŽô鬠 ˆõôõéè¡ ïöÝ÷éý¥ ÚøÁùé•© ·ú<04>ûéÉ­ ’üôüéÑ® åýÇþé<01>± ¸ÿ²€éÔ² ¼<>°‚鄵 ´ƒ¦„éܵ ¨…™†éÿ¶ š‡Œˆé•¸ މÿ‰éí¸ €‹ó‹éĹ öŒî<>韺 öŽí<>éÚ» ô<>ê‘éм ð’å“é²½ ê”â•鮿 ê–â—éÿÀ ê˜Ú™é×Á ٚ͛éæÂ Ñœ½<>é¾Ä ¸ž½Ÿé¶Æ Ñ Ø¡é„È î¢ð£éúÈ <0C>¥ƒ¦éïÉ ”§–¨éÑË §©¬ªéšÍ À«Ƭé·Ï Û­×®éíÐ ã¯ʰéËÖ À±¤²é’Ú —³ü³éÂÛ ð´صéÔÝ Ï¶µ·é®à ª¸’¹éûã ‰ºûºéóç ý»í¼éËè ì½Û¾é‘ê Ù¿ÉÀéŠë ÈÁÅÂéšì ÒÃÍÄé«í ØÅÌÆé¡î ÐÇÂÈéæï ÄÉ´Êé½ð ³Ë<05>Ìé”ñ –ÍüÍéƒó ñÎÓÏéùü ÄиÑéãþ ¼Ò¯ÓéÍÿ ²Ô«Õé<>
ëÜèÝéÛˆ õÞÛß鎌 ÐàÍáé<01><> Úâ×ã鑎 ääâåé¬<> ðæóç飑 …é‚ê醒 <0B>ëŒìéé’ ™í—îé•” ¥ï¢ðéñ” ¯ñ«òéè• ·óµôéÅ– Ãõ¹ö铘 ¿÷¡øéË› ’ùûù餜 óúÖûé°ž Èüªýéå  ›þ‚ÿéõ¥ øÿÛ€éÓ¨ Í<>²‚é–¬ ¦ƒ‡„éÀ° ÷„í…éé² ó†æ‡é€´ éˆ܉éíµ ßŠÖ‹éÖ¸ ÝŒË<>é¥À ÈŽº<>é£Ã ¼<>³‘騯 º’¨“éêÈ ¥”<04>éÅÔ ¥–Š—é¿Ö þ—æ˜é‰Ø Ý™Кéî٠ӛŜéÒÚ Ç<>¹žéÊÛ »Ÿ­ éñÜ ¯¡ ¢ééÝ ¡£’¤éêÞ “¥‰¦éãß <0B>§„¨éÇà ‰©õ©é›â ðªõ«éãã ‰­‡®éôå •¯‘°éÑæ <0B>±˜²é÷ç £³Ÿ´é<01>é «µ¨¶éìé µ·¸¸éÉê ʹ̺é‡ì ݻ޼éÿì î½í¾éãí ü¿ÿÀéáï ‘Â”Ãé’ñ ¦Ä Åéìñ ªÆ¨ÇéÉò ¶È¬ÉéÀô ²Ê•Ëé÷û ‡ÌêÌéЇ ÜÍãÎ阉 ùÏúÐ鵋 ŠÒˆÓé’Œ –Ô“Õé<>  Öž×éÎŽ ¬Ø«Ùé«<> ºÚ¿Ûéˆ<> ÓÜ×ÝéÅ‘ êÞíßé½’ ÿà<04>âé¡“ ’ã—ä韕 «å°æéò– ÄçÀèéÌ— ÌéÍê騘 ÝëÕìéžš ÝíËî鯛 Èïºðéµ<> ¼ñ¨ò镟 £óŽô鬠 ˆõôõéè¡ ïöÝ÷éý¥ ÚøÁùé•© ·ú<04>ûéÉ­ ’üôüéÑ® åýÇþé<01>± ¸ÿ²€éÔ² ¼<>°‚鄵 ´ƒ¦„éܵ ¨…™†éÿ¶ š‡Œˆé•¸ މÿ‰éí¸ €‹ó‹éĹ öŒî<>韺 öŽí<>éÚ» ô<>ê‘éм ð’å“é²½ ê”â•鮿 ê–â—éÿÀ ê˜Ú™é×Á ٚ͛éæÂ Ñœ½<>é¾Ä ¸ž½Ÿé¶Æ Ñ Ø¡é„È î¢ð£éúÈ <0C>¥ƒ¦éïÉ ”§–¨éÑË §©¬ªéšÍ À«Ƭé·Ï Û­×®éíÐ ã¯ʰéËÖ À±¤²é’Ú —³ü³éÂÛ ð´صéÔÝ Ï¶µ·é®à ª¸’¹éûã ‰ºûºéóç ý»í¼éËè ì½Û¾é‘ê Ù¿ÉÀéŠë ÈÁÅÂéšì ÒÃÍÄé«í ØÅÌÆé¡î ÐÇÂÈéæï ÄÉ´Êé½ð ³Ë<05>Ìé”ñ –ÍüÍéƒó ñÎÓÏéùü ÄиÑéãþ ¼Ò¯ÓéÍÿ ²Ô«Õé<>
´Ö®×éó<>
¸Ø°Ùé̃
¸ÚªÛé¶„

View File

@@ -123,7 +123,7 @@ jԩ
¤ùŒøÞÁ/<2F>ªùŒø¸ÞÁ¼ùŒøå ÞÁ íÿŒø¸ØÂüÿŒøÌ
ØÂ
™ƒ<EFBFBD>ø¸Ôèƒ<C2A8>øÌ
ÔÃ
ÔÃ
<EFBFBD>ø¸ÍΆ<C2AA>øÌ
ÍÄ
ë‰<EFBFBD>ø¸ÄÅú‰<C3BA>øÌ

View File

@@ -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: []

BIN
codeql-migration.skill Normal file

Binary file not shown.

View File

@@ -1,5 +1,6 @@
#!/usr/bin/env node
const { spawn } = require('node:child_process')
const fs = require('node:fs')
function send(message) {
process.stdout.write(`${JSON.stringify(message)}\n`)
@@ -90,6 +91,18 @@ function toolList() {
},
},
},
{
name: 'codeql_sarif_summary',
description: 'Summarize a SARIF file by rule and total count.',
inputSchema: {
type: 'object',
properties: {
sarifPath: { type: 'string' },
maxPerRule: { type: 'number', default: 5 },
},
required: ['sarifPath'],
},
},
]
}
@@ -191,6 +204,42 @@ function runCodeqlResolveLanguages(input) {
return runCodeql(args)
}
function summarizeSarif(input) {
const { sarifPath, maxPerRule = 5 } = input || {}
if (!sarifPath) return Promise.reject(new Error('sarifPath is required'))
const raw = fs.readFileSync(sarifPath, 'utf8')
const sarif = JSON.parse(raw)
const run = sarif.runs?.[0]
const results = run?.results || []
const byRule = new Map()
for (const r of results) {
const rule = r.ruleId || 'unknown'
if (!byRule.has(rule)) byRule.set(rule, [])
byRule.get(rule).push(r)
}
const summary = []
for (const [rule, items] of byRule) {
const sample = items.slice(0, maxPerRule).map((r) => {
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),
},
],
})