> For the complete documentation index, see [llms.txt](https://docs.stepsecurity.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stepsecurity.io/administration/admin-console/settings/anomaly-detection.md).

# 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="https://754495266-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQJRZY4cfEeY3I7DXTOCp%2Fuploads%2FbOPF5CqQfBNvOMKiRglO%2FScreenshot%202025-11-03%20at%2011.29.14.png?alt=media&amp;token=20bdadc4-e182-42ad-8239-06a5bba2200e" 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="https://754495266-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQJRZY4cfEeY3I7DXTOCp%2Fuploads%2Ftljj95ULliMwhJRXjXwp%2FScreenshot%202025-11-03%20at%2011.32.12.png?alt=media&amp;token=0532dd72-049b-4da6-b765-03c01fab7812" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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 following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `build a script that syncs our docs to a CMS` lets GitBook tailor the answer to that use case.

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.
