Skip to content

Commit be1129e

Browse files
committed
C#: Only consider effectively public methods.
1 parent fec4d19 commit be1129e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

csharp/ql/src/Telemetry/ExternalApi.qll

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ class TestLibrary extends RefType {
2828
* An external API from either the C# Standard Library or a 3rd party library.
2929
*/
3030
class ExternalApi extends DotNet::Callable {
31-
ExternalApi() { this.isUnboundDeclaration() and this.fromLibrary() }
31+
ExternalApi() {
32+
this.isUnboundDeclaration() and
33+
this.fromLibrary() and
34+
this.(Modifiable).isEffectivelyPublic()
35+
}
3236

3337
/**
3438
* Gets the unbound type, name and parameter types of this API.

0 commit comments

Comments
 (0)