Skip to content

sds-go: add Suppressions to RegexRuleConfig - #381

Merged
vinckama merged 2 commits into
mainfrom
vincent.roy/sds-go-suppressions
Aug 21, 2026
Merged

sds-go: add Suppressions to RegexRuleConfig#381
vinckama merged 2 commits into
mainfrom
vincent.roy/sds-go-suppressions

Conversation

@vinckama

@vinckama vinckama commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

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.

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.

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

Comment thread sds-go/go/scanner.go
} else {
return nil, fmt.Errorf("internal panic")
}
case -6: // rust: CreateScannerError::InvalidSuppressions

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

case -7 is invalid capture group which is not supported in this PR, this case would be needed when capture group are supported

@vinckama
vinckama marked this pull request as ready for review August 20, 2026 14:48
@vinckama
vinckama requested a review from a team as a code owner August 20, 2026 14:48
@vinckama
vinckama changed the base branch from vincent.roy/match-action-unmarshal-json to main August 20, 2026 14:49
@vinckama
vinckama enabled auto-merge August 21, 2026 07:37
@vinckama
vinckama merged commit ffbe20f into main Aug 21, 2026
5 checks passed
@vinckama
vinckama deleted the vincent.roy/sds-go-suppressions branch August 21, 2026 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants