// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using Analyzer.Utilities.FlowAnalysis.Analysis.TaintedDataAnalysis; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.Diagnostics; using Microsoft.NetCore.Analyzers.Security.Helpers; namespace Microsoft.NetCore.Analyzers.Security { using static MicrosoftNetCoreAnalyzersResources; [DiagnosticAnalyzer(LanguageNames.CSharp, LanguageNames.VisualBasic)] public class ReviewCodeForInformationDisclosureVulnerabilities : SourceTriggeredTaintedDataAnalyzerBase { internal static readonly DiagnosticDescriptor Rule = SecurityHelpers.CreateDiagnosticDescriptor( "CA3004", nameof(ReviewCodeForInformationDisclosureVulnerabilitiesTitle), nameof(ReviewCodeForInformationDisclosureVulnerabilitiesMessage), RuleLevel.Disabled, isPortedFxCopRule: false, isDataflowRule: true, isReportedAtCompilationEnd: false); protected override SinkKind SinkKind => SinkKind.InformationDisclosure; protected override DiagnosticDescriptor TaintedDataEnteringSinkDescriptor => Rule; } }