Skip to content

Commit 5af9def

Browse files
chore(codeql): resolve open alerts
1 parent bfe4390 commit 5af9def

5 files changed

Lines changed: 13 additions & 19 deletions

File tree

.github/codeql/codeql-config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
name: "JsonApiToolkit CodeQL"
2+
3+
paths-ignore:
4+
- "**/bin/**"
5+
- "**/obj/**"

.github/workflows/codeql.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ jobs:
3232
with:
3333
languages: csharp
3434
queries: security-and-quality
35+
config-file: ./.github/codeql/codeql-config.yml
3536

3637
- name: Restore
3738
run: dotnet restore --locked-mode

JsonApiToolkit/Extensions/Projection/ProjectionPropertySelector.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ List<string> requestedFieldsCamelCase
3434
requestedFieldsCamelCase,
3535
StringComparer.OrdinalIgnoreCase
3636
);
37-
foreach (PropertyInfo prop in EntityMapper.GetAttributeProperties(sourceType))
38-
{
39-
if (fieldSet.Contains(EntityMapper.GetAttributeName(prop)))
40-
result.Add(prop);
41-
}
37+
result.AddRange(
38+
EntityMapper
39+
.GetAttributeProperties(sourceType)
40+
.Where(prop => fieldSet.Contains(EntityMapper.GetAttributeName(prop)))
41+
);
4242

4343
return result;
4444
}

JsonApiToolkit/Helpers/ReflectionMethodCache.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ internal static class ReflectionMethodCache
1515
private static MethodInfo? s_enumerableContains;
1616
private static MethodInfo? s_enumerableWhere;
1717
private static MethodInfo? s_efCoreIncludeExpression;
18-
private static MethodInfo? s_thenIncludeCollection;
19-
private static MethodInfo? s_thenIncludeReference;
18+
private static volatile MethodInfo? s_thenIncludeCollection;
19+
private static volatile MethodInfo? s_thenIncludeReference;
2020
private static MethodInfo? s_queryableSelect;
2121
private static readonly ConcurrentDictionary<
2222
(Type Source, Type Projection),

JsonApiToolkit/packages.lock.json

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -413,18 +413,6 @@
413413
"resolved": "4.7.0",
414414
"contentHash": "ehYW0m9ptxpGWvE4zgqongBVWpSDU/JCFD4K7krxkQwSz/sFQjEXCUqpvencjy6DYDbn7Ig09R8GFffu8TtneQ=="
415415
}
416-
},
417-
"net10.0/linux-musl-x64": {
418-
"System.Security.Cryptography.Pkcs": {
419-
"type": "Transitive",
420-
"resolved": "10.0.0",
421-
"contentHash": "UPWqLSygJlFerRi9XNIuM0a1VC8gHUIufyP24xQ0sc+XimqUAEcjpOz9DhKpyDjH+5B/wO3RpC0KpkEeDj/ddg=="
422-
},
423-
"System.Security.Cryptography.ProtectedData": {
424-
"type": "Transitive",
425-
"resolved": "4.7.0",
426-
"contentHash": "ehYW0m9ptxpGWvE4zgqongBVWpSDU/JCFD4K7krxkQwSz/sFQjEXCUqpvencjy6DYDbn7Ig09R8GFffu8TtneQ=="
427-
}
428416
}
429417
}
430418
}

0 commit comments

Comments
 (0)