sqlinsight-pro/tests
Søren Eggert Lundsteen Olsen 8d092b6a35 Review 1.5: the read-only check of typed queries can no longer be bypassed
The synthetic SQL check (and custom rules) used a regex that ended an [identifier]
at the first ] and a block comment at the first */, so "[x]]'] DELETE ..." hid a
DELETE inside what it took for a string. T-SQL also needs no semicolon between
statements, so "SELECT 1 COMMIT" or "SELECT 1 WRITETEXT ..." passed.

- ReadOnlyQuery lexes T-SQL as SQL Server does (nested comments, '' ]] ""),
  refuses unterminated comments/strings/identifiers, every statement keyword
  (COMMIT, ROLLBACK, SET, DECLARE, WRITETEXT, UPDATETEXT, RAISERROR, CHECKPOINT,
  ENABLE/DISABLE, RECEIVE/SEND ...), NEXT VALUE FOR (sequences are not rolled
  back) and update/exclusive lock hints, and a second SELECT unless joined by
  UNION/EXCEPT/INTERSECT.
- CustomRuleDefinition.QueryProblems uses it, so the synthetic check validates the
  same way when saved and before it runs.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-02 15:08:34 +02:00
..
SQLInsight.Agent.Tests Repository and agent: Dynamics AX history (migration 0017), seeding, hub opt-in 2026-10-02 13:53:34 +02:00
SQLInsight.Collectors.Tests Review 1.4: AX reads put the agent's session settings back 2026-10-02 14:14:24 +02:00
SQLInsight.Community.Tests Docs: Windows-servere og syntetiske tjek (1.5) 2026-10-02 14:59:22 +02:00
SQLInsight.Connectivity.Tests Fase 2: Azure SQL Managed Instance, docs and rule catalog test 2026-09-29 08:23:40 +00:00
SQLInsight.Core.Tests Review 1.5: the read-only check of typed queries can no longer be bypassed 2026-10-02 15:08:34 +02:00
SQLInsight.IntegrationTests Web: Windows-servere and Syntetiske tjek pages, and the same in API v1 (scope config:write) 2026-10-02 14:58:52 +02:00
SQLInsight.Licensing.Tests Ship SEOSoft's license key k20261001; agent defaults to the real hub 2026-10-01 07:15:47 +02:00
SQLInsight.Notifications.Tests Fase 4: integration with Prometheus, Grafana, SCOM and scripts 2026-09-29 09:56:01 +00:00
SQLInsight.Rules.Tests SQL Scripts for the Windows server and synthetic check rules (SQLI-WIN-001..013, SQLI-SYN-001..003) 2026-10-02 14:58:36 +02:00
SQLInsight.Servers.Tests Servers tests: give the local CIM test room when the whole suite runs at once 2026-10-02 14:59:22 +02:00
SQLInsight.Updates.Tests Community-websted og Discourse-forum 2026-09-29 13:45:06 +00:00