Repository navigation
Bugfix Issue 2125 Authored Security Chapter
Chapter 23 (Non-Functional: Security Testing) was a read-only page.
gui/templates/strategy/nfrSecurity.html had no textarea and no save action, so
teams could not record the threat model, penetration/vulnerability scan results
or access-control matrix their project actually applies. Measured before the
fix: grep -c '<textarea>' = 0, live DOM textareas: 0, buttons: [], zero
strategychapter network requests, and an authenticated BFF init call for
chapter=security returned 400 bad_chapter while chapter=accessibility
returned 200.
The chapter was still a static translated page. Unlike the seven already
authored chapters (intro, objectives, usability, accessibility, compatibility,
reliability, maintainability), it was not wired to
api/strategychapter/index.php, and the report title map in
gui/templates/results/strategyReport.html did not recognize the security
chapter code. The BFF allowlist in schapterCodes() had no security entry
either, even though the chapter itself was exposed by api/strategy/index.php:80.
This is an unfinished migration, not a regression: 1.9.20 shipped all NFR pages
as static translated content and 2.0.1 migrated them one at a time (#2101,
#2127, #2126, #2128, #2129, #2130).
The fix extends the existing per-project chapter infrastructure instead of
introducing a parallel storage path. Adding security to the BFF allowlist is
additive: all existing chapters keep the same rights checks, atomic upsert and
AUDIT event. The chapter page mirrors the already-verified #2126/#2127 Dashio
editor, and the report map gains one key so Markdown, HTML, PDF and print
exports show the localized title instead of the raw security code. Two
alternatives were rejected: localStorage text (not project-scoped, no rights,
absent from the report/PDF) and a new BFF/table (duplicates working
infrastructure).
-
api/strategychapter/index.php: addedsecuritytoschapterCodes()and to the documented route contract, soinit,listandsaveuse the same per-project persistence and rights checks as every other authored chapter. -
gui/templates/strategy/nfrSecurity.html: added the Dashio editor card with a textarea, author/timestamp metadata, Save button, localized status messages, project-context footer and the standard 401/403/400 error handling. Read-only project roles get a disabled textarea and Save button. -
gui/templates/results/strategyReport.html: addedsecurity: 'ts.chapterSecurity'tochapterTitle()so report panel 11 uses the localized chapter title in Markdown, HTML, PDF and print exports. -
gui/templates/i18n/*.json: addedts.secNotesTitle,ts.secNotesHint,ts.secNotesLabelandts.secNotesSaveto all ten bundles, translated in the nine non-English bundles. The pre-existingts.chapterSecurityremains the English source string in eight bundles (a separate translation gap). -
CHANGELOG: one 2.0.1 KEY BUGFIX line for #2125. -
tmp/TLU_Test_Cases.md: numbered regression suite with measured results.



-
php -l api/strategychapter/index.php: no syntax errors. - Extracted page JavaScript passed
node --check;grep -c '<textarea>'→ 1. -
python3 -m json.toolpassed for all ten bundles;bash ai/verify_i18n_coverage.sh: 9 bundles passed, 0 missing. - Admin UI: fixture project 1 (
SEC); saved a two-line note and reloaded →Updated: 2026-11-30 01:50:26 by adminwith the text preserved verbatim. - BFF:
initreturned code/text/author/timestamps;listreturned["security"]; bad chapter → 400, missing project → 400, unknown project → 404,DELETE→ 405 withAllow: GET, POST, unauthenticated → 401. - Read-only user
secviewer(project role 5): textarea and Save disabled with saved text visible; direct POST → 403no_right; DB text unchanged. - Report panel 11:
?locale=de&tproject_id=1showed the note withSecurity Testing · Letzter Autor: admin · Aktualisiert: 2026-11-30 01:50:26;?locale=ro&tproject_id=1showedTestare de Securitate · Ultimul autor: admin · Actualizat: 2026-11-30 01:50:26. No rawsecuritycode leaked. - Event Viewer (
eventstable): 3 rows, alllog_level=16AUDIT (oneSTRATEGY_CHAPTER_SAVE, two logins) → 0 Error/Warning entries. - Suite gate:
TLU_REQUIRE_SUITE="Issue #2125" bash ai/verify_test_suites.sh→ 34 PASS / 0 FAIL / 0 SKIP; 1036 → 1037 suites, no suite lost.
PASS — Fixes #2125. Refs #2101.