You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tooling.apache.org by as...@apache.org on 2026/04/22 09:38:42 UTC
(tooling-agents) branch main updated: ASVS L3 audit: 3.2.3 (ch03_general)
This is an automated email from the ASF dual-hosted git repository.
asf-tooling pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-agents.git
The following commit(s) were added to refs/heads/main by this push:
new 3842453 ASVS L3 audit: 3.2.3 (ch03_general)
3842453 is described below
commit 38424531c55905c87a6c2ad035206edd7ee2bdc7
Author: ASF Tooling Team <ro...@apache.org>
AuthorDate: Wed Apr 22 11:38:36 2026 +0200
ASVS L3 audit: 3.2.3 (ch03_general)
---
.../reports/steve/v3/d0aa7e9/ch03_general/3.2.3.md | 519 +++++++++++++++++++++
1 file changed, 519 insertions(+)
diff --git a/repos/apache/ASVS/reports/steve/v3/d0aa7e9/ch03_general/3.2.3.md b/repos/apache/ASVS/reports/steve/v3/d0aa7e9/ch03_general/3.2.3.md
new file mode 100644
index 0000000..5237eb6
--- /dev/null
+++ b/repos/apache/ASVS/reports/steve/v3/d0aa7e9/ch03_general/3.2.3.md
@@ -0,0 +1,519 @@
+# ASVS 3.2.3 DOM Clobbering Prevention Audit Report
+
+## Executive Summary
+
+**Audit Metadata:**
+- **Repository:** apache/steve
+- **Audit Date:** Apr 22, 2026
+- **Auditor:** Tooling Agents
+- **ASVS Requirement:** 3.2.3 — Verify that the application avoids DOM clobbering when using client-side JavaScript by employing explicit variable declarations, performing strict type checking, avoiding storing global variables on the document object, and implementing namespace isolation.
+ - **Level:** 3
+ - **Section:** Unintended Content Interpretation
+ - **Section Description:** Rendering content or functionality in an incorrect context can result in malicious content being executed or displayed.
+ - **Chapter:** Web Frontend Security
+- **Files Analyzed:** 6 relevant out of 49 total, 12 skipped
+
+**Finding Counts:**
+
+| Severity | Count |
+|----------|-------|
+| Critical | 0 |
+| High | 0 |
+| Medium | 3 |
+| Low | 0 |
+| **Total** | **3** |
+
+**Summary:**
+
+The application has **inconsistent DOM clobbering defenses**. The `vote-on.ezt` template demonstrates a correct defensive pattern (IIFE + `'use strict'`), but this pattern is not applied to the shared JavaScript utility file (`steve.js`) or the other template inline scripts (`admin.ezt`, `manage.ezt`, `manage-stv.ezt`). Combined with raw HTML rendering of issue descriptions that enables injection of elements with arbitrary `id` attributes, this creates an exploitable DOM clobbering attac [...]
+
+---
+
+## Security Controls Inventory
+
+| Control | Defined In | Applied In | Gap? |
+|---------|-----------|------------|------|
+| IIFE namespace isolation | `vote-on.ezt` | `vote-on.ezt` only | **Type B** — not in `steve.js`, `admin.ezt`, `manage.ezt`, `manage-stv.ezt` |
+| `'use strict'` directive | `vote-on.ezt` | `vote-on.ezt` only | **Type B** — absent from all other JS |
+| `escapeHtml()` utility | `vote-on.ezt` | `vote-on.ezt` (candidate names) | **Type B** — not used in other templates |
+| `const`/`let` variable declarations | All files | All files | ✅ Consistent |
+| Type checking on `getElementById` results | Not defined | Nowhere | **Type A** — no control exists |
+| Null checking on `getElementById` results | Not defined | Nowhere | **Type A** — no control exists |
+
+---
+
+## Critical File Review
+
+### JavaScript Security Posture Analysis
+
+| File | Namespace Isolation | `'use strict'` | Type Checking | Global Functions | Risk Level |
+|------|-------------------|----------------|---------------|------------------|------------|
+| `steve.js` | ❌ None | ❌ No | ❌ No | 3 (`showModal`, `validateRequiredField`, `submitFormWithLoading`) | **HIGH** (loaded on all pages) |
+| `admin.ezt` script | ❌ None | ❌ No | ❌ No | 2 (`openCreateElectionModal`, `saveElection`) | MEDIUM |
+| `manage.ezt` script | ❌ None | ❌ No | ❌ No | 6 (`toggleDescription`, `toggleAllDescriptions`, `openAddIssueModal`, `openEditIssueModal`, `openDeleteIssueModal`, `saveIssue`) | **HIGH** (renders user HTML) |
+| `manage-stv.ezt` script | ❌ None | ❌ No | ❌ No | 6 (same set) | **HIGH** (renders user HTML) |
+| `vote-on.ezt` script | ✅ IIFE | ✅ Yes | ❌ No (except 1 null check) | 8 (via `window.*` assignment) | MEDIUM (proper isolation, but lacks type checks) |
+
+### Security-Sensitive Functions Reviewed
+
+**`v3/server/static/js/steve.js`:**
+
+| Function | Lines | Purpose | Security Issues |
+|----------|-------|---------|-----------------|
+| `showModal` | 30-34 | Initialize Bootstrap modal | Global scope, no type checking on `getElementById` |
+| `validateRequiredField` | 36-47 | Validate form field presence | Global scope, no type checking on `getElementById` |
+| `submitFormWithLoading` | 49-73 | Submit form with loading indicator | Global scope, no type/null checking on `getElementById` |
+
+**`v3/server/templates/manage.ezt` (inline script):**
+
+| Function | Purpose | Security Issues |
+|----------|---------|-----------------|
+| `toggleDescription` | Toggle issue description visibility | Global scope, no strict mode |
+| `toggleAllDescriptions` | Toggle all descriptions | Global scope, no strict mode |
+| `openAddIssueModal` | Open modal for adding issue | Global scope, no strict mode |
+| `openEditIssueModal` | Open modal for editing issue | Global scope, no type checking on `getElementById` |
+| `openDeleteIssueModal` | Open modal for deleting issue | Global scope, no strict mode |
+| `saveIssue` | Save issue via AJAX | Global scope, no type checking on `getElementById('csrf-token')` |
+
+**`v3/server/templates/vote-on.ezt` (inline script):**
+
+| Function | Purpose | Security Issues |
+|----------|---------|-----------------|
+| `escapeHtml` | Sanitize text for HTML insertion | ✅ Proper implementation |
+| `updateRankingDisplay` | Update STV ranking UI | Within IIFE but no type checking |
+| `submitVotes` | Submit ballot | Within IIFE, has one null check but no type checking |
+| Various drag/drop handlers | SortableJS integration | Within IIFE (protected) |
+
+---
+
+## Findings
+
+### Medium Severity
+
+#### ASVS-323-MED-001: Shared Utility Functions Declared in Global Scope Without Namespace Isolation
+
+**Severity:** MEDIUM
+
+**Location:**
+- **File:** `v3/server/static/js/steve.js`
+- **Lines:** 30-73
+- **Functions:** `showModal`, `validateRequiredField`, `submitFormWithLoading`
+
+**Related Functions Checked:**
+- All three utility functions in `steve.js`
+- Callers in `admin.ezt`, `manage.ezt`, `manage-stv.ezt`, `vote-on.ezt`
+
+**Gap Type:** Type B — The correct namespace isolation pattern (`(function() { 'use strict'; ... })()`) EXISTS in `vote-on.ezt` but is NOT APPLIED to `steve.js`, which is loaded on every page.
+
+**Description:**
+
+The shared utility file `steve.js` declares three functions at global scope without namespace isolation or strict mode enforcement. These functions are accessible as properties of the `window` object, making them vulnerable to DOM clobbering attacks where malicious HTML elements with matching `id` or `name` attributes could shadow these function references.
+
+**Vulnerable Code:**
+
+```javascript
+function showModal(modalId) {
+ const modal = new bootstrap.Modal(document.getElementById(modalId));
+ modal.show();
+ return modal;
+}
+
+function validateRequiredField(fieldId) {
+ const field = document.getElementById(fieldId);
+ const value = field.value.trim();
+ // ...
+}
+
+function submitFormWithLoading(formId, buttonId, loadingText = 'Submitting...') {
+ const form = document.getElementById(formId);
+ const button = document.getElementById(buttonId);
+ // ...
+ form.submit();
+}
+```
+
+**Data Flow:**
+
+1. An authorized committer creates/edits an issue with a malicious description containing `<img id="submitFormWithLoading" name="submitFormWithLoading">`
+2. Issue descriptions are rendered as raw HTML via `rewrite_description()` (wraps in `<pre>` but does not sanitize) and unescaped `[issues.description]` template variable
+3. `function` declarations in `steve.js` create `window.showModal`, `window.validateRequiredField`, `window.submitFormWithLoading` properties
+4. On pages where the description renders, the named element creates a competing `window.submitFormWithLoading` reference
+5. While function declarations typically take precedence, browser inconsistencies and edge cases (especially with `<form name="...">` or `<embed name="...">`) can lead to unexpected behavior
+
+**Proof of Concept:**
+
+A committer creates an issue with this description:
+```html
+This is an important vote.
+<a id="submitFormWithLoading" name="submitFormWithLoading" href="https://attacker.example.com"></a>
+```
+
+When rendered on `admin.ezt` or `manage.ezt`, the element with `id="submitFormWithLoading"` is added to the global scope. In certain browsers, accessing `window.submitFormWithLoading` after this injection may return the HTMLAnchorElement instead of the function, causing `submitFormWithLoading(...)` calls to throw `TypeError: submitFormWithLoading is not a function`, preventing form submission.
+
+**Impact:**
+
+Denial of service for election management operations. On voting pages, while `vote-on.ezt`'s IIFE provides some protection for its own variables, it still calls `submitFormWithLoading` from the global scope, potentially breaking vote submission.
+
+**Remediation:**
+
+```javascript
+// v3/server/static/js/steve.js - wrap in namespace
+const SteVe = (function() {
+ 'use strict';
+
+ function showModal(modalId) {
+ const el = document.getElementById(modalId);
+ if (!(el instanceof HTMLElement)) {
+ console.error('showModal: element not found or unexpected type', modalId);
+ return null;
+ }
+ const modal = new bootstrap.Modal(el);
+ modal.show();
+ return modal;
+ }
+
+ function validateRequiredField(fieldId) {
+ const field = document.getElementById(fieldId);
+ if (!(field instanceof HTMLInputElement || field instanceof HTMLTextAreaElement)) {
+ console.error('validateRequiredField: unexpected element type', fieldId);
+ return false;
+ }
+ const value = field.value.trim();
+ if (!value) {
+ field.classList.add('is-invalid');
+ return false;
+ }
+ field.classList.remove('is-invalid');
+ return true;
+ }
+
+ function submitFormWithLoading(formId, buttonId, loadingText = 'Submitting...') {
+ const form = document.getElementById(formId);
+ if (!(form instanceof HTMLFormElement)) {
+ console.error('submitFormWithLoading: form not found or unexpected type', formId);
+ return;
+ }
+ const button = document.getElementById(buttonId);
+ if (!(button instanceof HTMLButtonElement)) {
+ console.error('submitFormWithLoading: button not found', buttonId);
+ return;
+ }
+ const originalHTML = button.innerHTML;
+ button.disabled = true;
+ button.textContent = '';
+ const spinner = document.createElement('span');
+ spinner.className = 'spinner-border spinner-border-sm me-1';
+ spinner.setAttribute('role', 'status');
+ spinner.setAttribute('aria-hidden', 'true');
+ button.appendChild(spinner);
+ button.appendChild(document.createTextNode(loadingText));
+ form.submit();
+ }
+
+ return { showModal, validateRequiredField, submitFormWithLoading };
+})();
+```
+
+---
+
+#### ASVS-323-MED-002: Inline Scripts in Management Templates Lack Namespace Isolation and Strict Mode
+
+**Severity:** MEDIUM
+
+**Location:**
+- **File:** `v3/server/templates/manage.ezt` — inline `<script>` block (after `[include "footer.ezt"]`)
+- **File:** `v3/server/templates/manage-stv.ezt` — inline `<script>` block
+- **File:** `v3/server/templates/admin.ezt` — inline `<script>` block
+
+**Related Functions Checked:**
+- `manage.ezt`: `toggleDescription`, `toggleAllDescriptions`, `openAddIssueModal`, `openEditIssueModal`, `openDeleteIssueModal`, `saveIssue`
+- `manage-stv.ezt`: Same set of functions
+- `admin.ezt`: `openCreateElectionModal`, `saveElection`
+
+**Gap Type:** Type B — `vote-on.ezt` wraps its script in `(function() { 'use strict'; ... })()` providing proper isolation. The management templates do not use this pattern despite handling equally sensitive operations and rendering the same unsanitized issue descriptions.
+
+**Description:**
+
+Management templates contain inline JavaScript that declares multiple functions and variables at global scope without namespace isolation or strict mode. This creates pollution of the global namespace and makes these functions vulnerable to DOM clobbering attacks.
+
+**Vulnerable Code (`manage.ezt`, script block):**
+
+```javascript
+const openModal = new bootstrap.Modal(document.getElementById('openConfirmModal'));
+const closeModal = new bootstrap.Modal(document.getElementById('closeConfirmModal'));
+const dateSaveErrorModal = new bootstrap.Modal(document.getElementById('dateSaveErrorModal'));
+const savedToast = new bootstrap.Toast(document.getElementById('saved-toast'));
+
+const csrfToken = document.getElementById('csrf-token').value;
+
+// ... multiple function declarations at global scope ...
+function toggleDescription(issueId) { ... }
+function toggleAllDescriptions() { ... }
+function openAddIssueModal() { ... }
+function openEditIssueModal(issueId, title, description) { ... }
+function openDeleteIssueModal(issueId, title) { ... }
+function saveIssue() { ... }
+```
+
+**Vulnerable Code (`manage-stv.ezt`, script block):**
+
+```javascript
+const openModal = new bootstrap.Modal(document.getElementById('openConfirmModal'));
+const closeModal = new bootstrap.Modal(document.getElementById('closeConfirmModal'));
+
+// Global-scope variable
+let allExpanded = false;
+function toggleAllDescriptions() { ... }
+function openAddIssueModal() { ... }
+// ...
+```
+
+**Data Flow (`manage.ezt` example):**
+
+1. `manage.ezt` renders issue descriptions as raw HTML: `<div id="description-[issues.iid]" class="description mt-2">[issues.description]</div>`
+2. The inline script declares `function openEditIssueModal(...)` at global scope, which creates `window.openEditIssueModal`
+3. All function declarations (`toggleDescription`, `saveIssue`, `openDeleteIssueModal`, etc.) are similarly exposed on `window`
+4. No `'use strict'` directive means implicit variable creation via assignment typos is also possible
+
+**Proof of Concept:**
+
+An attacker with committer privileges creates an issue with description:
+```html
+Review carefully.
+<form id="openEditIssueModal" name="openEditIssueModal"></form>
+```
+
+When this issue is rendered on the management page, the `<form>` element with matching `id` and `name` creates a `window.openEditIssueModal` reference that may shadow the function, causing edit operations to fail.
+
+**Impact:**
+
+Election management functions (`openAddIssueModal`, `saveIssue`, `openDeleteIssueModal`) are exposed at the global scope. Combined with the raw HTML rendering of issue descriptions on the same page, DOM elements could interfere with these functions' lookup of other elements via `document.getElementById`.
+
+**Remediation:**
+
+Wrap all template inline scripts in IIFEs with strict mode, matching the pattern already used in `vote-on.ezt`:
+
+```javascript
+// manage.ezt
+(function() {
+ 'use strict';
+
+ const openModal = new bootstrap.Modal(document.getElementById('openConfirmModal'));
+ const closeModal = new bootstrap.Modal(document.getElementById('closeConfirmModal'));
+ // ... rest of script ...
+
+ // Only expose to HTML onclick handlers via window if needed:
+ window.toggleDescription = toggleDescription;
+ window.openAddIssueModal = openAddIssueModal;
+ window.openEditIssueModal = openEditIssueModal;
+ window.openDeleteIssueModal = openDeleteIssueModal;
+ window.saveIssue = saveIssue;
+})();
+```
+
+---
+
+#### ASVS-323-MED-003: No Type or Null Checking on `document.getElementById()` Results Across All Client-Side JavaScript
+
+**Severity:** MEDIUM
+
+**Location:**
+- **Files:** All JavaScript files (`steve.js`, `admin.ezt`, `manage.ezt`, `manage-stv.ezt`, `vote-on.ezt`)
+- **Lines:** Multiple instances throughout
+
+**Related Functions Checked:**
+- `steve.js`: `showModal` (line 31), `validateRequiredField` (line 42), `submitFormWithLoading` (line 49)
+- `manage.ezt`: `openEditIssueModal`, `saveIssue` (csrf-token access)
+- `vote-on.ezt`: Multiple instances in ranking and submission logic
+
+**Gap Type:** Type A — No type checking control exists anywhere in the codebase. The single `!hidden` null check in `submitVotes` is an exception that proves the rule — even it doesn't verify the element type.
+
+**Description:**
+
+Throughout the codebase, `document.getElementById()` is called without subsequent null or type checking. The return value is immediately used with property access (`.value`, `.classList`, `.innerHTML`) without verifying the returned element exists or is of the expected type. This creates vulnerability to DOM clobbering where an injected element of unexpected type could cause silent failures or type errors.
+
+**Vulnerable Code Examples:**
+
+`steve.js` Line 31:
+```javascript
+const modal = new bootstrap.Modal(document.getElementById(modalId));
+```
+
+`steve.js` Line 42:
+```javascript
+const field = document.getElementById(fieldId);
+const value = field.value.trim();
+```
+
+`manage.ezt` inline script:
+```javascript
+const csrfToken = document.getElementById('csrf-token').value;
+```
+
+`vote-on.ezt` inline script:
+```javascript
+const hidden = document.getElementById('vote-' + iid);
+// Used later:
+const alreadyRanked = hidden.value
+ ? hidden.value.split(',').map(s => s.trim()).filter(Boolean)
+ : [];
+```
+
+```javascript
+window.submitVotes = function () {
+ // ...
+ document.querySelectorAll('.issue-item[data-vtype="stv"]').forEach(item => {
+ const iid = item.dataset.iid;
+ const hidden = document.getElementById('vote-' + iid);
+ if (!hidden || !hidden.value) stvmissing.push(iid); // Only null check in entire codebase
+ });
+```
+
+**Data Flow:**
+
+1. Issue descriptions rendered as raw HTML may contain elements with `id` attributes that collide with IDs used by the application (e.g., `id="csrf-token"`, `id="vote-<iid>"`, `id="issueTitle"`)
+2. `document.getElementById()` returns the first matching element in DOM order
+3. Return value is used directly with property access (`.value`, `.classList`, `.innerHTML`) without verifying the returned element's type
+4. If the returned element is a different type than expected (e.g., an `<img>` instead of an `<input>`), accessing `.value` returns `undefined` rather than the expected string, causing silent data corruption or `TypeError`
+
+**Proof of Concept:**
+
+An authorized committer creates an issue with description:
+```html
+Review the proposal carefully.
+<input id="issueTitle" value="malicious-title" type="hidden">
+```
+
+When an admin opens the "Edit Issue" modal for a different issue on the `manage.ezt` page, the `openEditIssueModal` function executes:
+```javascript
+document.getElementById('issueTitle').value = title;
+```
+
+If the clobbered element appears first in DOM order, the edit modal's title field would not be properly populated, and subsequent saves could corrupt data.
+
+**Impact:**
+
+Without type checking, DOM clobbered elements can silently substitute for expected elements, leading to:
+- Silent data corruption (wrong `.value` read/written)
+- Function failures (`TypeError` on unexpected types)
+- Bypassed client-side validation (`validateRequiredField` operating on wrong element)
+
+**Remediation:**
+
+Implement a safe element lookup utility:
+
+```javascript
+// Add to steve.js namespace
+function safeGetElement(id, expectedType) {
+ const el = document.getElementById(id);
+ if (!el) {
+ console.error(`Element not found: #${id}`);
+ return null;
+ }
+ if (expectedType && !(el instanceof expectedType)) {
+ console.error(`Element #${id} is ${el.constructor.name}, expected ${expectedType.name}`);
+ return null;
+ }
+ return el;
+}
+
+// Usage examples:
+const form = safeGetElement('issueForm', HTMLFormElement);
+if (!form) return;
+
+const field = safeGetElement('issueTitle', HTMLInputElement);
+if (!field) return;
+
+const csrfInput = safeGetElement('csrf-token', HTMLInputElement);
+const csrfToken = csrfInput ? csrfInput.value : '';
+```
+
+---
+
+## Positive Security Patterns
+
+| Pattern | Location | Description |
+|---------|----------|-------------|
+| **IIFE namespace isolation** | `vote-on.ezt` | Script wrapped in `(function() { 'use strict'; ... })()` — correct defensive pattern that should be replicated |
+| **`escapeHtml()` utility** | `vote-on.ezt` Line ~355 | Candidate names sanitized before DOM insertion via `innerHTML` |
+| **Explicit `window.*` assignment** | `vote-on.ezt` | Functions needed by HTML event handlers are explicitly assigned to `window` rather than implicitly leaked |
+| **SRI on external script** | `vote-on.ezt` | SortableJS loaded with `integrity` attribute preventing tampering |
+| **`const`/`let` declarations** | All files | Modern variable declarations prevent accidental global creation within their scope |
+| **`textContent` for user data** | `manage.ezt`, `manage-stv.ezt` | `deleteIssueMessage.textContent = ...` safely handles user-provided titles without HTML injection |
+| **EZT `[format "js,html"]`** | `manage.ezt`, `manage-stv.ezt` | Issue titles/descriptions in `onclick` attributes use EZT's JS+HTML escaping |
+
+---
+
+## Architecture Observations
+
+1. **Inconsistent defensive posture**: The most security-critical page (`vote-on.ezt`, where voters submit ballots) has the best JavaScript hygiene, but the shared utility file (`steve.js`) that it depends on does not meet the same standard. This undermines the protection.
+
+2. **HTML injection as DOM clobbering enabler**: The `rewrite_description()` function in `pages.py` (line 59-67) wraps issue descriptions in `<pre>` tags but performs no HTML sanitization. The template then renders `[issues.description]` as raw HTML. This is the primary vector that would enable DOM clobbering — without it, there would be no way to inject elements with malicious `id` attributes.
+
+3. **Template engine escaping model**: EZT uses explicit `[format ...]` directives for escaping rather than auto-escaping. This opt-in model is inherently less safe — developers must remember to escape every output. The `[format "js,html"]` directive is used for onclick attributes but not for description div content.
+
+4. **Shared globals across page boundaries**: `steve.js` functions are the only shared code, and they're global. All template-specific code is inline. There's no module system or shared namespace convention.
+
+---
+
+## Recommendations Summary
+
+### Immediate Actions (Priority 1)
+
+| Action | Effort | Impact | Files Affected |
+|--------|--------|--------|----------------|
+| Wrap `steve.js` in an IIFE or convert to ES module with `'use strict'`; expose functions through a namespace object (e.g., `SteVe.showModal()`) | Low | Eliminates global function clobbering across all pages | `steve.js` |
+| Wrap all template inline `<script>` blocks in IIFEs with `'use strict'`, matching the `vote-on.ezt` pattern | Low | Consistent namespace isolation | `admin.ezt`, `manage.ezt`, `manage-stv.ezt` |
+
+### Short-term Actions (Priority 2)
+
+| Action | Effort | Impact | Files Affected |
+|--------|--------|--------|----------------|
+| Add null and type checking to all `document.getElementById()` calls via a shared utility function | Medium | Prevents silent failures from clobbered or missing elements | All JavaScript files |
+| Sanitize HTML in issue descriptions before rendering (use an allowlist-based HTML sanitizer like DOMPurify, or escape HTML and only allow specific safe constructs) | Medium | Eliminates the injection vector that enables DOM clobbering | `pages.py`, all template files |
+
+### Long-term Actions (Priority 3)
+
+| Action | Effort | Impact | Files Affected |
+|--------|--------|--------|----------------|
+| Migrate from inline `onclick` handlers to `addEventListener` bindings within the IIFE scope | Medium | Removes the need for `window.*` assignments, further reducing global exposure | All template files |
+| Consider adopting a Content Security Policy that restricts inline scripts (with nonce-based exceptions) to make HTML injection less effective | Medium | Defense-in-depth against DOM-based attacks | Server configuration, all templates |
+
+---
+
+## Appendix: Files Analyzed
+
+<details>
+<summary>Click to expand file list</summary>
+
+### Relevant Files (6)
+
+1. **`v3/server/static/js/steve.js`** (relevance: 10)
+ - Shared utility functions loaded on all pages
+ - Contains `showModal`, `validateRequiredField`, `submitFormWithLoading`
+
+2. **`v3/server/pages.py`** (relevance: 8)
+ - Server-side page rendering logic
+ - Contains `rewrite_description()` function that wraps but doesn't sanitize HTML
+
+3. **`v3/server/templates/admin.ezt`** (relevance: 7)
+ - Election administration interface
+ - Contains inline JavaScript for election management
+
+4. **`v3/server/templates/manage-stv.ezt`** (relevance: 7)
+ - STV election issue management interface
+ - Contains inline JavaScript for issue CRUD operations
+
+5. **`v3/server/templates/manage.ezt`** (relevance: 7)
+ - Standard election issue management interface
+ - Contains inline JavaScript for issue CRUD operations
+
+6. **`v3/server/templates/vote-on.ezt`** (relevance: 7)
+ - Voter ballot submission interface
+ - Contains properly isolated inline JavaScript (IIFE + strict mode)
+
+</details>
+
+---
+
+**End of Report**
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tooling.apache.org
For additional commands, e-mail: commits-help@tooling.apache.org