github / github/codeql

For an abstract class in the CodeQL source code, how can I quickly find all the classes that extend this abstract class from the CodeQL library?

Open
#20,125 1 comment 0 reactions 0 assignees View on GitHub
question
Dominant language
CodeQL
Stars
10.1k
Forks
2.1k
Avg merge
2d 15h
Merged PRs (30d)
141

Description

Dear CodeQL Team,

I hope this message finds you well. I have a question regarding efficiently identifying subclasses of an abstract class in the CodeQL source code. Specifically:

For an abstract class in the CodeQL source code, is there a way to quickly find all the classes that extend this abstract class within the CodeQL library?

For example, consider the following class:

```ql
module PathInjection {
abstract class Sanitizer extends DataFlow::Node { }
}
```
Its subclasses are distributed across multiple files. Using search tools, I would have to search for patterns like `extends .*Sanitizer` and `extends .*PathInjection::Sanitizer`, etc., which is very cumbersome.

Thank you in advance for your time and assistance!

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the CodeQL library source and documentation around the abstract Sanitizer class in the PathInjection module. Determine whether the library or its tooling provides a way to enumerate subclasses across files, and document the quickest supported approach; no specific file or test is named in the issue.

Written by the indexing model from the issue text.

Assessment

Domain
security
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.