From dae3f9fea59cf85f84f2812e282f2004283d9739 Mon Sep 17 00:00:00 2001 From: johndoe6345789 Date: Mon, 19 Jan 2026 09:34:42 +0000 Subject: [PATCH] stuff --- AGENTS.md | 32 + CLAUDE.md | 15 + .../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-20260119T092700.461Z.json | 0 ...-diagnostics-add-20260119T092723.918Z.json | 0 ...-diagnostics-add-20260119T092754.190Z.json | 0 ...-diagnostics-add-20260119T093153.321Z.json | 0 .../diagnostic/migration-queries.sarif | 2 +- .../queries/ComponentCustomHookUsage.bqrs | 27 + .../ComponentFilesInMigrationTargets.bqrs | Bin 0 -> 6321 bytes .../queries/ComponentFilesWithJSX.bqrs | 2 +- .../queries/ComponentHooksUsage.bqrs | Bin 7466 -> 7466 bytes .../ImportsConvertedJsonComponents.bqrs | Bin 0 -> 406 bytes .../queries/ImportsJsonDefinitions.bqrs | Bin 0 -> 388 bytes .../queries/LegacyComponentBarrelImports.bqrs | 134 ++++ .../queries/LegacyComponentImports.bqrs | Bin 373 -> 373 bytes .../LegacyImportsInMigrationTargets.bqrs | Bin 0 -> 396 bytes .../results/run-info-20260119.092754.748.yml | 617 +++++++++++++++++ .../results/run-info-20260119.093153.868.yml | 649 ++++++++++++++++++ .../queries/ComponentCustomHookUsage.ql | 20 + .../ComponentFilesInMigrationTargets.ql | 16 + .../queries/ImportsConvertedJsonComponents.ql | 20 + .../queries/ImportsJsonDefinitions.ql | 12 + .../queries/LegacyComponentBarrelImports.ql | 12 + .../LegacyImportsInMigrationTargets.ql | 19 + 28 files changed, 1575 insertions(+), 2 deletions(-) create mode 100644 AGENTS.md create mode 100644 codeql-db-optimized/diagnostic/cli-diagnostics-add-20260119T092700.461Z.json create mode 100644 codeql-db-optimized/diagnostic/cli-diagnostics-add-20260119T092723.918Z.json create mode 100644 codeql-db-optimized/diagnostic/cli-diagnostics-add-20260119T092754.190Z.json create mode 100644 codeql-db-optimized/diagnostic/cli-diagnostics-add-20260119T093153.321Z.json create mode 100644 codeql-db-optimized/results/custom/low-code-react-migration/queries/ComponentCustomHookUsage.bqrs create mode 100644 codeql-db-optimized/results/custom/low-code-react-migration/queries/ComponentFilesInMigrationTargets.bqrs create mode 100644 codeql-db-optimized/results/custom/low-code-react-migration/queries/ImportsConvertedJsonComponents.bqrs create mode 100644 codeql-db-optimized/results/custom/low-code-react-migration/queries/ImportsJsonDefinitions.bqrs create mode 100644 codeql-db-optimized/results/custom/low-code-react-migration/queries/LegacyComponentBarrelImports.bqrs create mode 100644 codeql-db-optimized/results/custom/low-code-react-migration/queries/LegacyImportsInMigrationTargets.bqrs create mode 100644 codeql-db-optimized/results/run-info-20260119.092754.748.yml create mode 100644 codeql-db-optimized/results/run-info-20260119.093153.868.yml create mode 100644 codeql/custom-queries/queries/ComponentCustomHookUsage.ql create mode 100644 codeql/custom-queries/queries/ComponentFilesInMigrationTargets.ql create mode 100644 codeql/custom-queries/queries/ImportsConvertedJsonComponents.ql create mode 100644 codeql/custom-queries/queries/ImportsJsonDefinitions.ql create mode 100644 codeql/custom-queries/queries/LegacyComponentBarrelImports.ql create mode 100644 codeql/custom-queries/queries/LegacyImportsInMigrationTargets.ql diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..83c0f4f --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,32 @@ +# Project Agent Guide + +This repo is migrating legacy TSX components to JSON-driven components with hooks. +Use this file as the quick, local guide for automation and review. + +## Conversion Workflow (TSX -> JSON) +1) Identify component under `src/components/atoms|molecules|organisms`. +2) Read TSX and decide if stateful. +3) If stateful, extract logic to `src/hooks/use-.ts`. +4) Create JSON definition in `src/components/json-definitions/.json`. +5) Add interface in `src/lib/json-ui/interfaces/.ts`. +6) Export hook (if any) in `src/hooks/index.ts` and `src/lib/json-ui/hooks-registry.ts`. +7) Export interface in `src/lib/json-ui/interfaces/index.ts`. +8) Export JSON component in `src/lib/json-ui/json-components.ts`. +9) Update imports to `@/lib/json-ui/json-components` and delete TSX. +10) Verify with `npm run build` and `npm run audit:json`. + +## CodeQL Helpers +Custom query pack: `codeql/custom-queries/` +Optimized DB (source-root `src/`): `codeql-db-optimized/` +Latest SARIF: `codeql-db-optimized/diagnostic/migration-queries.sarif` + +Key queries: +- Legacy component imports and barrels +- Hooks usage in components (guides hook extraction) +- JSX presence in components +- Imports from json-definitions (should be zero) +- Migration target folder inventory + +## Related Docs +- `CLAUDE.md` for migration status and CodeQL results +- `docs/reference/AGENTS.md` for agent architecture background diff --git a/CLAUDE.md b/CLAUDE.md index 377ae26..68edd7b 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -287,6 +287,21 @@ npm run components:generate-types npm run build ``` +## CodeQL Migration Helpers (Jan 2026) + +Custom query pack lives in `codeql/custom-queries/` with SARIF output at: +`codeql-db-optimized/diagnostic/migration-queries.sarif` + +Latest optimized DB results (source-root `src/`): +- custom/component-files-with-jsx: 400 +- custom/component-hooks-usage: 98 +- custom/component-custom-hook-usage: 191 +- custom/legacy-component-barrel-imports: 470 +- custom/components-in-migration-target-folders: 21 +- custom/legacy-imports-in-migration-targets: 0 +- custom/imports-json-definitions: 0 +- custom/imports-converted-json-components: 0 + ## Key Files - `json-components-registry.json` - Master registry of all components 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 22f17c5a7a6c289d0e76f39138fd20b9711f9cc0..e8c7124270e27ff6a052a37f5b7076c20e5ffc9e 100644 GIT binary patch delta 18 acmbQkIEQh98ppHFJx)eTEVU=<()useStat ... 0, 80]) useState(10)useDialogState()d/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/CodeEditor.tsx'Hook call in component: useDialogStateuseCodeExplanation()+Hook call in component: useCodeExplanationuseAIOperations()(Hook call in component: useAIOperationsuseFile ... (files)'Hook call in component: useFileFiltersuseComp ... ange })n/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/ComponentTreeBuilder.tsx0Hook call in component: useComponentTreeBuilderuseComp ... oader()m/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/ComponentTreeViewer.tsx/Hook call in component: useComponentTreeLoaderuseStat ... >(null)useKV([])useDocu ... State()k/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/DocumentationView.tsx2Hook call in component: useDocumentationViewStateuseErro ... ange })d/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/ErrorPanel.tsx+Hook call in component: useErrorPanelStateuseFaviconDesigner()i/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/FaviconDesigner.tsx+Hook call in component: useFaviconDesigneruseStat ... 0,\n })s/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/FeatureIdeaCloud/IdeaNode.tsxuseEffe ... , [id])"Hook call in component: useEffectuseFeat ... Cloud()j/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/FeatureIdeaCloud.tsx,Hook call in component: useFeatureIdeaClouduseGlob ... t,\n })f/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/GlobalSearch.tsx,Hook call in component: useGlobalSearchDatauseKV(' ... lTodos)f/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/JSONDemoPage.tsxuseSche ... maPath)n/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/JSONSchemaPageLoader.tsx(Hook call in component: useSchemaLoaderuseStat ... y>>({})d/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/JSONUIPage.tsxuseEffe ... onfig])useStat ... pleKey)h/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/JSONUIShowcase.tsxuseMemo ... }, [])useNavigate()f/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/NotFoundPage.tsx$Hook call in component: useNavigate usePWA()j/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/PWAInstallPrompt.tsxHook call in component: usePWAe/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/PWASettings.tsxuseStat ... lt'\n )useStat ... lating)useEffe ... }, [])f/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/PWAStatusBar.tsxuseRef< ... >(null)Hook call in component: useRefuseEffe ... fline])i/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/PWAUpdatePrompt.tsxusePers ... board()n/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/PersistenceDashboard.tsx0Hook call in component: usePersistenceDashboarduseAppDispatch()l/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/PersistenceExample.tsx'Hook call in component: useAppDispatchuseAppS ... .files)'Hook call in component: useAppSelectoruseStat ... | null)l/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/PlaywrightDesigner.tsxuseStat ... tats())j/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/PreloadIndicator.tsxuseState('')g/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/PreviewDialog.tsxuseEffe ... hange])useProjectManager()h/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/ProjectManager.tsx*Hook call in component: useProjectManageruseProj ... List })1Hook call in component: useProjectManagerDialogsuseProj ... ange })q/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/ProjectSettingsDesigner.tsx2Hook call in component: useProjectSettingsActionsuseReduxFiles()n/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/ReduxIntegrationDemo.tsx&Hook call in component: useReduxFilesuseRedu ... Trees()/Hook call in component: useReduxComponentTreesuseReduxSync()%Hook call in component: useReduxSyncuseAppS ... ttings)useEffe ... Trees])h/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/StorageExample.tsxuseStor ... s', [])#Hook call in component: useStorageuseStor ... er', 0)useStor ... ',\n })n/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/StorageSettingsPanel.tsx3Hook call in component: useStorageSettingsHandlersk/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/StorybookDesigner.tsxuseSeedTemplates()j/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/TemplateExplorer.tsx)Hook call in component: useSeedTemplatesuseStat ... fault')useTemp ... mplate)3Hook call in component: useTemplateExplorerActionsuseStat ... ll\n })j/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/TemplateSelector.tsxuseConf ... late }))Hook call in component: useConfirmDialogj/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/UnitTestDesigner.tsxuseAppB ... true })j/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/app/AppBootstrap.tsx(Hook call in component: useAppBootstrapuseAppNavigation()g/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/app/AppLayout.tsx)Hook call in component: useAppNavigationuseAppProject()&Hook call in component: useAppProjectuseAppS ... Page })(Hook call in component: useAppShortcutsuseStat ... .now()) useState(0)useAppBootstrap()p/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/app/AppRouterBootstrap.tsxm/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/app/AppRouterLayout.tsxuseMemo ... todos])/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/comprehensive-demo/ComprehensiveDemoStatsRow.tsx/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/comprehensive-demo/ComprehensiveDemoTaskList.tsx"Hook call in component: useSearch/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/docker-build-debugger/KnowledgeBaseView.tsxuseMemo ... ry]\n )y/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/error-panel/ErrorPanelErrorItem.tsxuseFile ... eAdd })z/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/file-explorer/FileExplorerDialog.tsx.Hook call in component: useFileExplorerDialog{/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/global-search/useGlobalSearchData.tsxuseKVA 浀 + +EE  +G/GKŀ @ŀ ŀ #ŀ )4ŀ 1L׀ #1 %AC#97M7E!!%ꖁ ) S 5V5C#G+EHbբ1ʃ** 3 +%Î:H㔅  F픅 +! +, & @ ! A  ۮ !1X宅!#1뮅!!*ƅ"" "΅##$܅#$$܅%$?܅%$%_܅%$ f#%$%)7&%  2&&% "#& , 3$& +% +3''(ȟ))#*͟*)<*ܟ)#.埆))4 )%A*+/[+,D,!/%, +,- ' :-- ˆ../ˆ/.88S/ۆ/0//8011JX221&=231331E*31 3)443C453!H45566%06)4榇*61_77*8873Y8719҇99-Ӈ79IZ8Ӈ:9?:އ*:/[;;D<==+<>>=>>=!!7>?=""??=##"??(<=@ + <>>@>>@7>?@  ??@!!"AA  B)),Cم C/V䅊C)4녊DC !)E4'45ŠFF--*GGe)e4HGf-f\HGhl HGHGIG!IG΋II .J؋JJ'K؋ J-M؋J'5KL/LL+IMƜMMNNM!!OOM#=#KOOO +( +4POQ + +'POQ6BPOR6BPSS TS!-!;S"-";US$(UUS*, UUS.0 UUS2=UUS?BVSDMVV-WWWXXXYXYYZY!CV[*Wݎ[\CP\ގ[]!.\W^X[^ ! .\[_$1\V`3WV`  1Wa` + +,aa`  =bVb..5Wcc//*d!d ee ffe*fe'5ge  1ge".Uge02(Uge4AgeEPcg + +(dch  (dci:Edfi*fjjÌkk )lVl330W--- +runFileName: run-info-20260119.093153.868.yml +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 diff --git a/codeql-db-optimized/results/custom/low-code-react-migration/queries/ComponentFilesInMigrationTargets.bqrs b/codeql-db-optimized/results/custom/low-code-react-migration/queries/ComponentFilesInMigrationTargets.bqrs new file mode 100644 index 0000000000000000000000000000000000000000..34d7a8e0349bc45fc9d65526c1027d6e13359f5c GIT binary patch literal 6321 zcmd5>TWB3c819*>n?2sqdPQBWms;JkNsFaDkETrxHX$@A`a0R2oQ~by+0M)+IVB+0 z=}n54RaIpI9bvScdHoC7cghN#J zyp|y-x7U9wJ2i4gL2_{HM7Tnsg6wceD~LNoBn%Ku3}9UkIqZZqP#QgNPNL?pS{P=6 zZZ(Dx_6N`?SB!TW+!gDmht{mA0oGk18r=k|B(0Ht!651Bkxg>mNO8~_&eJ1n&fLIz z?)FK%8O5@6)QjGW2H*6|*qV1_fOj8^QK<5H%v=S_VrrtP0iv5xf*@~dYr^0go)ug( zf2oiQ^@xPXPeVBuWWC;1bAs&fQ>}kMt~Nvoul94uk=g)n<*LV(Akrf3Zly?1At;N2 z66lRZAW#F17H3y0#p#t3CsW$Iz6i9*z-Vdq<}FPiCqS2xl={d;a&jirQ`1?0?Miph zg;7|W4&OAS&O-5MfpXtFa{zjJxGqmk9HV<@L145r`&zJfR4K;(OnDBqZu86yNK3Ro zZ;290~{Ya?`XFO2FhylD$;q$Ew6vf^;A#q~;2X|Y~utyoj}(x|fIi$bkg zu(Vuf3x&4j49No`Uk1Ps!iB;T_SZ3M$qoVjdCxiy#+M3k;J9`8s#mWTVE>2K!E1I| z0{k{%?P;5A6X44e)+PI5QGm-Qtv{~);W`06Ic=T4{+k;F`1YuM?#3T)65ywI?MpZB zyhVV|-?tClI=)PR4<_u1+djQrfD0en-`(;3odWDVWna8&@@@h4oVE|#bL3tb;*5Rf zzAqdBKKjf)fB!EJ2(bICeR=tx4+?PfoIUx_g@*-r?PvS*dsCdcEBFX^2u3|P#i&8 zm5+61IpyrplDsZI3It_GwxhuiMRLv1uq4W>WoHD^Sbi~(*RZ@}N}tS5U{YW=lgF)_ L?{3|EXT^U3ml!z` literal 0 HcmV?d00001 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 ec2d781..809c532 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.091845.720.yml +runFileName: run-info-20260119.093153.868.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 cc93e1ad5ea63b41ca98ddbf4c7e29f4602b5e56..10110b7848f187813626fbaf007546c49444a061 100644 GIT binary patch delta 21 ccmZ2wwaRM48)*(>LsMft3p0z&U!=_#0ap_TApigX delta 21 ccmZ2wwaRM48)*(h3lmd4b0dSzU!=_#0apSC8UO$Q 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 new file mode 100644 index 0000000000000000000000000000000000000000..a4194c2396e31b1bd32f4190128489709b58430d GIT binary patch literal 406 zcmZ9IJ8!~35QMRnB66R8rPOEhP!PBb5>hBgr2K;8yqHbyVeZx-{(FiniAj;}W;L_l z&gI$YA-jJ}XwmQ}za!TnW%($5bWkQ20qBg7?wNZ@0SH~VBVX9tS7b2%s@F$Fn z%_arE3NrNQIh8wESU6gZ))gb*jaR<6G{u>OATio VJ^5B?gEj(o{S+RazGQGV3=*Nb$*tf0mMi4DeNVviO1^x zQdQkqzjxEWzKv+nq+WJKu0`r+z4(${t+s0xoM!CbJ8=Z8W1Nd{1IkB{b<;&9wnqM5GduJk8gV8XxokLegacy component barrel import: @/components/ui/dropdown-menux/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/playwright-designer/StepEditor.tsxx/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/playwright-designer/TestEditor.tsxv/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/playwright-designer/TestList.tsxr/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/project-settings/DataTab.tsx/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/project-settings/NextJsApplicationCard.tsx}/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/project-settings/NextJsFeaturesCard.tsxx/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/project-settings/PackageDialog.tsx}/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/project-settings/PackageListSection.tsxv/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/project-settings/PackagesTab.tsxw/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/project-settings/ScriptDialog.tsxu/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/project-settings/ScriptsTab.tsxs/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/pwa-settings/CacheSection.tsxu/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/pwa-settings/InstallSection.tsx{/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/pwa-settings/NotificationsSection.tsxt/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/pwa-settings/UpdateSection.tsx~/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/redux-integration/ComponentTreesCard.tsxz/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/redux-integration/DangerZoneCard.tsxu/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/redux-integration/FilesCard.tsx{/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/redux-integration/FlaskStatusCard.tsx/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/redux-integration/IndexedDbStatusCard.tsxz/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/redux-integration/SyncStatusCard.tsx|/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/sass-styles-showcase/AnimationsTab.tsxy/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/sass-styles-showcase/ButtonsTab.tsxw/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/sass-styles-showcase/CardsTab.tsxw/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/sass-styles-showcase/ChipsTab.tsxx/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/sass-styles-showcase/InputsTab.tsxx/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/sass-styles-showcase/LayoutTab.tsx}/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/schema-editor/SchemaEditorWorkspace.tsximport ... button"}/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/ui/alert-dialog/alert-dialog-action.tsx}/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/ui/alert-dialog/alert-dialog-cancel.tsxe/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/ui/calendar.tsxs/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/ui/carousel/carousel-next.tsxw/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/ui/carousel/carousel-previous.tsximport ... dialog"s/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/ui/command/command-dialog.tsximport ... /label"l/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/ui/form/form-label.tsxg/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/ui/pagination.tsximport ... /input"r/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/ui/sidebar/sidebar-input.tsximport ... ooltip"x/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/ui/sidebar/sidebar-menu-button.tsximport ... idebar"DLegacy component barrel import: @/components/ui/sidebar/use-sidebarimport ... eleton"z/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/ui/sidebar/sidebar-menu-skeleton.tsx9Legacy component barrel import: @/components/ui/skeletonu/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/ui/sidebar/sidebar-provider.tsximport ... ontext"HLegacy component barrel import: @/components/ui/sidebar/sidebar-contextq/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/ui/sidebar/sidebar-rail.tsximport ... arator"v/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/ui/sidebar/sidebar-separator.tsxt/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/ui/sidebar/sidebar-trigger.tsximport ... /sheet"l/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/ui/sidebar/sidebar.tsx6Legacy component barrel import: @/components/ui/sheeto/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/ui/sidebar/use-sidebar.tsimport ... toggle"i/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/ui/toggle-group.tsx7Legacy component barrel import: @/components/ui/toggle{/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/unit-test-designer/TestCasesPanel.tsx|/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/unit-test-designer/TestSuiteEditor.tsxz/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/components/unit-test-designer/TestSuiteList.tsx\/Users/rmac/.claude-worktrees/low-code-react-app-b/distracted-hawking/src/router/routes.tsx8#selectimpeis/NJO֊I⊀?  YSFDLJ  T ` / + - + + O + 8  5 р `р /р + - +р 5    + +/ +  O +  8  +  - + 5  +- +͂`߂/傁 +- +낁 5 Lל +O +8`Oˬ` 5 `޳Oܶ8` 5 `Á +- +Á8Ɓ 5 ʁÓOρ OՁ!8؁"`ہ"O߁#O $5 %O&O &5 '` '5 (8 +(- + )5 *`+O,`-O.` /5 0O 05 㓂1` 15  +2O +Ϛ 28 ՚32-3ߡ 38 ֪34-3ܪ54-5⪂64f664/7ȱ37-3α57-538-358-568f668/759-5Ƃ:/Ƃ5:-5Ƃ :8 Ђ +;- +Ђ;/Ђ;+ق <8 ق <5 ߂=/3>-35>-56>f66>/75?-56?/73@-35@-56@f66@/75A-56A/7߃ +B- +߃B/߃B+߃ B8 C/DCbDD/E/E+ +E- +؈F/ވFz3F-3琄G/퐄Gz3G-3ᛄH/盄Hz3H-3IH3I +J- +J/JgKSKK/L K8  L8 MMRN͜N8ݲ +OO +׼P鼅 P5 ƅQ+ƅQ ΅R/΅R+ۅ +R- +ۅR+ۅ5R-5S/S+T+T/ +T- + T5 KT/LU+U/3U-35U-5 +U- + U5 V/WYW/ɆW/ɆWlɆWzɆ3W-3Ɇ5W-5ɆIW3IɆ W  8 Ɇ +W + +- +ʆW  XʆDWQDن Y8 ن +YO + +ZB +ZOZ/3Z-3 +Z- +[`Ȃ[/΂ +[- +Ԃ3[-3ڂ5[-5ڛ\`웇\/3\-35\-5 \  8 I\ + +3I +\  - +ȵ]`ڵ]/േ +]O +﵇ ]8  +]- +ˇ^`ˇ^/ˇ +^- +ˇ +^O +ˇ^zˇ_^?_݇_/``Fab`Gbbb2cdhe~fg\h䢈iqi 㭈j ܲkxǷl mQٿn^ʈo؈pqr`s8ۊt+኉t/犉3t-3튉5t-56tf6It3Iɏu/ v8 윉w`x/x`ȡ3x-3y8zy3zذ{`갉|{3| +{- + {5 |{<}{G}`}/ }5 ù6} 6~8É +- +É6 6lj/̉ 8 ̉  /҉8ۉ`܉/܉ +- +܉ 8 O +- +/` 8  5  +- +/` 8  5 _?_ +- +``/`I3IŒ/ӑaߑJ蘊ō+ōD*Q/3-3I3I 5  -56 6 +O +ӊM6N֊ +- +׊/׊MUNۊ +- +ۊMUNƍ`؍ +- +ލz3z䍋-ҙ 5  +- +Ο +O +ݟ`/ˤ_Ѥ]͚0ŧ͚/˧D͚QDק͚_ݧ͚]ୋԛH3-35-53-35-5I3I5Ÿ-5IŸ3I̠@̠b١̠`ɢ齋Pb١`ɢL˥0k١΋`΋ +O +׋ԧD׋ԧ6׋ɨԧ  lݨ؋ԧ + +jԩ/bPb 8 M@CFˬ=&G8/3-35-56f6`/3-35-5ń 8 ˄I3I/ 8 ٱ8ᑌ˲`3˲-35˲-5̳`5̳-5K̳/Lɴzɴ/3ɴ-35ɴ-5Kɴ/Lҩ +- +ة/ީ8/5-56f6z/3-35-5/8ʌ +- +ʌ/ʌ+ʌ5-5ʌ 5 ό +- +ό/ό+ό5-5Ռ+Ռ5-5ՌK/Lٌ/ٌ+ٌ5-5݌ +- +݌`/` +- +/``/ +- + 5 `/ +- + 5  +- +/` 5 O +2 +O +2 +O +2 +뉍O +2 +O +2 +O +2 +b;c77ۍ7// -5Ɲ?֏-3ߏQDߏ  @3  9D + +]@5 /  @f  @H7 +- +/`3-35-5 8 I3I/Oǵ3-3͵5-5ӵ6f6嵐I3I/ 8 Û  `--- +runFileName: run-info-20260119.093153.868.yml +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 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 8b64e792f72c32d2143f98e67f7ca715013fcd7c..efc0ba8f74a2b1b561019ced466e2ee93824d4a0 100644 GIT binary patch delta 19 acmey$^p$CX1BbDpsj;4gnZ-sAT}A*v$_0)9 delta 19 acmey$^p$CX1Bao7iK(8sk-AO~@=M-FN!(N-vppFP8X-91oVesX)$4JQK8@6B$E7ygX zc;(-(f-i_ICN9>Jm^)0+K!Q3~%AbhNHYLzUpCYer(JGy-qHT~(r0#gIR!a-5C@+pp z3{H(+N)u$^(I+mSMv}wSpaMbX(gmrew*nbr3!d0ZA6AEnR{#J2 literal 0 HcmV?d00001 diff --git a/codeql-db-optimized/results/run-info-20260119.092754.748.yml b/codeql-db-optimized/results/run-info-20260119.092754.748.yml new file mode 100644 index 0000000..b01a454 --- /dev/null +++ b/codeql-db-optimized/results/run-info-20260119.092754.748.yml @@ -0,0 +1,617 @@ +--- +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/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 +extensionPacks: [] +packs: + 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: [] + 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/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: [] + 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 diff --git a/codeql-db-optimized/results/run-info-20260119.093153.868.yml b/codeql-db-optimized/results/run-info-20260119.093153.868.yml new file mode 100644 index 0000000..ee6545f --- /dev/null +++ b/codeql-db-optimized/results/run-info-20260119.093153.868.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: + 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: [] + 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/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: [] + 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 diff --git a/codeql/custom-queries/queries/ComponentCustomHookUsage.ql b/codeql/custom-queries/queries/ComponentCustomHookUsage.ql new file mode 100644 index 0000000..d88fa5d --- /dev/null +++ b/codeql/custom-queries/queries/ComponentCustomHookUsage.ql @@ -0,0 +1,20 @@ +/** + * @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 + */ +import javascript + +predicate isComponentFile(File f) { + f.getRelativePath().regexpMatch("^(src/)?components/.*\\.tsx$") +} + +from CallExpr call, File f, VarRef ref +where + f = call.getFile() and + isComponentFile(f) and + ref = call.getCallee() and + ref.getName().regexpMatch("^use[A-Z].*") +select call, "Hook call in component: " + ref.getName() diff --git a/codeql/custom-queries/queries/ComponentFilesInMigrationTargets.ql b/codeql/custom-queries/queries/ComponentFilesInMigrationTargets.ql new file mode 100644 index 0000000..451e1d5 --- /dev/null +++ b/codeql/custom-queries/queries/ComponentFilesInMigrationTargets.ql @@ -0,0 +1,16 @@ +/** + * @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 + */ +import javascript + +predicate isTargetComponentFile(File f) { + f.getRelativePath().regexpMatch("^(src/)?components/(atoms|molecules|organisms)/.*\\.tsx$") +} + +from File f +where isTargetComponentFile(f) +select f, "Component file in migration target folder" diff --git a/codeql/custom-queries/queries/ImportsConvertedJsonComponents.ql b/codeql/custom-queries/queries/ImportsConvertedJsonComponents.ql new file mode 100644 index 0000000..dbbf457 --- /dev/null +++ b/codeql/custom-queries/queries/ImportsConvertedJsonComponents.ql @@ -0,0 +1,20 @@ +/** + * @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 + */ +import javascript + +predicate isConvertedType(string name) { + name = "NavigationMenu" +} + +from ImportDeclaration imp, ImportSpecifier spec, string name +where + spec = imp.getASpecifier() and + name = spec.getImportedName() and + isConvertedType(name) and + imp.getRawImportPath().regexpMatch("^@/components/") +select imp, "Import converted to JSON: " + name diff --git a/codeql/custom-queries/queries/ImportsJsonDefinitions.ql b/codeql/custom-queries/queries/ImportsJsonDefinitions.ql new file mode 100644 index 0000000..60a8ef4 --- /dev/null +++ b/codeql/custom-queries/queries/ImportsJsonDefinitions.ql @@ -0,0 +1,12 @@ +/** + * @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 + */ +import javascript + +from ImportDeclaration imp +where imp.getRawImportPath().regexpMatch("^@/components/json-definitions/") +select imp, "Direct JSON definition import: " + imp.getRawImportPath() diff --git a/codeql/custom-queries/queries/LegacyComponentBarrelImports.ql b/codeql/custom-queries/queries/LegacyComponentBarrelImports.ql new file mode 100644 index 0000000..ca4d2f5 --- /dev/null +++ b/codeql/custom-queries/queries/LegacyComponentBarrelImports.ql @@ -0,0 +1,12 @@ +/** + * @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 + */ +import javascript + +from ImportDeclaration imp +where imp.getRawImportPath().regexpMatch("^@/components/(atoms|molecules|organisms|ui)(/.*)?$") +select imp, "Legacy component barrel import: " + imp.getRawImportPath() diff --git a/codeql/custom-queries/queries/LegacyImportsInMigrationTargets.ql b/codeql/custom-queries/queries/LegacyImportsInMigrationTargets.ql new file mode 100644 index 0000000..63cf85d --- /dev/null +++ b/codeql/custom-queries/queries/LegacyImportsInMigrationTargets.ql @@ -0,0 +1,19 @@ +/** + * @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 + */ +import javascript + +predicate isTargetComponentFile(File f) { + f.getRelativePath().regexpMatch("^(src/)?components/(atoms|molecules|organisms)/.*\\.tsx$") +} + +from ImportDeclaration imp, File f +where + f = imp.getFile() and + isTargetComponentFile(f) and + imp.getRawImportPath().regexpMatch("^@/components/") +select imp, "Legacy import in migration target: " + imp.getRawImportPath()