feat(eval): built-in cloud/SaaS/container schema signatures - #318
Merged
Conversation
Add always-on signatures for AWS CloudTrail and VPC Flow Logs, Azure Activity/SignIn/Audit logs, GCP Cloud Audit, the Microsoft 365 unified audit log, GitHub Audit, Okta System Log, OneLogin, Kubernetes audit, Docker events, and osquery. Each signature uses multi-field markers for high specificity and implies a SigmaHQ taxonomy-compatible product and service logsource for conflict-based pruning, with off-taxonomy sources carried as logsource.custom dimensions.
Add per-source fixtures (test_event.json + expected_classification.yaml) and a walk test that classifies each event and asserts the resolved schema name, specificity, and implied logsource, plus a check that every fixture maps to a known built-in schema.
SigmaHQ's gcp.audit rules reference fields under the data. prefix (data.protoPayload.*), while native Cloud Logging events use bare protoPayload.*. Strip the prefix via field_name_prefix_mapping so the rules match native events, and add an end-to-end test proving a native event matches only after the pipeline runs.
Document the built-in signatures and their implied logsource, the schema-derived routing tables, and per-source collector recipes (Vector, OTel, Fluent Bit). Add the CHANGELOG entry for the bundle.
mostafa
force-pushed
the
feat/cloud-schema-signatures
branch
from
July 16, 2026 15:52
b249bcc to
9600a25
Compare
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.
Summary
Adds always-on, built-in schema signatures so rsigma recognizes common cloud, SaaS, and container event shapes out of the box and derives a SigmaHQ taxonomy-compatible logsource for conflict-based rule pruning.
Sources recognized:
aws_cloudtrail) and VPC Flow Logs (aws_vpcflow)azure_activitylogs,azure_signinlogs,azure_auditlogs)gcp_audit)m365_audit)github_audit)okta_system_log) and OneLogin (onelogin_events)k8s_audit), Docker events (docker_events), and osquery (osquery_result)Each signature uses multi-field markers for high specificity with no misfires, and maps to an implied
product/servicelogsource. Off-taxonomy sources (Kubernetes, Docker, osquery) carrylogsource.customdimensions instead of inventingproductvalues SigmaHQ does not use, and VPC Flow Logs ships asproduct: awspluscustom: {source: vpcflow}.Details
builtin_signatures()with the implied logsource inbuiltin_schema_logsource()and a specificity-orderedbuiltin_schema_names(), guarded by a consistency test.gcp_audit.ymlpipeline strips thedata.prefix that SigmaHQ'sgcp.auditrules use (data.protoPayload.*) so they match native Cloud Logging events (protoPayload.*). An end-to-end test proves a native event matches only after the pipeline runs.service: audit, where SigmaHQ's native-field rules live. SigmaHQ'sexchange,threat_detection, andthreat_managementservices are written against a separately normalized shape (eventSource/eventName/status) that is not part of the Management Activity common schema, so raw events are intentionally not classified into those services.Tests
test_event.json+expected_classification.yaml) with a walk test asserting the resolved schema name, specificity, and implied logsource, plus a check that every fixture maps to a known schema.cargo test -p rsigma-eval,cargo clippy --all-targets --all-features -- -D warnings,cargo fmt --check, anddocmd validateall pass.Docs