| File: Microsoft.NetCore.Analyzers\Security\ReviewCodeForXssVulnerabilities.cs | Web Access |
| Project: src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Microsoft.CodeAnalysis.NetAnalyzers\Microsoft.CodeAnalysis.NetAnalyzers.csproj (Microsoft.CodeAnalysis.NetAnalyzers) |
// 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 ReviewCodeForXssVulnerabilities : SourceTriggeredTaintedDataAnalyzerBase { internal static readonly DiagnosticDescriptor Rule = SecurityHelpers.CreateDiagnosticDescriptor( "CA3002", nameof(ReviewCodeForXssVulnerabilitiesTitle), nameof(ReviewCodeForXssVulnerabilitiesMessage), RuleLevel.Disabled, isPortedFxCopRule: false, isDataflowRule: true, isReportedAtCompilationEnd: false); protected override SinkKind SinkKind => SinkKind.Xss; protected override DiagnosticDescriptor TaintedDataEnteringSinkDescriptor => Rule; } }