SQLI-SVC-001 (High) reports a service set to start automatically that is not running (SQL Server Agent, Full-text launcher, Launchpad …), from the sys.dm_server_services data the configuration collector already reads (2008 R2 SP1+; not relevant before). The service account is sensitive. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
23 lines
676 B
C#
23 lines
676 B
C#
using SQLInsight.Rules.Engine;
|
|
|
|
namespace SQLInsight.Rules.Tests;
|
|
|
|
public class RuleCatalogTests
|
|
{
|
|
[Fact]
|
|
public void Every_rule_has_a_unique_well_formed_id()
|
|
{
|
|
var rules = BuiltInRules.Create();
|
|
|
|
Assert.Equal(rules.Count, rules.Select(r => r.Id).Distinct(StringComparer.OrdinalIgnoreCase).Count());
|
|
Assert.All(rules, r => Assert.Matches("^SQLI-[A-Z]+-[0-9]{3}$", r.Id));
|
|
Assert.All(rules, r => Assert.False(string.IsNullOrWhiteSpace(r.Title)));
|
|
}
|
|
|
|
/// <summary>Keeps the rule count in the README honest.</summary>
|
|
[Fact]
|
|
public void Rule_count()
|
|
{
|
|
Assert.Equal(79, BuiltInRules.Create().Count);
|
|
}
|
|
}
|