-
Notifications
You must be signed in to change notification settings - Fork 2
Local Codeql scanning + patch findings #204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
kwinto
wants to merge
14
commits into
main
Choose a base branch
from
tech-story/113650-codeql
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+405
−9
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
a82a394
improve special case santize
kwinto 85ea4bd
implement codeql local scanning + patches
kwinto 7680cf6
fix eslint warnings
kwinto 1d47fa3
remove unused script
kwinto 47a9c95
delete unwanted file
kwinto 72b16cc
improve gitignore
kwinto a9ec092
improve escaping
kwinto 34880ee
Apply suggestion from @Copilot
kwinto ce9e87a
Update src/utils.ts
kwinto 5be3baa
Update src/utils.ts
kwinto f604f0c
Initial plan
Copilot a34a6aa
Replace rm -rf with cross-platform Node.js script
Copilot 89a08af
Replace custom clean script with rimraf package
Copilot 12cd12e
Merge pull request #209 from Cognigy/copilot/sub-pr-204
kwinto File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,4 +28,8 @@ dist-ssr | |
| *.module.css.d.ts | ||
|
|
||
| # Packed files | ||
| *.tgz | ||
| *.tgz | ||
|
|
||
| codeql-results.sarif | ||
| codeql-db | ||
| codeql-results-dist.sarif | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| # CodeQL configuration for local scanning of a TypeScript + Vite library. | ||
| # Includes application sources in src plus third-party code in node_modules | ||
| # while aggressively excluding low-value / very large subtrees to keep the | ||
| # database size and analysis time manageable. | ||
| # | ||
| # Usage with CodeQL CLI: | ||
| # codeql database create codeql-db \ | ||
| # --language=javascript \ | ||
| # --source-root=. \ | ||
| # --codescanning-config=codeql-config.yml \ | ||
| # --command="npm run build" | ||
| # | ||
| # (If you only need type info and no emitted JS, you can use --command="true" | ||
| # because Vite + TS compilation output will already exist in dist if built.) | ||
| # | ||
| # If analysis becomes too slow, first remove node_modules entirely and only | ||
| # re-enable a curated subset (e.g. crypto libs) by copying them to a vendor/ dir. | ||
|
|
||
| name: "Chat Components local scan (src + prod node_modules)" | ||
|
|
||
| paths: | ||
| - src | ||
| - node_modules | ||
|
|
||
| # Exclusions are deliberately verbose; prune or uncomment as needed. | ||
| paths-ignore: | ||
| # Build outputs / bundles | ||
| - dist/** | ||
| - node_modules/**/dist/** | ||
| - node_modules/**/build/** | ||
| - node_modules/**/lib/** # Many packages ship transpiled output here | ||
| - node_modules/**/coverage/** | ||
| - node_modules/**/.cache/** | ||
|
|
||
| # Tests, fixtures, examples | ||
| - node_modules/**/test/** | ||
| - node_modules/**/tests/** | ||
| - node_modules/**/__tests__/** | ||
| - node_modules/**/testing/** | ||
| - node_modules/**/benchmark/** | ||
| - node_modules/**/bench/** | ||
| - node_modules/**/example/** | ||
| - node_modules/**/examples/** | ||
| - node_modules/**/fixtures/** | ||
| - node_modules/**/mocks/** | ||
| - node_modules/**/spec/** | ||
| - node_modules/**/__mocks__/** | ||
|
|
||
| # Documentation & metadata | ||
| - node_modules/**/docs/** | ||
| - node_modules/**/doc/** | ||
| - node_modules/**/documentation/** | ||
| - node_modules/**/.github/** | ||
| - node_modules/**/scripts/** # Build / maintenance scripts seldom security-relevant | ||
|
|
||
| # Front-end demo tooling in dependencies | ||
| - node_modules/**/cypress/** | ||
| - node_modules/**/storybook/** | ||
| - node_modules/**/playwright/** | ||
| - node_modules/**/wdio/** | ||
| - node_modules/**/selenium/** | ||
|
|
||
| # IDE/project artifacts | ||
| - node_modules/**/.vscode/** | ||
| - node_modules/**/.idea/** | ||
|
|
||
| # Declaration files (optional exclusion — they are not executable code) | ||
| - node_modules/**/*.d.ts | ||
|
|
||
| # Large, frequently safe-to-ignore frameworks (uncomment if size is too big): | ||
| - node_modules/react/** | ||
| - node_modules/react-dom/** | ||
| - node_modules/typescript/** # Compiler sources rarely help app vuln discovery | ||
| - node_modules/@types/** # Pure type declarations | ||
| - node_modules/babel-*/** # Tooling | ||
| - node_modules/eslint/** # Tooling | ||
| - node_modules/@eslint/** # Tooling | ||
| # No queries specified; choose suites explicitly at analyze time | ||
| # e.g. javascript-code-scanning.qls, javascript-security-extended.qls, javascript-security-and-quality.qls | ||
| # Advanced options (leave commented unless needed): | ||
| # packs: | ||
| # - codeql/javascript-experimental@@latest | ||
| # query-filters: | ||
| # - exclude: | ||
| # id: js/useless-equality-check | ||
| # | ||
| # For very large dependency trees consider a two-tier approach: | ||
| # 1. Daily / PR scans with only `src` | ||
| # 2. Weekly deep scan enabling node_modules (this config) | ||
| # | ||
| # To trim size further, run a pre-step to remove redundant folders: | ||
| # find node_modules -type d -name dist -prune -exec rm -rf {} + | ||
| # find node_modules -type d -name coverage -prune -exec rm -rf {} + | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.