Form and Consent Auditing in Websites: A Case Study with webform-privacy-consent-scanner
On institutional websites, forms are often added “right away” with good intentions — yet when they fall outside the supervision of the Information Security Office (ISO), they can expose the organization to risk.
Based on this real need, I developed an open-source auditing tool: webform-privacy-consent-scanner.
The tool scans websites to detect the presence of Google / HubSpot / Microsoft Forms and CMPs (Cookiebot, OneTrust, Efilli), identifies consent flows, and generates CSV/JSON reports.
It also includes a Playwright mode for dynamic elements and a configurable –wait option for delayed loading.
Challenges Encountered
Forms or CMPs injected via GTM: may not appear during static checks.
Access restrictions: some sites block fetch; relying on a single method is risky.
Developed Solution
Hybrid Scanning Approach
Static scan: fast HTML analysis
curl fallback: automatic recovery when fetch is blocked
Dynamic scan: optional Playwright mode to capture JS-injected content; configurable delay with --wait (default: 6000 ms)
Wide Detection Coverage
Forms: Google, HubSpot, Microsoft
CMPs: Cookiebot, OneTrust, Efilli (+ GTM-based signal detection)
Outputs
Generates CSV / JSON / filterable text reports, which can be further processed with filter.mjs for attribute-based filtering.
Case: Rapid Inventory & Potential Form Detection
In the first internal evaluation scan, indicators suggested that some pages might contain HubSpot and Google Forms components.
These findings were shared with the Information Security Office (ISO) to help update the current inventory.
The shared outputs provide initial visibility into the locations of potential forms. Final verification and inventory updates will proceed under ISO coordination.
Validation of CMP flows (banner, preference center, record/evidence) and any necessary improvements will be handled within ISO-directed processes.
This study focuses on detection and reporting; the next steps will be defined and executed by the organization’s relevant teams.
What Is a CMP and Why Does It Matter?
A CMP (Consent Management Platform) ensures that users give explicit, revocable consent for data processing purposes, and that such consent is properly documented.
It’s not just a “banner” — it includes:
a preference center,
evidence logs,
GTM/tag manager integrations,
and the technical enforcement of the principle “no processing without consent.”
CMPs also safeguard consent continuity during form display and submission.