Add Rust versions of the cloudtrail and gcpaudit plugins#1340
Open
geraldcombs wants to merge 10 commits intofalcosecurity:mainfrom
Open
Add Rust versions of the cloudtrail and gcpaudit plugins#1340geraldcombs wants to merge 10 commits intofalcosecurity:mainfrom
geraldcombs wants to merge 10 commits intofalcosecurity:mainfrom
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>
Signed-off-by: Gerald Combs <gerald@wireshark.org>
The gcpaudit translation worked well, so let's try CloudTrail. Signed-off-by: Gerald Combs <gerald@wireshark.org>
Rename gcpaudit-rs to gcpaudit_rs and cloudtrail-rs to cloudtrail_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>
Add the following changes from the Golang plugin: 78e3a89 fix(plugins/cloudtrail): replace ct.user.sessionname with ct.originaluser 07a9f40 fix(plugins/cloudtrail): restore role name for ct.user on AssumedRole events bfee0e3 doc(plugins/cloudtrail): Assumed role user from session name, falling back to the identity userName 9c58bb2 fix(plugins/cloudtrail): Assumed role user from session name, falling back to the identity userName The following issues were not applicable: 8608166 fix(plugins/cloudtrail): prevent panics during sqs message parsing 2f0a3bf fix(plugins/cloudtrail): preserve records when strings contain braces Mostly generated using Claude Opus 4.6, with minor fixes. Signed-off-by: Gerald Combs <gerald@wireshark.org>
Copy the README.md files from cloudtrail and gcpaudit, and note that these are Rust versions of those plugins. Signed-off-by: Gerald Combs <gerald@wireshark.org>
Contributor
|
[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 |
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.
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 cloudtrail and gcpaudit plugins 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
I've been shipping these 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: