# Anomaly Detection

Configure Anomaly Detection settings for Harden-Runner to identify unusual workflow behavior by comparing new runs against established baselines. These settings determine when anomaly detection becomes active across all workflows.

<figure><img src="/files/GQGEpKtGxtjdXgWsz2bA" alt=""><figcaption></figcaption></figure>

### Configuration

You can enable anomaly detection based on **workflow run count** or **elapsed time** since the first run.

#### Run-Based Detection

Specify the minimum number of workflow runs required before anomaly detection is enabled. By default, this value is 100, but you can adjust it to suit your organization’s workflow frequency.

Example: Increase the threshold for high-frequency workflows to ensure more accurate baselines.

#### Time-Based Detection

Enable time-based anomaly detection to activate monitoring after a defined number of days since the first workflow run. This is useful for workflows that run infrequently but still need anomaly monitoring.

Example: If set to 30 days, detection begins 30 days after the first run, even if the workflow hasn’t reached the minimum run count.

<figure><img src="/files/xLkWaQuaaWeJAD0jL3vi" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.stepsecurity.io/administration/admin-console/settings/anomaly-detection.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
