feat(tools): Hex.pm enrichment in get_dependency_blast_radius - #108
Open
manus-use wants to merge 1 commit into
Open
feat(tools): Hex.pm enrichment in get_dependency_blast_radius#108manus-use wants to merge 1 commit into
manus-use wants to merge 1 commit into
Conversation
This was referenced Jul 9, 2026
This was referenced Jul 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
_enrich_hextoget_dependency_blast_radius.py, bringing Elixir/Erlang package ecosystem support via the Hex.pm public API.What changed
src/manus_agent/tools/get_dependency_blast_radius.py_parse_hex_timestamp(ts)— new helper to parse Hex.pm ISO-8601 timestamps (handles Z suffix, +HH:MM offset, variable sub-second precision). Returns(iso_date, age_years)._enrich_hex(name)— new enricher that makes a singleGET https://hex.pm/api/packages/{name}call and extracts:weekly_downloads(fromdownloads.week) — feeds directly into_blast_scoretotal_downloads(fromdownloads.all)recent_downloads(fromdownloads.recent— last 90 days)latest_version(latest_stable_versionpreferred,latest_versionas fallback)total_versions(length ofreleaseslist)first_release_date+age_years(fromreleases[-1].inserted_at)description(frommeta.description, truncated to 120 chars, newlines stripped)home_page(fromhtml_url)_enrich_packagedispatch extended:hex,elixir,erlangecosystem strings all route to_enrich_hex._ECOSYSTEM_LABELalready had"Hex": "Hex (Elixir/Erlang)"— no change needed.hex:/elixir:to supported ecosystem prefixes; documents new exposure metric row.tests/test_dependency_blast_radius.py25 new tests across two new classes:
TestParseHexTimestampNoneinput, empty string, invalid stringTestEnrichHexdownloadskey, missing/emptyreleases, CRITICAL blast score, MEDIUM blast score,latest_stable_versionpreference, fallback tolatest_version, package name preservationTestEnrichPackageDispatchhex,elixir,erlangall dispatch to_enrich_hexSuite: 74 → 99 tests in this file; 1183 total (all passing).
Why Hex.pm
Hex.pm is the package manager for the Erlang ecosystem (Elixir, Erlang, Phoenix, Ecto, Plug). Several CVEs affect widely-downloaded Hex packages:
CVE-2022-24804—plug_crypto(a Phoenix dependency with >300M all-time downloads)CVE-2020-5258—nerves_networkThe Hex.pm API is free, unauthenticated, and well-documented. A single request returns everything needed — no pagination, no second call.
API details
Response fields used:
downloads.week— 7-day download count (blast score input)downloads.all— all-time totaldownloads.recent— last 90 dayslatest_stable_version— current non-pre-releasereleases[].inserted_at— per-version publish timestampmeta.description— one-line summaryhtml_url— https://hex.pm/packages/{name}No authentication required. No rate-limit concerns for single-package lookups.
Checked against existing open PRs — no overlap
Reviewed all 33 open PRs before building. None covers Hex.pm enrichment:
#51 (silent-patches), #53 (cve-timeline), #54 (version-range), #58 (vendor-response), #60 (poc-freshness), #64 (sbom-scan), #65 (temporal-priority), #67 (cluster-variants), #74 (epss-decay), #75 (exploit-maturity), #76 (vulnerability-triage), #77 (cve-report), #78 (diff-report), #79 (reachability), #80 (epss-watchlist), #82 (attack-surface), #83 (watch-alert), #85 (cli-integration-tests), #86 (patch-lag), #87 (kev-context), #88 (readme-scoring-workflow), #89 (core-tools-tests), #90 (exploit-search-tests), #96 (maven-first-release-date), #97 (osv-data — already merged), #98 (pypi-first-release-date), #100 (npm-first-release-date), #103 (enrich-crates), #104 (enrich-rubygems), #105 (enrich-nuget), #106 (enrich-go), #107 (enrich-packagist)