Koha-clms/xt/author
Tomas Cohen Arazi a07ffbf3d9
Bug 40579: Add author test for CSV formula injection protection
This test ensures all Text::CSV usage in Koha includes proper formula
injection protection to prevent CSV formula injection attacks.

The test scans all Perl modules and verifies that Text::CSV constructors
include the 'formula' parameter set to a safe mode ('empty', 'die',
'croak', 'diag', or numeric 1-5).

To test:
1. Apply this patch
2. Run:
   $ ktd --shell
  k$ prove xt/author/Text_CSV_Various.t
=> FAIL: Test should fail showing files without formula protection:
   - Koha/Patrons/Import.pm
   - Koha/BackgroundJob/ImportKBARTFile.pm
   - Koha/ERM/EUsage/CounterFile.pm
3. Apply the follow-up patch to fix the violations
4. Repeat 2
=> SUCCESS: All tests should pass
5. Sign off :-D

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-08-26 21:05:13 +02:00
..
Text_CSV_Various.t Bug 40579: Add author test for CSV formula injection protection 2025-08-26 21:05:13 +02:00
codespell.t Bug 39876: Apply module to other tests 2025-07-10 22:47:34 +02:00
icondirectories.t Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
pod_checker.t Bug 39876: Apply module to other tests 2025-07-10 22:47:34 +02:00
pod_coverage.t Bug 39367: Add POD coverage tests 2025-04-23 09:35:16 +02:00
podcorrectness.t Bug 39876: Apply module to other tests 2025-07-10 22:47:34 +02:00
show-template-structure.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
valid-templates.t Bug 39741: Make valid-templates.t handle dirs 2025-05-06 18:48:27 +02:00