139 references to PropertySetAbstractValueKind
Microsoft.CodeAnalysis.NetAnalyzers (139)
Microsoft.NetCore.Analyzers\Security\DoNotDisableHttpClientCRLCheck.cs (7)
69return PropertySetAbstractValue.GetInstance(PropertySetAbstractValueKind.Flagged, PropertySetAbstractValueKind.Flagged); 98PropertySetAbstractValueKind.Flagged => abstractValue[CheckCertificateRevocationListIndex] switch 100PropertySetAbstractValueKind.Flagged => HazardousUsageEvaluationResult.Flagged, 101PropertySetAbstractValueKind.MaybeFlagged => HazardousUsageEvaluationResult.MaybeFlagged, 105PropertySetAbstractValueKind.MaybeFlagged => abstractValue[CheckCertificateRevocationListIndex] switch 107PropertySetAbstractValueKind.Unflagged => HazardousUsageEvaluationResult.Unflagged,
Microsoft.NetCore.Analyzers\Security\DoNotInstallRootCert.cs (5)
59(PointsToAbstractValue v) => PropertySetAbstractValueKind.Unknown)); 65PropertySetAbstractValueKind.Flagged => HazardousUsageEvaluationResult.Flagged, 67PropertySetAbstractValueKind.MaybeFlagged => HazardousUsageEvaluationResult.MaybeFlagged, 103var kind = PropertySetAbstractValueKind.Unflagged;
Microsoft.NetCore.Analyzers\Security\DoNotUseCreateEncryptorWithNonDefaultIV.cs (2)
57return PropertySetAbstractValue.GetInstance(PropertySetAbstractValueKind.Unflagged); 65return PropertySetAbstractValueKind.Flagged;
Microsoft.NetCore.Analyzers\Security\DoNotUseInsecureDeserializerJavascriptSerializerWithSimpleTypeResolver.cs (12)
61(PointsToAbstractValue v) => PropertySetAbstractValueKind.Unknown)); 67PropertySetAbstractValueKind.Flagged => HazardousUsageEvaluationResult.Flagged, 68PropertySetAbstractValueKind.Unflagged => HazardousUsageEvaluationResult.Unflagged, 99PropertySetAbstractValueKind kind; 102kind = PropertySetAbstractValueKind.Unflagged; 113kind = PropertySetAbstractValueKind.Unflagged; 119kind = PropertySetAbstractValueKind.Flagged; 127kind = PropertySetAbstractValueKind.MaybeFlagged; 131kind = PropertySetAbstractValueKind.Unflagged; 138kind = PropertySetAbstractValueKind.MaybeFlagged; 143kind = PropertySetAbstractValueKind.Unflagged; 150kind = PropertySetAbstractValueKind.Unflagged;
Microsoft.NetCore.Analyzers\Security\DoNotUseInsecureDeserializerJsonNetWithoutBinder.cs (4)
76PropertySetAbstractValueKind.Unflagged, // TypeNameHandling defaults to None. 77PropertySetAbstractValueKind.Flagged); // Binder / SerializationBinder defaults to null. 83PropertySetAbstractValueKind.Unflagged, 84PropertySetAbstractValueKind.Unflagged);
Microsoft.NetCore.Analyzers\Security\DoNotUseInsecureDeserializerWithoutBinderBase.cs (1)
66private static readonly ConstructorMapper ConstructorMapper = new(ImmutableArray.Create(PropertySetAbstractValueKind.Flagged));
Microsoft.NetCore.Analyzers\Security\DoNotUseInsecureSettingsForJsonNet.cs (4)
75PropertySetAbstractValueKind.Unflagged, // TypeNameHandling defaults to None. 76PropertySetAbstractValueKind.Flagged); // Binder / SerializationBinder defaults to null. 82PropertySetAbstractValueKind.Unflagged, 83PropertySetAbstractValueKind.Unflagged);
Microsoft.NetCore.Analyzers\Security\DoNotUseWeakKDFInsufficientIterationCount.cs (5)
63PropertySetAbstractValueKind.Flagged => HazardousUsageEvaluationResult.Flagged, 65PropertySetAbstractValueKind.MaybeFlagged => HazardousUsageEvaluationResult.MaybeFlagged, 101var kind = DefaultIterationCount >= sufficientIterationCount ? PropertySetAbstractValueKind.Unflagged : PropertySetAbstractValueKind.Flagged;
Microsoft.NetCore.Analyzers\Security\SetHttpOnlyForHttpCookie.cs (2)
46return PropertySetAbstractValue.GetInstance(PropertySetAbstractValueKind.Flagged); 55PropertySetAbstractValueKind.Unflagged));
Microsoft.NetCore.Analyzers\Security\UseSecureCookiesASPNetCore.cs (4)
55ImmutableArray.Create<PropertySetAbstractValueKind>( 56PropertySetAbstractValueKind.Flagged)); 70PropertySetAbstractValueKind.Flagged => HazardousUsageEvaluationResult.Flagged, 72PropertySetAbstractValueKind.MaybeFlagged => HazardousUsageEvaluationResult.MaybeFlagged,
src\11b41c7305441175\PropertySetAbstractValue.cs (21)
16/// cref="PropertySetAbstractValueKind"/>. 22/// cref="PropertySetAbstractValueKind.Unknown"/>. 33public static PropertySetAbstractValue GetInstance(PropertySetAbstractValueKind v1) 38public static PropertySetAbstractValue GetInstance(PropertySetAbstractValueKind v1, PropertySetAbstractValueKind v2) 43public static PropertySetAbstractValue GetInstance(ArrayBuilder<PropertySetAbstractValueKind> propertyAbstractValues) 55public static PropertySetAbstractValue GetInstance(ImmutableArray<PropertySetAbstractValueKind> propertyAbstractValues) 67private static bool TryGetPooledInstance(IReadOnlyList<PropertySetAbstractValueKind> values, [NotNullWhen(returnValue: true)] out PropertySetAbstractValue? instance) 88if (values[i] != PropertySetAbstractValueKind.Unknown) 100private PropertySetAbstractValue(ImmutableArray<PropertySetAbstractValueKind> propertyAbstractValues) 107this.KnownPropertyAbstractValues = ImmutableArray<PropertySetAbstractValueKind>.Empty; 116private ImmutableArray<PropertySetAbstractValueKind> KnownPropertyAbstractValues { get; } 124/// Gets an individual property's <see cref="PropertySetAbstractValueKind"/>. 128/// <returns>The property's <see cref="PropertySetAbstractValueKind"/>.</returns> 130/// abstract value is implicitly <see cref="PropertySetAbstractValueKind.Unknown"/>.</remarks> 131public PropertySetAbstractValueKind this[int index] 142return PropertySetAbstractValueKind.Unknown; 151internal PropertySetAbstractValue ReplaceAt(int index, PropertySetAbstractValueKind kind) 165using ArrayBuilder<PropertySetAbstractValueKind> kinds = ArrayBuilder<PropertySetAbstractValueKind>.GetInstance(newLength); 170kinds.Add(PropertySetAbstractValueKind.Unknown);
src\11b41c7305441175\PropertySetAbstractValue.ValuePool.cs (14)
17/// Index is the <see cref="PropertySetAbstractValueKind" />. 22/// Indices are the two <see cref="PropertySetAbstractValueKind"/>s. 28int[] values = Enum.GetValues(typeof(PropertySetAbstractValueKind)).Cast<int>().ToArray(); 32Debug.Assert(values[i] == i, $"{nameof(PropertySetAbstractValueKind)} isn't a contiguous enum starting at 0"); 38if (i == (int)PropertySetAbstractValueKind.Unknown) 45ImmutableArray.Create<PropertySetAbstractValueKind>((PropertySetAbstractValueKind)i)); 54if (j == (int)PropertySetAbstractValueKind.Unknown) 64ImmutableArray.Create<PropertySetAbstractValueKind>( 65(PropertySetAbstractValueKind)i, 66(PropertySetAbstractValueKind)j)); 72public PropertySetAbstractValue GetInstance(PropertySetAbstractValueKind v1) 77public PropertySetAbstractValue GetInstance(PropertySetAbstractValueKind v1, PropertySetAbstractValueKind v2)
src\11b41c7305441175\PropertySetAnalysis.PropertySetAbstractValueDomain.cs (6)
61using ArrayBuilder<PropertySetAbstractValueKind> builder = ArrayBuilder<PropertySetAbstractValueKind>.GetInstance(maxKnownCount); 71private static PropertySetAbstractValueKind MergeKind(PropertySetAbstractValueKind kind1, PropertySetAbstractValueKind kind2) 79return PropertySetAbstractValueKind.MaybeFlagged;
src\11b41c7305441175\PropertySetAnalysis.PropertySetDataFlowOperationVisitor.cs (1)
288PropertySetAbstractValueKind propertySetAbstractValueKind;
src\11b41c7305441175\PropertySetAnalysisContext.cs (3)
143/// How constructor invocations map to <see cref="PropertySetAbstractValueKind"/>s. 148/// How property assignments map to <see cref="PropertySetAbstractValueKind"/>. 153/// When and how to evaluate <see cref="PropertySetAbstractValueKind"/>s to for hazardous usages.
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\ConstructorMapper.cs (11)
14/// Maps a constructor invocation to <see cref="PropertySetAbstractValueKind"/>s for the properties being tracked by PropertySetAnalysis. 26/// <returns>Abstract value for PropertySetAnalysis, with <see cref="PropertySetAbstractValueKind"/>s in the same order as the <see cref="PropertyMapper"/>s in the <see cref="PropertyMapperCollection"/>.</returns> 37/// <returns>Abstract value for PropertySetAnalysis, with <see cref="PropertySetAbstractValueKind"/>s in the same order as the <see cref="PropertyMapper"/>s in the <see cref="PropertyMapperCollection"/>.</returns> 43/// Initializes a <see cref="ConstructorMapper"/> using constant <see cref="PropertySetAbstractValueKind"/>s whenever the type being tracked by PropertySetAnalysis is instantiated. 45/// <param name="propertyAbstractValues">Constant <see cref="PropertySetAbstractValueKind"/>s, in the same order that the corresponding <see cref="PropertyMapperCollection"/> was initialized with.</param> 46public ConstructorMapper(ImmutableArray<PropertySetAbstractValueKind> propertyAbstractValues) 52/// Initializes a <see cref="ConstructorMapper"/> that maps a constructor invocation's arguments' <see cref="ValueContentAbstractValue"/>s to <see cref="PropertySetAbstractValueKind"/>s for the properties being tracked by PropertySetAnalysis. 58this.PropertyAbstractValues = ImmutableArray<PropertySetAbstractValueKind>.Empty; 62/// Initializes a <see cref="ConstructorMapper"/> that maps a constructor invocation's arguments' <see cref="NullAbstractValue"/>s to <see cref="PropertySetAbstractValueKind"/>s for the properties being tracked by PropertySetAnalysis. 68this.PropertyAbstractValues = ImmutableArray<PropertySetAbstractValueKind>.Empty; 82internal ImmutableArray<PropertySetAbstractValueKind> PropertyAbstractValues { get; }
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\PropertyMapper.cs (13)
11/// Information for mapping an object's property's assigned value to a <see cref="PropertySetAbstractValueKind"/>. 18/// Mapping from <see cref="ValueContentAbstractValue"/> to a <see cref="PropertySetAbstractValueKind"/> 22public delegate PropertySetAbstractValueKind ValueContentAbstractValueCallback(ValueContentAbstractValue valueContentAbstractValue); 25/// Mapping from <see cref="PointsToAbstractValue"/> to a <see cref="PropertySetAbstractValueKind"/> 29public delegate PropertySetAbstractValueKind PointsToAbstractValueCallback(PointsToAbstractValue pointsToAbstractValue); 32/// Initializes a <see cref="PropertyMapper"/> that maps a property's assigned value's <see cref="ValueContentAbstractValue"/> to a <see cref="PropertySetAbstractValueKind"/>. 43/// Initializes a <see cref="PropertyMapper"/> that maps a property's assigned value's <see cref="ValueContentAbstractValue"/> to a <see cref="PropertySetAbstractValueKind"/>. 47/// <param name="propertyIndex">Internal index into the <see cref="PropertySetAbstractValueKind"/> array.</param> 61/// Initializes a <see cref="PropertyMapper"/> that maps a property's assigned value's <see cref="NullAbstractValue"/> to a <see cref="PropertySetAbstractValueKind"/>. 72/// Initializes a <see cref="PropertyMapper"/> that maps a property's assigned value's <see cref="NullAbstractValue"/> to a <see cref="PropertySetAbstractValueKind"/>. 76/// <param name="propertyIndex">Internal index into the <see cref="PropertySetAbstractValueKind"/> array.</param> 105/// Callback for mapping from <see cref="ValueContentAbstractValue"/> to a <see cref="PropertySetAbstractValueKind"/>, or null. 110/// Callback for mapping from <see cref="PointsToAbstractValue"/> to a <see cref="PropertySetAbstractValueKind"/>, or null.
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\PropertySetAnalysis.cs (9)
42/// <param name="constructorMapper">How constructor invocations map to <see cref="PropertySetAbstractValueKind"/>s.</param> 43/// <param name="propertyMappers">How property assignments map to <see cref="PropertySetAbstractValueKind"/>.</param> 44/// <param name="hazardousUsageEvaluators">When and how to evaluate <see cref="PropertySetAbstractValueKind"/>s to for hazardous usages.</param> 144/// <param name="constructorMapper">How constructor invocations map to <see cref="PropertySetAbstractValueKind"/>s.</param> 145/// <param name="propertyMappers">How property assignments map to <see cref="PropertySetAbstractValueKind"/>.</param> 146/// <param name="hazardousUsageEvaluators">When and how to evaluate <see cref="PropertySetAbstractValueKind"/>s to for hazardous usages.</param> 180/// <param name="constructorMapper">How constructor invocations map to <see cref="PropertySetAbstractValueKind"/>s.</param> 181/// <param name="propertyMappers">How property assignments map to <see cref="PropertySetAbstractValueKind"/>.</param> 182/// <param name="hazardousUsageEvaluators">When and how to evaluate <see cref="PropertySetAbstractValueKind"/>s to for hazardous usages.</param>
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\PropertySetCallbacks.cs (15)
23public static PropertySetAbstractValueKind FlagIfNull(PointsToAbstractValue pointsToAbstractValue) 27NullAbstractValue.Null => PropertySetAbstractValueKind.Flagged, 29NullAbstractValue.NotNull => PropertySetAbstractValueKind.Unflagged, 31NullAbstractValue.MaybeNull => PropertySetAbstractValueKind.MaybeFlagged, 33_ => PropertySetAbstractValueKind.Unknown, 49public static PropertySetAbstractValueKind EvaluateLiteralValues( 58return PropertySetAbstractValueKind.Unflagged; 83return PropertySetAbstractValueKind.Flagged; 88return PropertySetAbstractValueKind.MaybeFlagged; 93return PropertySetAbstractValueKind.Unflagged; 100return PropertySetAbstractValueKind.MaybeFlagged; 105return PropertySetAbstractValueKind.Unknown; 109return PropertySetAbstractValueKind.Unknown; 194if (propertySetAbstractValue[i] != PropertySetAbstractValueKind.Flagged) 199if (propertySetAbstractValue[i] == PropertySetAbstractValueKind.Unflagged)