Skip to content

QS: use IDA(lib) instead of Lancelot#1198

Open
williballenthin wants to merge 4 commits intoquantumstrandfrom
qs-ida
Open

QS: use IDA(lib) instead of Lancelot#1198
williballenthin wants to merge 4 commits intoquantumstrandfrom
qs-ida

Conversation

@williballenthin
Copy link
Copy Markdown
Collaborator

@williballenthin williballenthin commented Jan 13, 2026

pro:

  • IDA is maintained

con:

  • IDA requires a license

I've added HCLI key and IDA license info to the repo secrets so GH Actions can run tests with IDA for FLOSS/QS.

@williballenthin williballenthin requested a review from mr-tz January 13, 2026 12:12
@williballenthin williballenthin added the QS QUANTUMSTRAND label Jan 13, 2026
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @williballenthin, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request transitions the project's underlying code analysis framework from lancelot to ida-domain. This strategic shift aims to benefit from the active maintenance and robust features of IDA Pro's analysis engine, while acknowledging the new requirement for an IDA license. The changes encompass significant updates to the core logic for identifying code, adapting the file processing workflow to accommodate IDA's file-based analysis, and updating the project's dependencies and test suite to reflect this new integration.

Highlights

  • Core Analysis Engine Switch: The primary change involves replacing the lancelot library with ida-domain for code analysis, leveraging IDA Pro's maintained analysis capabilities.
  • Dependency Update: The pyproject.toml file has been updated to remove python-lancelot and add ida-domain as a dependency.
  • Code Range Extraction Logic: The _get_code_ranges function in floss/qs/main.py has been refactored to use ida-domain's Database and flowchart objects for identifying and extracting code ranges.
  • File Path Integration for Analysis: The compute_pe_layout and compute_layout functions now accept an optional path argument, enabling ida-domain to perform analysis directly on the file system. This includes creating temporary directories and copying files for IDA's operation.
  • Test Suite Adaptation: The unit tests in tests/test_qs_code_ranges.py have been updated to mock ida_domain objects and APIs, ensuring compatibility with the new analysis backend.
  • String Extraction Consistency: An assertion in tests/test_qs_pma0101.py was adjusted, indicating a slight difference in the number of identified strings, likely a consequence of the new analysis engine's behavior.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request successfully replaces the lancelot library with the maintained ida-domain library for code analysis. The changes are generally well-implemented. However, I've identified a critical regression where code analysis is no longer performed on embedded PE files, as the file path required by IDA is not provided for them. Additionally, a key integration test is not correctly set up to exercise the new code analysis path, which should be rectified. I've also included a minor suggestion to improve import consistency. Please review the detailed comments for suggestions on how to address these issues.

Comment thread floss/qs/main.py Outdated
Comment thread tests/test_qs_pma0101.py Outdated
Comment thread floss/qs/main.py Outdated
@williballenthin williballenthin force-pushed the qs-ida branch 2 times, most recently from 346904b to 339e47e Compare January 13, 2026 12:46
@mr-tz
Copy link
Copy Markdown
Collaborator

mr-tz commented Jan 13, 2026

looks good overall, thanks!
CI build is failing

@williballenthin
Copy link
Copy Markdown
Collaborator Author

no idea why PyInstaller build for Windows is failing

@williballenthin
Copy link
Copy Markdown
Collaborator Author

maybe this is related? mandiant/capa#2750

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

Labels

QS QUANTUMSTRAND

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants