Skip to content

Fix openssl_dev_headers dep check to require the header - #3282

Merged
liquidsec merged 1 commit into
devfrom
medusa-libssl-dep
Jul 9, 2026
Merged

Fix openssl_dev_headers dep check to require the header#3282
liquidsec merged 1 commit into
devfrom
medusa-libssl-dep

Conversation

@liquidsec

@liquidsec liquidsec commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Closes #3272.

_core_dep_satisfied treated the openssl binary as evidence that the
OpenSSL dev headers were installed:

return any(Path(p).exists() for p in ["/usr/include/openssl/ssl.h", ...]) \
    or bool(self.parent_helper.which("openssl"))

Minimal images (e.g. python:3.11-slim) ship the openssl binary but
not libssl-dev, so the check returned True, the core-deps installer
skipped installing the headers, and source builds that compile against
libssl (medusa's ./configure) failed with:

configure: error:  *** OpenSSL header files required for SSL support. ***

Fix: require the actual header. libssl-dev / openssl-devel / etc.
are already in CORE_DEPS["openssl_dev_headers"] for every distro, so
once the check reports "not satisfied" they get installed as intended
and medusa (and any other source-built dep) compiles cleanly.

Reproduced on python:3.11-slim: with the fix, openssl_dev_headers
correctly reports unsatisfied and libssl-dev gets installed.

@liquidsec
liquidsec requested a review from en0f July 9, 2026 14:41
@liquidsec
liquidsec marked this pull request as draft July 9, 2026 14:49
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

📊 Performance Benchmark Report

Comparing dev (baseline) vs medusa-libssl-dep (current)

📈 Detailed Results (All Benchmarks)

📋 Complete results for all benchmarks - includes both significant and insignificant changes

🧪 Test Name 📏 Base 📏 Current 📈 Change 🎯 Status
Bloom Filter Dns Mutation Tracking Performance 4.40ms 4.33ms -1.6%
Bloom Filter Large Scale Dns Brute Force 18.79ms 18.22ms -3.0%
Large Closest Match Lookup 367.47ms 366.62ms -0.2%
Realistic Closest Match Workload 194.35ms 195.13ms +0.4%
Event Memory Medium Scan 1403 B/event 1402 B/event -0.1%
Event Memory Large Scan 1527 B/event 1527 B/event +0.0%
Event Validation Full Scan Startup Small Batch 406.13ms 405.62ms -0.1%
Event Validation Full Scan Startup Large Batch 542.03ms 540.47ms -0.3%
Make Event Autodetection Small 25.90ms 25.44ms -1.8%
Make Event Autodetection Large 265.64ms 259.99ms -2.1%
Make Event Explicit Types 11.66ms 11.26ms -3.5%
Excavate Single Thread Small 4.222s 4.198s -0.6%
Excavate Single Thread Large 10.072s 9.884s -1.9%
Excavate Parallel Tasks Small 4.369s 4.321s -1.1%
Excavate Parallel Tasks Large 6.521s 6.437s -1.3%
Intercept Throughput Small 893.96ms 881.04ms -1.4%
Intercept Throughput Medium 879.75ms 926.23ms +5.3%
Dns Throughput Quiet 2.870s 2.770s -3.5%
Dns Throughput Loaded 1.888s 2.004s +6.1%
Dns Throughput Inherited 2.456s 2.441s -0.6%
Is Ip Performance 2.29ms 2.33ms +2.0%
Make Ip Type Performance 230.42µs 225.90µs -2.0%
Mixed Ip Operations 2.39ms 2.40ms +0.3%
Memory Use Web Crawl 1.0 MB 1.0 MB +0.0%
Memory Use Subdomain Enum 28.3 MB 28.3 MB -0.0%
Memory Use Deep Chain 5.0 MB 5.0 MB +0.0%
Memory Use Parallel Chains 9.9 MB 13.7 MB +37.6% 🔴🔴🔴 ⚠️
Scan Throughput 100 2.850s 2.921s +2.5%
Scan Throughput 1000 21.023s 21.287s +1.3%
Typical Queue Shuffle 5.57µs 5.50µs -1.3%
Priority Queue Shuffle 26.14µs 26.40µs +1.0%

🎯 Performance Summary

! 1 regression ⚠️
  30 unchanged ✅

🔍 Significant Changes (>10%)

  • Memory Use Parallel Chains: 37.6% 🐌 more memory

🐍 Python Version 3.11.15

_core_dep_satisfied treated the openssl binary as evidence that the
dev headers were installed. Minimal images (e.g. python:3.11-slim)
ship openssl but not libssl-dev, so the check returned True and the
core-deps installer skipped installing the headers, breaking source
builds like medusa that need openssl/ssl.h.

Closes #3272.
@liquidsec
liquidsec force-pushed the medusa-libssl-dep branch from ba0cbf7 to 0a83067 Compare July 9, 2026 15:17
@liquidsec liquidsec changed the title Add libssl-dev to medusa build deps Fix openssl_dev_headers dep check to require the header Jul 9, 2026
@codecov

codecov Bot commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90%. Comparing base (42ef254) to head (0a83067).
⚠️ Report is 31 commits behind head on dev.

Additional details and impacted files
@@          Coverage Diff          @@
##             dev   #3282   +/-   ##
=====================================
+ Coverage     90%     90%   +1%     
=====================================
  Files        450     450           
  Lines      46100   46155   +55     
=====================================
+ Hits       41357   41409   +52     
- Misses      4743    4746    +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@liquidsec
liquidsec marked this pull request as ready for review July 9, 2026 17:57
@liquidsec
liquidsec merged commit 5cf74aa into dev Jul 9, 2026
25 of 27 checks passed
@liquidsec
liquidsec deleted the medusa-libssl-dep branch July 9, 2026 18:29
@liquidsec liquidsec mentioned this pull request Jul 20, 2026
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