Skip to content

Conversation

@psrok1
Copy link
Member

@psrok1 psrok1 commented Sep 24, 2025

Your checklist for this pull request

  • I've read the contributing guideline.
  • I've tested my changes by building and running the project, and testing changed functionality (if applicable)
  • I've added automated tests for my change (if applicable, optional)
  • I've updated documentation to reflect my change (if applicable)

What is the current behaviour?

MWDB search syntax is pretty verbose and complex and may be intimidating for unexperienced users. It would be nice to have at least syntax coloring and autocompletion suggestions to make the malware database more discoverable.

What is the new behaviour?

This PR introduces basic syntax coloring. It's based on two components:

  • Moo-based lexer, specialized for MWDB-specific Lucene syntax
  • Slate-based input component that uses contenteditable div for rich rendering
image

Second thing added by this PR is autosuggestion mechanism. Search query can be easily typed using keyboard:
Peek 2025-09-24 13-20

I have also implemented attribute suggestions, including subfields. Information about subfields is fetched from "Example value" - part of Rich attributes template.

Peek 2025-09-24 13-27

Right now the autosuggestion feature is a bit limited:

  • it supports only field suggestion
  • suggestion applies only to the end of query string, it can't provide suggestion for something typed in the middle of the query

@psrok1 psrok1 force-pushed the feature/search-autocompletion branch from aea0aa3 to a448857 Compare September 24, 2025 11:47
@psrok1 psrok1 marked this pull request as ready for review September 24, 2025 11:47
@psrok1 psrok1 force-pushed the feature/search-autocompletion branch from a448857 to 256d7ca Compare October 29, 2025 15:16
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