Skip to content

Fix(vulnerability_analytics): Resolve angr execution failures and fix Docker/Poetry setup - #8

Open
tdrdnt wants to merge 3 commits into
open-crs:masterfrom
tdrdnt:tudor-fix-vuln-analytics
Open

Fix(vulnerability_analytics): Resolve angr execution failures and fix Docker/Poetry setup#8
tdrdnt wants to merge 3 commits into
open-crs:masterfrom
tdrdnt:tudor-fix-vuln-analytics

Conversation

@tdrdnt

@tdrdnt tdrdnt commented Jun 29, 2026

Copy link
Copy Markdown

Purpose of the PR

This PR fixes the vulnerability_analytics module, which was failing to run due to issues related to the Docker environment, package versions, and incompatibilities with the angr loader. It also updates the README.md with the correct setup and execution instructions.

Main Changes:

1. angr/Docker Execution Fixes:

  • Downgraded the base image from ubuntu:latest to ubuntu:20.04 to prevent glibc compatibility issues with the angr loader (which caused the simgr is empty error).
  • Updated DockerBuilder.py to generate an absolute path for the binary in the ENTRYPOINT instruction.

2. Docker and Setup Fixes:

  • Upgraded the Docker image to use python:3.10, fulfilling the requirements specified in pyproject.toml.
  • Replaced the Poetry installation method inside the container with pip install poetry to avoid environment pathing issues.
  • Corrected README.md to specify that the docker build command must be executed from the project root. This ensures that local packages (commons, zeratool_lib) are properly included in the Docker context.

3. Dependency Management:

  • Removed caret (^) constraints in pyproject.toml and replaced them with specific version constraints to prevent unexpected breaking changes during future installations (e.g., Python version is strictly bounded to >=3.10, <3.11).
  • Generated the updated poetry.lock file.

How to Test:

  1. Run the docker build command from the project root according to the updated instructions in the README.
  2. Execute the test runs using the examples provided:
    poetry run vulnerability_analytics get --binary-path=./test_binary/source.bin --binary-arguments="--string,santa"

@tdrdnt
tdrdnt requested a review from razvand June 29, 2026 12:43
@tdrdnt tdrdnt self-assigned this Jun 29, 2026
@razvand
razvand requested a lite review from Copilot August 11, 2026 06:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to restore reliable execution of the vulnerability_analytics module by stabilizing its Docker runtime (including an angr-compatible base image and corrected container entrypoint behavior) and tightening dependency/Poetry setup, alongside README setup instruction updates.

Changes:

  • Adjusts the runtime container base image and Docker entrypoint generation for analyzing binaries (angr/rex flow).
  • Updates the main development/runtime Docker image to Python 3.10 and installs Poetry via pip.
  • Reworks pyproject.toml dependency constraints and adds poetry.toml to control virtualenv creation.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
vulnerability_analytics/rex_api/DockerBuilder.py Generates an absolute binary path in the generated image ENTRYPOINT.
vulnerability_analytics/res/Dockerfile Pins the analysis-image base to Ubuntu 20.04 for improved compatibility.
docker/Dockerfile Moves to python:3.10, installs Poetry via pip, and copies local packages into the image.
README.md Updates Docker build/run instructions and switches to poetry run ... invocation examples.
pyproject.toml Replaces caret constraints with bounded ranges; adds archr and other constraints.
poetry.toml Enables in-project virtualenv creation.

馃挕 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread pyproject.toml
@razvand
razvand requested a review from ClaraStefania August 11, 2026 06:57
@tdrdnt
tdrdnt force-pushed the tudor-fix-vuln-analytics branch from 6c546f5 to b2a262a Compare September 2, 2026 21:13
Update DockerBuilder to generate an absolute path for the target binary
in the ENTRYPOINT instruction. This ensures angr and archr resolve the
executable properly within the container and prevents 'simgr is empty'
errors.

Downgrade the base image in res/Dockerfile to ubuntu:20.04 to guarantee
glibc and runtime compatibility for older 32-bit ELF binaries.

Signed-off-by: Tudor Danet <tudor.danet.upb@gmail.com>
Update the module Dockerfile to install Poetry via pip to ensure proper
PATH resolution and configure environment flags to treat incompatible
pointer types as warnings during C extension compilation.

Configure Poetry to create in-project virtual environments in
poetry.toml, pin cffi and pycparser constraints, and update README.md
with the new build and execution instructions from the project root.

Signed-off-by: Tudor Danet <tudor.danet.upb@gmail.com>
Add 32-bit ELF test binaries and their corresponding C source files
in the test_binary directory.

These include a buffer overflow test case triggered via stdin and a
NULL pointer dereference test case triggered via command-line
arguments to validate crash analysis in the test suite.

Signed-off-by: Tudor Danet <tudor.danet.upb@gmail.com>
@tdrdnt
tdrdnt force-pushed the tudor-fix-vuln-analytics branch from 434c509 to 8b6a193 Compare September 5, 2026 10:26
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.

2 participants