Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cogburn/detection tests #381

Merged
merged 4 commits into from
Mar 12, 2024
Merged

Cogburn/detection tests #381

merged 4 commits into from
Mar 12, 2024

Conversation

coreyogburn
Copy link
Contributor

No description provided.

Don't show the title on the Detection Create page.

Added a few classes and IDs to help tests.

When extracting references, check URLs with Regex so we don't turn plain text into a hyperlink.

Fixed a bug where extracting logic wouldn't extract anything if the unindent process didn't unindent anything.

When extracting details from sigma rules, extract description too if present.

Better logic around extracting yara logic. The `strings:` section is useful but not required. If not found, fallback to looking for `condition:` which is required.
Stopped prefilling the author field when we create the detection model. Instead, add the author to new detections right before we save them.

Fixed an issue where non-URL Suricata references where showing up as hyperlinks.

Some whitespace trimming in a few places.

Fix for extractedLogic not being set if unindenting is unnecessary.

The language dropdown entries are now displayed capitalized. Values are still lowercase.

Cleaning up overrides turned into a function for testing.
…nstore. The handler should check for all the ways the request will fail. When everything succeeds, the store should do all the manipulation. This also prevents a redundant call to the DB for the existing detection.

Removed "tautologies" that the linter was pointing out.

Moved another validator from Casestore to Detectionstore for validating a Detection's tags.

Fixed a bug when validating the ruleset of a detection.

When validating a detection, check the language against the engine to be sure it's a valid pairing.

DoesTemplateExist now considers any 2XX successful instead of just 200.

Removed a couple redundant auth checks.

Updated Casestore tests to have unique test names with Detectionstore and to fix tests that fail from an introduced change. ValidateStringArray was assuming the label was "Tags" even though a label was passed in, but the value was "tags".

Detectionstore tests.

TODO: More Detectionstore tests.
@coreyogburn coreyogburn merged commit 4ed2581 into 2.4/dev Mar 12, 2024
3 checks passed
@coreyogburn coreyogburn deleted the cogburn/detection-tests branch March 12, 2024 19:17
@github-actions github-actions bot locked and limited conversation to collaborators Mar 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants