139 references to PropertySetAbstractValueKind
Microsoft.CodeAnalysis.NetAnalyzers (139)
Microsoft.NetCore.Analyzers\Security\DoNotDisableHttpClientCRLCheck.cs (7)
69
return PropertySetAbstractValue.GetInstance(
PropertySetAbstractValueKind
.Flagged,
PropertySetAbstractValueKind
.Flagged);
98
PropertySetAbstractValueKind
.Flagged => abstractValue[CheckCertificateRevocationListIndex] switch
100
PropertySetAbstractValueKind
.Flagged => HazardousUsageEvaluationResult.Flagged,
101
PropertySetAbstractValueKind
.MaybeFlagged => HazardousUsageEvaluationResult.MaybeFlagged,
105
PropertySetAbstractValueKind
.MaybeFlagged => abstractValue[CheckCertificateRevocationListIndex] switch
107
PropertySetAbstractValueKind
.Unflagged => HazardousUsageEvaluationResult.Unflagged,
Microsoft.NetCore.Analyzers\Security\DoNotInstallRootCert.cs (5)
59
(PointsToAbstractValue v) =>
PropertySetAbstractValueKind
.Unknown));
65
PropertySetAbstractValueKind
.Flagged => HazardousUsageEvaluationResult.Flagged,
67
PropertySetAbstractValueKind
.MaybeFlagged => HazardousUsageEvaluationResult.MaybeFlagged,
103
var
kind =
PropertySetAbstractValueKind
.Unflagged;
Microsoft.NetCore.Analyzers\Security\DoNotUseCreateEncryptorWithNonDefaultIV.cs (2)
57
return PropertySetAbstractValue.GetInstance(
PropertySetAbstractValueKind
.Unflagged);
65
return
PropertySetAbstractValueKind
.Flagged;
Microsoft.NetCore.Analyzers\Security\DoNotUseInsecureDeserializerJavascriptSerializerWithSimpleTypeResolver.cs (12)
61
(PointsToAbstractValue v) =>
PropertySetAbstractValueKind
.Unknown));
67
PropertySetAbstractValueKind
.Flagged => HazardousUsageEvaluationResult.Flagged,
68
PropertySetAbstractValueKind
.Unflagged => HazardousUsageEvaluationResult.Unflagged,
99
PropertySetAbstractValueKind
kind;
102
kind =
PropertySetAbstractValueKind
.Unflagged;
113
kind =
PropertySetAbstractValueKind
.Unflagged;
119
kind =
PropertySetAbstractValueKind
.Flagged;
127
kind =
PropertySetAbstractValueKind
.MaybeFlagged;
131
kind =
PropertySetAbstractValueKind
.Unflagged;
138
kind =
PropertySetAbstractValueKind
.MaybeFlagged;
143
kind =
PropertySetAbstractValueKind
.Unflagged;
150
kind =
PropertySetAbstractValueKind
.Unflagged;
Microsoft.NetCore.Analyzers\Security\DoNotUseInsecureDeserializerJsonNetWithoutBinder.cs (4)
76
PropertySetAbstractValueKind
.Unflagged, // TypeNameHandling defaults to None.
77
PropertySetAbstractValueKind
.Flagged); // Binder / SerializationBinder defaults to null.
83
PropertySetAbstractValueKind
.Unflagged,
84
PropertySetAbstractValueKind
.Unflagged);
Microsoft.NetCore.Analyzers\Security\DoNotUseInsecureDeserializerWithoutBinderBase.cs (1)
66
private static readonly ConstructorMapper ConstructorMapper = new(ImmutableArray.Create(
PropertySetAbstractValueKind
.Flagged));
Microsoft.NetCore.Analyzers\Security\DoNotUseInsecureSettingsForJsonNet.cs (4)
75
PropertySetAbstractValueKind
.Unflagged, // TypeNameHandling defaults to None.
76
PropertySetAbstractValueKind
.Flagged); // Binder / SerializationBinder defaults to null.
82
PropertySetAbstractValueKind
.Unflagged,
83
PropertySetAbstractValueKind
.Unflagged);
Microsoft.NetCore.Analyzers\Security\DoNotUseWeakKDFInsufficientIterationCount.cs (5)
63
PropertySetAbstractValueKind
.Flagged => HazardousUsageEvaluationResult.Flagged,
65
PropertySetAbstractValueKind
.MaybeFlagged => HazardousUsageEvaluationResult.MaybeFlagged,
101
var
kind = DefaultIterationCount >= sufficientIterationCount ?
PropertySetAbstractValueKind
.Unflagged :
PropertySetAbstractValueKind
.Flagged;
Microsoft.NetCore.Analyzers\Security\SetHttpOnlyForHttpCookie.cs (2)
46
return PropertySetAbstractValue.GetInstance(
PropertySetAbstractValueKind
.Flagged);
55
PropertySetAbstractValueKind
.Unflagged));
Microsoft.NetCore.Analyzers\Security\UseSecureCookiesASPNetCore.cs (4)
55
ImmutableArray.Create<
PropertySetAbstractValueKind
>(
56
PropertySetAbstractValueKind
.Flagged));
70
PropertySetAbstractValueKind
.Flagged => HazardousUsageEvaluationResult.Flagged,
72
PropertySetAbstractValueKind
.MaybeFlagged => HazardousUsageEvaluationResult.MaybeFlagged,
src\11b41c7305441175\PropertySetAbstractValue.cs (21)
16
/// cref="
PropertySetAbstractValueKind
"/>.
22
/// cref="
PropertySetAbstractValueKind
.Unknown"/>.
33
public static PropertySetAbstractValue GetInstance(
PropertySetAbstractValueKind
v1)
38
public static PropertySetAbstractValue GetInstance(
PropertySetAbstractValueKind
v1,
PropertySetAbstractValueKind
v2)
43
public static PropertySetAbstractValue GetInstance(ArrayBuilder<
PropertySetAbstractValueKind
> propertyAbstractValues)
55
public static PropertySetAbstractValue GetInstance(ImmutableArray<
PropertySetAbstractValueKind
> propertyAbstractValues)
67
private static bool TryGetPooledInstance(IReadOnlyList<
PropertySetAbstractValueKind
> values, [NotNullWhen(returnValue: true)] out PropertySetAbstractValue? instance)
88
if (values[i] !=
PropertySetAbstractValueKind
.Unknown)
100
private PropertySetAbstractValue(ImmutableArray<
PropertySetAbstractValueKind
> propertyAbstractValues)
107
this.KnownPropertyAbstractValues = ImmutableArray<
PropertySetAbstractValueKind
>.Empty;
116
private 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>
131
public
PropertySetAbstractValueKind
this[int index]
142
return
PropertySetAbstractValueKind
.Unknown;
151
internal PropertySetAbstractValue ReplaceAt(int index,
PropertySetAbstractValueKind
kind)
165
using ArrayBuilder<
PropertySetAbstractValueKind
> kinds = ArrayBuilder<
PropertySetAbstractValueKind
>.GetInstance(newLength);
170
kinds.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.
28
int[] values = Enum.GetValues(typeof(
PropertySetAbstractValueKind
)).Cast<int>().ToArray();
32
Debug.Assert(values[i] == i, $"{nameof(
PropertySetAbstractValueKind
)} isn't a contiguous enum starting at 0");
38
if (i == (int)
PropertySetAbstractValueKind
.Unknown)
45
ImmutableArray.Create<
PropertySetAbstractValueKind
>((
PropertySetAbstractValueKind
)i));
54
if (j == (int)
PropertySetAbstractValueKind
.Unknown)
64
ImmutableArray.Create<
PropertySetAbstractValueKind
>(
65
(
PropertySetAbstractValueKind
)i,
66
(
PropertySetAbstractValueKind
)j));
72
public PropertySetAbstractValue GetInstance(
PropertySetAbstractValueKind
v1)
77
public PropertySetAbstractValue GetInstance(
PropertySetAbstractValueKind
v1,
PropertySetAbstractValueKind
v2)
src\11b41c7305441175\PropertySetAnalysis.PropertySetAbstractValueDomain.cs (6)
61
using ArrayBuilder<
PropertySetAbstractValueKind
> builder = ArrayBuilder<
PropertySetAbstractValueKind
>.GetInstance(maxKnownCount);
71
private static
PropertySetAbstractValueKind
MergeKind(
PropertySetAbstractValueKind
kind1,
PropertySetAbstractValueKind
kind2)
79
return
PropertySetAbstractValueKind
.MaybeFlagged;
src\11b41c7305441175\PropertySetAnalysis.PropertySetDataFlowOperationVisitor.cs (1)
288
PropertySetAbstractValueKind
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>
46
public 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.
58
this.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.
68
this.PropertyAbstractValues = ImmutableArray<
PropertySetAbstractValueKind
>.Empty;
82
internal 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
"/>
22
public delegate
PropertySetAbstractValueKind
ValueContentAbstractValueCallback(ValueContentAbstractValue valueContentAbstractValue);
25
/// Mapping from <see cref="PointsToAbstractValue"/> to a <see cref="
PropertySetAbstractValueKind
"/>
29
public 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)
23
public static
PropertySetAbstractValueKind
FlagIfNull(PointsToAbstractValue pointsToAbstractValue)
27
NullAbstractValue.Null =>
PropertySetAbstractValueKind
.Flagged,
29
NullAbstractValue.NotNull =>
PropertySetAbstractValueKind
.Unflagged,
31
NullAbstractValue.MaybeNull =>
PropertySetAbstractValueKind
.MaybeFlagged,
33
_ =>
PropertySetAbstractValueKind
.Unknown,
49
public static
PropertySetAbstractValueKind
EvaluateLiteralValues(
58
return
PropertySetAbstractValueKind
.Unflagged;
83
return
PropertySetAbstractValueKind
.Flagged;
88
return
PropertySetAbstractValueKind
.MaybeFlagged;
93
return
PropertySetAbstractValueKind
.Unflagged;
100
return
PropertySetAbstractValueKind
.MaybeFlagged;
105
return
PropertySetAbstractValueKind
.Unknown;
109
return
PropertySetAbstractValueKind
.Unknown;
194
if (propertySetAbstractValue[i] !=
PropertySetAbstractValueKind
.Flagged)
199
if (propertySetAbstractValue[i] ==
PropertySetAbstractValueKind
.Unflagged)