Skip to content

feat: add rsigma fields subcommand for field catalog#65

Merged
mostafa merged 2 commits intomainfrom
feat/fields-command
May 2, 2026
Merged

feat: add rsigma fields subcommand for field catalog#65
mostafa merged 2 commits intomainfrom
feat/fields-command

Conversation

@mostafa
Copy link
Copy Markdown
Member

@mostafa mostafa commented May 2, 2026

Summary

  • Add rsigma fields subcommand that extracts and lists all field names referenced across detection rules, correlation rules (group-by, condition fields, alias mappings), filter rules, and rule metadata (fields: section).
  • Supports pipeline application (-p) to show post-mapping field names, --no-filters to exclude filter-contributed fields, and --json for machine-readable output with summary stats and pipeline mapping details.
  • 16 integration tests with insta inline snapshots covering all field source types, pipeline transforms, JSON output, directory loading, keyword-only rules, and error cases.
  • Updated both READMEs with subcommand documentation, examples, and flag reference.

Test plan

  • cargo test -p rsigma --test cli_fields passes all 16 tests
  • cargo clippy --workspace --all-targets --all-features -- -D warnings clean
  • CI passes on all platforms (ubuntu, macos, windows)

mostafa added 2 commits May 2, 2026 17:54
List all fields referenced by Sigma rules, correlations, and filters.
Extracts field names from detection items, correlation group-by/condition
fields, alias mappings, filter detections, and rule metadata. Optionally
applies pipelines to show post-mapping field names.

Flags: -r/--rules (required), -p/--pipeline (repeatable),
--no-filters, --json. Table output sends data to stdout and stats to
stderr. Pipeline field mapping summary included when pipelines are applied.

16 integration tests with insta inline snapshots covering detection,
correlation, value_count condition fields, alias mappings, filters,
--no-filters exclusion, pipeline transforms, JSON output, directory
loading, keyword-only rules, and error cases.
@mostafa mostafa merged commit 133dfff into main May 2, 2026
8 checks passed
@mostafa mostafa deleted the feat/fields-command branch May 2, 2026 16:00
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.

1 participant