dolibarr/dev/tools
MDW a0b820564f
QUAL: Add SqlInjectionPlugin to detect unsafe SQL variable usage (fixes, notices) (#38722)
* QUAL: Add SqlInjectionPlugin to detect unsafe SQL variable usage

# QUAL: Add SqlInjectionPlugin to detect unsafe SQL variable usage

This commit adds a new SqlInjectionPlugin to the Phan configuration, which helps detect unsafe SQL variable usage in the Dolibarr codebase. The plugin checks for variables used in sql expressions that are not properly escaped, cast, or protected by safe methods.

* Qual: Add SqlInjection exceptions to Phan baseline

* Qual: Add SqlInjection exceptions to Phan baseline

* Qual: Update baseline.txt to remove SqlInjection suppressions

The SqlInjection suppressions have been removed from the baseline.txt file.
This reenables the notification of "unfixed" cases.

* Qual: SQL injection detection for missing quotes on escaped strings

# Qual: SQL injection detection for missing quotes on escaped strings

In summary: report lines with missing quotes as in `" WHERE ".$db->escape($value)." OR "`.

* Qual: Fix code for SqlInjection analysis

# Qual: Fix code for SqlInjection analysis

Rewrite some escape calls, change escape() in sanitize(), rename variable, ignore SqlInjection notices.

* Qual: Update baseline

Allow some SqlInjection* notices, to be fixed later or already fixed in develop.
2026-08-08 11:19:04 +02:00
..
api/macos Clean files 2026-01-07 19:01:54 +01:00
codespell Qual: Fix 'SqlInjection' notices (#39228) 2026-07-20 15:26:30 +02:00
phan QUAL: Add SqlInjectionPlugin to detect unsafe SQL variable usage (fixes, notices) (#38722) 2026-08-08 11:19:04 +02:00
php-cs-fixer Qual: Update PHP-CS-Fixer configuration and DolibarrModules class 2025-11-27 01:08:46 +01:00
phpstan CI 2026-05-22 12:17:17 +02:00
rector Qual: Fix french comments and improve detector (#39026) 2026-07-01 12:26:51 +02:00
test Clean files 2026-01-07 19:01:54 +01:00
.gitignore NEW: dev tools: add github webhook handler to auto-assign pull requests (#34579) 2025-06-20 15:45:31 +02:00
apstats.php Qual: Fix Phan notices, set PHP min to 7.2 to avoid some (#38400) 2026-05-23 04:09:56 +02:00
dolibarr-mysql2pgsql.pl Qual: Add perltidy & perlcritic + updates to fix notices. (#36370) 2025-11-23 01:52:07 +01:00
dolibarr-postgres2mysql.php Reduce exceptions 2026-05-22 10:36:30 +02:00
fixaltlanguages.sh Qual Language scripts fixed/updated (#28101) 2024-02-10 17:26:34 +01:00
fixaltlanguages_pre-commit.sh Qual Language scripts fixed/updated (#28101) 2024-02-10 17:26:34 +01:00
fixcopyrightheader.php Fix: Copyright generation when single year 2025-01-05 15:16:18 +01:00
fixdosfiles.sh Qual: Ignore most shellcheck annotations, fix some (#27452) 2024-01-12 21:03:08 +01:00
fixduplicatelangkey.sh Qual Language scripts fixed/updated (#28101) 2024-02-10 17:26:34 +01:00
fixduplicatelanglines.sh Qual Language scripts fixed/updated (#28101) 2024-02-10 17:26:34 +01:00
fixnotabfiles.sh Qual Language scripts fixed/updated (#28101) 2024-02-10 17:26:34 +01:00
fixperms.sh Qual: Ignore most shellcheck annotations, fix some (#27452) 2024-01-12 21:03:08 +01:00
fixsnakeCaseToCamelCase.sh Clean files 2026-01-07 19:01:54 +01:00
fixutf8bomfiles.sh Qual: Ignore most shellcheck annotations, fix some (#27452) 2024-01-12 21:03:08 +01:00
github_authors_and_commits_bydate.sh Improve 2 of the github scripts (#27493) 2024-01-14 12:15:47 +01:00
github_commits_byversion.sh Fix CI 2025-11-26 21:49:07 +01:00
github_lines_byuser.sh Fix: github_lines_byuser.sh - resolve issue with iconv 2024-01-14 21:56:47 +01:00
github_pr_reviewers_webhook.php NEW: dev tools: add github webhook handler to auto-assign pull requests (#34579) 2025-06-20 15:45:31 +02:00
make_sprite.sh Qual: Ignore most shellcheck annotations, fix some (#27452) 2024-01-12 21:03:08 +01:00
optimize_images.sh Qual: Update pre-commit hooks (#36262) 2025-11-17 21:50:29 +01:00
resize_window.sh Clean files 2026-01-07 19:01:54 +01:00