A suspicious CMS script requires identifying its record, rule and actual purpose. Kowal Security Scan combines selected database content scans with file-change monitoring and heuristic analysis. An alert starts operator verification rather than automatically proving infection.
Define the data and scope
Before changing anything, record the store view, language, theme and information source. Prepare one control example and its initial state. For other views, establish which settings should be inherited and which are deliberately overridden so the comparison uses the same context.
Prepare the configuration
In Stores → Configuration → Kowal → Security Scan configure activity, report recipient and retention. Database checks cover selected CMS, configuration, template, review and product-text tables. Default cron separates filecheck, malware and database jobs at 00:00, 01:00 and 02:00; verify actual execution.
Start with test data and an explicitly selected record scope. Change one setting at a time. Keep the configuration, input identifiers and output so another administrator can reproduce the operation without guessing its parameters or relying on a screenshot alone.
Run a concrete scenario
Run a controlled kowal_securityscan:dbcheck and inspect the record and rule_id. The first filecheck establishes a baseline; subsequent runs report ADDED, MODIFIED and REMOVED. Before allowing an exception, decide whether the fragment is a legitimate integration. Prefer a narrow rule exception for a specific file or table.
Compare actual records before and after the operation. Include one qualifying case and another intended to remain unchanged. On failure record the stage, identifier and message. Do not repeat a bulk operation merely because a visible completion confirmation is missing.
Check boundaries and accept the implementation
Change monitoring skips areas including var, generated, vendor, pub/static and node_modules. Local scans work without optional APIs. Enabled AI analysis sends suspicious fragments to OpenAI; Safe Browsing checks URLs. The module neither removes infections nor guarantees full detection and does not replace updates, backups or incident analysis.
For acceptance retain settings, record scope, expected and observed results and the test date. Compare data again after deployment. When the module uses a schedule or queue, inspect actual execution and logs rather than treating a submitted-job confirmation as proof of completion.
Related stages of the process
Sentry exceptions and scanner alerts describe different phenomena. The scanner checks selected data and files within its scope without automatically removing infections. Sentry is disabled by default, Replay needs separate activation, and its metrics facade does not establish a complete backend metrics system. Silence in either tool proves neither security nor overall store correctness. See Kowal Sentry Integration for Magento 2 and the guide Sentry in Magento 2.
Check features and configuration in the offering for Magento 2 Module – Security and Malicious Code Detection Scanner.
