Add a Rust version of the gcpaudit plugin#1340
Conversation
Try translating the gcpaudit plugin from Go to Rust in order to work around golang/go#65050 This is an inital attempt using Claude Opus, and doesn't currently build. Signed-off-by: Gerald Combs <gerald@wireshark.org>
Signed-off-by: Gerald Combs <gerald@wireshark.org>
Signed-off-by: Gerald Combs <gerald@wireshark.org>
Return None instead of an error if we don't find a field. Signed-off-by: Gerald Combs <gerald@wireshark.org>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: geraldcombs The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
The build-packages-aarch64 job is failing with would it be preferable to bump the rustc version to 1.91.1 or downgrade the dependency versions? |
|
Hey @geraldcombs . Thank you for this contribution. I like the idea, and it for sure will let us avoid the problem you mentioned and any other oddity linked to the go runtime. |
Signed-off-by: Gerald Combs <gerald@wireshark.org>
Rename gcpaudit-rs to gcpaudit_rs to conform to our plugin directory naming convention. Signed-off-by: Gerald Combs <gerald@wireshark.org>
Signed-off-by: Gerald Combs <gerald@wireshark.org>
Copy the README.md file from gcpaudit, and note that this is a Rust version of that plugin. Signed-off-by: Gerald Combs <gerald@wireshark.org>
Great suggestion! Done in #1350. |
What type of PR is this?
/kind bug
/kind feature
Any specific area of the project related to this PR?
/area plugins
/area registry
What this PR does / why we need it:
This is an AI-aided translation of the gcpaudit plugin from Go to Rust. Why do this? Go doesn't officially support loading multiple c-shared libraries, and while this works on most platforms it crashes on macOS on x64, and the Go team has no plans to fix this:
golang/go#65050
Fortunately this doesn't really affect Falco, but it does affect Stratoshark, which loads multiple Falco plugins at startup:
https://gitlab.com/wireshark/wireshark/-/work_items/20869
A separate PR for a Rust version of the cloudtrail plugin can be found at #1350.
I've been shipping this and plugins with Stratoshark's development installers for macOS and Windows, and so far they seem to work well. I don't have any large capture files available for performance testing, but haven't run into any issues so far. If you have a large cloudtrail or gcpaudit file suitable for testing that you can share I would be grateful.
Questions and outstanding issues:
cloudtrail_rs and gcpaudit_rs currently have the same IDs and names as their Go counterparts. Should these have different IDs and/or names?
The cloudtrail Go plugin has a source test, which is absent from the Rust plugin.
Which issue(s) this PR fixes:
https://gitlab.com/wireshark/wireshark/-/work_items/20869
Fixes #
Special notes for your reviewer: