> 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/github/malicious-files/rules.md).

# Rules

The **Rules** page lists the detection rules StepSecurity curates for files dropped by known supply chain campaigns. Each rule is an ordered chain of checks that runs against every file version in your repositories.

To open it, select **Malicious Files** > **Rules** in the **GitHub** section of the left navigation.

<figure><img src="https://754495266-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQJRZY4cfEeY3I7DXTOCp%2Fuploads%2FehsC4eb1wype9noir4GH%2FScreenshot%202026-10-27%20at%2015.59.13.png?alt=media&amp;token=fa140c02-063c-4774-a3d7-4be829a2ab7f" alt=""><figcaption></figcaption></figure>

For each rule, StepSecurity shows:

* **Rule:** the rule identifier, for example `miasma-ide-autorun-github-setup-js`
* **Campaign:** the attack campaign the rule detects
* **Severity:** the severity of a match, for example **Critical** or **High**
* **Checks:** the number of checks in the rule and how many of them are required
* **Revision:** the current revision of the rule, for example `r1`
* **Status:** whether the rule is enabled
* **Updated:** when the rule was last updated

Use the search box to find a rule by name, and the **Campaign** and **severity** filters to narrow the list.

Rules cover campaigns such as Shai-Hulud, Mini Shai-Hulud, GlassWorm, Miasma, TeamPCP, PolinRider, Contagious Interview, and the axios npm compromise. StepSecurity expands the rule set as new campaigns are identified, so check the **Rules** page for the current list.

### Rule details

Select a rule to open its details panel. The panel shows the rule's campaign, revision, severity and status, the number of checks, when it was last updated, and a **View findings for this rule** link that opens the [Findings](https://docs.stepsecurity.io/github/malicious-files/findings.md) page filtered to that rule.

<figure><img src="https://754495266-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQJRZY4cfEeY3I7DXTOCp%2Fuploads%2FD66ILsvV34SnDChaVnGM%2FScreenshot%202026-10-27%20at%2016.03.56.png?alt=media&amp;token=88a23494-37d8-49c3-b5ce-22c0a406ecba" alt=""><figcaption></figcaption></figure>

Under **Checks**, the panel lists every check in the order it runs. A rule fires only when every required check matches. For each check, StepSecurity shows:

* **Name:** what the check looks for, for example `ide-config-file`
* **Type:** `filename` checks match the file's path, and `content` checks match the file's contents
* **Required** or **Optional:** whether the check must match for the rule to fire
* **Pattern:** the regular expression the check uses
* **Description:** a plain-language explanation of what the pattern detects

For example, the `miasma-ide-autorun-github-setup-js` rule has five checks, three of them required:

| # | Check                   | Type     | Required | What it detects                                                                                                     |
| - | ----------------------- | -------- | -------- | ------------------------------------------------------------------------------------------------------------------- |
| 1 | `ide-config-file`       | filename | Yes      | Claude Code or Gemini CLI (Command Line Interface) settings, VS Code tasks, or a Cursor rule at the repository root |
| 2 | `runs-miasma-loader`    | content  | Yes      | A command that runs `node .github/setup.js`, the Miasma worm's loader                                               |
| 3 | `runs-automatically`    | content  | Yes      | A session start hook, a task that runs when the folder opens, or a Cursor rule applied to every request             |
| 4 | `lure-text`             | content  | No       | The worm's lure text about IDE (Integrated Development Environment) integration and dependency setup                |
| 5 | `matches-every-session` | content  | No       | A hook matcher that fires for every session                                                                         |


---

# 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 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/github/malicious-files/rules.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 `automate deployments from our CI pipeline` 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.
