Export Detections
To get started or to adopt detection as code after already adding detections to your account the RunReveal CLI has the commands necessary to bootstrap a code repo from nothing, so you can
Once you're logged into the CLI from the getting started steps, you can utilize the export functionality to download all detection state into a directory of your choosing.
These detections are categorized by sourceType and will be
sorted into directories by the categories tag if they
match the name of any sourceType within RunReveal.
After exporting each detection will be output into two files. The detection query and the detection configuration and metadata.
Here's an example containing both the yaml and sql for our Okta detection of a user reporting a suspicious action.
First time you export
The first time you export existing detections that were made in the web ui you'll first need to upload them and force overwrite them from the CLI before your CI/CD system can use them.
This step will force overwrite all detections that you have in the repo so they will be managed via detection as code going forward.
Related Documentation
Now that you've exported your detections, explore these related guides:
- Detections, Signals & Alerts Quick Start Guide - Complete setup guide for your detection workflow
- Getting Started with Detection as Code - Learn the basics of detection-as-code
- Test/Upload Detections - Learn how to test, lint, and upload your detections
- Deployment - Set up CI/CD pipelines for automated deployment
- Detection as Code - Overview of detection-as-code features