dolibarr/dev
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
..
build Prepare release 2026-07-30 11:23:07 +02:00
examples fix: dev/examples/zapier/package.json to reduce vulnerabilities (#37071) 2026-02-04 14:48:57 +01:00
initdata exit code must be >= 0 (#35311) 2025-09-12 02:29:23 +02:00
initdemo Clean dump file 2026-06-04 23:28:05 +02:00
resources Doc 2026-05-28 19:48:52 +02:00
setup Qual: Update LanguageOfCommentsSniff to avoid PHP7 incompatibility (#39032) 2026-07-01 16:44:17 +02:00
skeletons Clean files 2026-01-07 19:01:54 +01:00
tools QUAL: Add SqlInjectionPlugin to detect unsafe SQL variable usage (fixes, notices) (#38722) 2026-08-08 11:19:04 +02:00
translation Fix showunused option in sanity_check_trans_missing_unused.sh 2026-06-27 16:51:54 +02:00
.gitignore
dolibarr_changes.txt Automated merge from 23.0 to develop 2026-07-15 02:06:09 +02:00
lockedfiles.txt Test check on checksum 2026-06-04 22:57:30 +02:00
pullmerge.sh Enhance merge tool 2026-03-15 12:13:00 +01:00
README

README (English)
--------------------------------

This directory contains sub-directories to provide tools or documentation for developers.

Note: All files in this directory are in the source repository only and are not provided with a standard release. They are useless to make Dolibarr working.

You may find a more complete documentation on Dolibarr on the wiki:

https://wiki.dolibarr.org/

and on

https://doxygen.dolibarr.org/