Skip to content

fix: update dependencies in maxmind#1723

Merged
YamatoSecurity merged 5 commits intomainfrom
1722-maxmind-crate
Dec 2, 2025
Merged

fix: update dependencies in maxmind#1723
YamatoSecurity merged 5 commits intomainfrom
1722-maxmind-crate

Conversation

@fukusuket
Copy link
Collaborator

@fukusuket fukusuket commented Dec 1, 2025

@fukusuket fukusuket requested a review from Copilot December 1, 2025 11:50
@fukusuket fukusuket self-assigned this Dec 1, 2025
@fukusuket fukusuket added the bug Something isn't working label Dec 1, 2025
Copy link
Contributor

Copilot AI left a comment

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 updates the maxminddb dependency from version 0.26.0 to 0.27.0 and adapts the GeoIP lookup code to the new API. The primary changes involve updating how IP geolocation data is decoded and accessed.

  • Migrated from direct type lookup to a two-step decode pattern for GeoIP lookups
  • Updated field access from names.get("en") to names.english for localized names
  • Updated multiple dependencies (syn, bytes, clap, hashbrown, etc.) to their latest versions

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/options/geoip_search.rs Adapts GeoIP lookup code to maxminddb 0.27.0 API, using new decode pattern and updated field access methods
Cargo.lock Updates maxminddb from 0.26.0 to 0.27.0 and updates various other dependencies (syn, bytes, clap, hashbrown, etc.)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@fukusuket fukusuket marked this pull request as ready for review December 1, 2025 12:45
@fukusuket
Copy link
Collaborator Author

fukusuket commented Dec 1, 2025

% ./hayabusa json-timeline -d ../data/windows/hayabusa-sample-evtx-main -G ../data/maxmind -w -q -o timeline.json
% jq 'select(.Details.TgtASN != "")' timeline.json
{
  "Timestamp": "2019-08-03 22:50:29.101 +09:00",
  "RuleTitle": "Net Conn",
  "Level": "info",
  "Computer": "MSEDGEWIN10",
  "Channel": "Sysmon",
  "EventID": 3,
  "RecordID": 5521,
  "Details": {
    "Initiated": true,
    "Proto": "tcp",
    "SrcIP": "10.0.2.15",
    "SrcPort": 50105,
    "SrcHost": "MSEDGEWIN10.home",
    "TgtIP": "185.199.111.153",
    "TgtPort": 443,
    "TgtHost": "",
    "User": "MSEDGEWIN10\\IEUser",
    "Proc": "C:\\Windows\\System32\\mmc.exe",
    "PID": 4372,
    "PGUID": "747F3D96-9123-5D45-0000-001087596101",
    "SrcASN": "Private",
    "TgtASN": "FASTLY",
    "TgtCountry": "United States",
    "TgtCity": ""
  },
  "ExtraFieldInfo": {
    "DestinationIsIpv6": false,
    "DestinationPortName": "https",
    "SourceIsIpv6": false,
    "UtcTime": "2019-08-03 13:50:27.460",
    "SrcASN": "Private",
    "TgtASN": "FASTLY",
    "TgtCountry": "United States",
    "TgtCity": ""
  },

@fukusuket
Copy link
Collaborator Author

I also fixed #1724 :)

% ./hayabusa json-timeline -d ../data/windows/hayabusa-sample-evtx-main -w -q -o timeline.json -G ../data/maxmind -C
jq 'select(.Details.TgtASN = "FASTLY")' timeline.json
{
  "Timestamp": "2019-08-03 22:50:29.101 +09:00",
  "RuleTitle": "Net Conn",
  "Level": "info",
  "Computer": "MSEDGEWIN10",
  "Channel": "Sysmon",
  "EventID": 3,
  "RecordID": 5521,
  "Details": {
    "Initiated": true,
    "Proto": "tcp",
    "SrcIP": "10.0.2.15",
    "SrcPort": 50105,
    "SrcHost": "MSEDGEWIN10.home",
    "TgtIP": "185.199.111.153",
    "TgtPort": 443,
    "TgtHost": "",
    "User": "MSEDGEWIN10\\IEUser",
    "Proc": "C:\\Windows\\System32\\mmc.exe",
    "PID": 4372,
    "PGUID": "747F3D96-9123-5D45-0000-001087596101",
    "SrcASN": "Private",
    "TgtASN": "FASTLY",
    "TgtCountry": "United States",
    "TgtCity": ""
  },
  "ExtraFieldInfo": {
    "DestinationIsIpv6": false,
    "DestinationPortName": "https",
    "SourceIsIpv6": false,
    "UtcTime": "2019-08-03 13:50:27.460"
  },
  "RuleID": "a87defd7-1f87-4a34-8864-415ccb2ef21c"
}

Copy link
Collaborator

@YamatoSecurity YamatoSecurity left a comment

Choose a reason for hiding this comment

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

@fukusuket LGTM! Thanks so much for fixing both issues!

@YamatoSecurity YamatoSecurity merged commit 1c4f332 into main Dec 2, 2025
5 checks passed
@YamatoSecurity YamatoSecurity deleted the 1722-maxmind-crate branch December 2, 2025 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

3 participants