sds-go: add Suppressions to RegexRuleConfig - #381
Merged
Conversation
The Rust engine already compiles starts_with / ends_with / exact_match lists and drops matching hits, but the Go bindings never sent that field over FFI. Agentless and other Go callers therefore could not suppress matches through this package. Add the same value-type Suppressions model used in sds-shared-library, thread it through ExtraConfig and the New*Rule constructors, and map CreateScannerError::InvalidSuppressions (-6) to ErrInvalidSuppressions.
Contributor
Author
|
@codex review |
|
To use Codex here, create a Codex account and connect to github. |
vinckama
commented
Aug 20, 2026
| } else { | ||
| return nil, fmt.Errorf("internal panic") | ||
| } | ||
| case -6: // rust: CreateScannerError::InvalidSuppressions |
Contributor
Author
There was a problem hiding this comment.
case -7 is invalid capture group which is not supported in this PR, this case would be needed when capture group are supported
vinckama
marked this pull request as ready for review
August 20, 2026 14:48
vinckama
changed the base branch from
vincent.roy/match-action-unmarshal-json
to
main
August 20, 2026 14:49
fuchsnj
approved these changes
Aug 20, 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.
The Rust engine already compiles starts_with / ends_with / exact_match lists and drops matching hits, but the Go bindings never sent that field over FFI. Go callers therefore could not suppress matches through this package.
Add the same value-type Suppressions model used in sds-shared-library, thread it through ExtraConfig and the New*Rule constructors, and map CreateScannerError::InvalidSuppressions (-6) to ErrInvalidSuppressions.
Needed for DATASEC-204.