Skip to content

Conversation

@gfs
Copy link
Collaborator

@gfs gfs commented Nov 19, 2025

Adds C# IL extractor prototype (minimally scoped for now to detect methods/control flow) an some simple example queries to demonstrate it can detect method calls from compiled database.

---- Copilot Summary ---
Extractor Implementation:

  • Added the initial extractor in Semmle.Extraction.CSharp.IL, including ILExtractor.cs for reading assemblies and writing facts, TrapWriter.cs for TRAP file output, and Program.cs as the CLI entry point. The extractor captures assemblies, types, methods, IL instructions, control flow, calls, and exception handlers. [1] [2] [3]

Schema and Configuration:

  • Defined the database schema for C# IL extraction in semmlecode.csharp.il.dbscheme, specifying tables for assemblies, types, methods, IL instructions, control flow, call targets, operands, and exception handlers.
  • Added extractor and QL library configuration files: codeql-extractor.yml for extractor metadata, qlpack.yml for QL library, and downgrades/qlpack.yml for downgrade support. [1] [2] [3]

Documentation and Project Structure:

  • Created a comprehensive README.md describing the extractor’s features, usage, schema, use cases, design philosophy, limitations, and directory layout.

Build and Environment:

  • Added .gitignore for C# build artifacts and test results, and a .csproj file for the extractor project targeting .NET 8.0 and referencing Mono.Cecil. [1] [2]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant