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

# Rules

The **Rules** page lists the malicious-file detection rules StepSecurity curates for files dropped by known supply chain campaigns. Each rule names the files to scan and the groups of indicators to match on every enrolled device.

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

Rules are maintained by StepSecurity and apply to every enrolled device automatically, so there is nothing to configure. You can deactivate a rule if you do not want it to run in your organization.

<figure><img src="https://754495266-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQJRZY4cfEeY3I7DXTOCp%2Fuploads%2FcGxj2zs7cGzb6vCUYfds%2FScreenshot%202026-10-27%20at%2016.25.36.png?alt=media&amp;token=b06de56b-2321-4934-a925-64d6153b0418" alt=""><figcaption></figcaption></figure>

### Rules list

For each rule, StepSecurity shows:

* **Rule:** the rule identifier, for example `binding-gyp-command-exec`
* **Campaign:** the attack campaign the rule detects, for example `shai-hulud`
* **Groups:** the number of indicator groups the rule matches
* **Files scanned:** the file path patterns the rule scans on each device, for example `**/binding.gyp` or `**/.github/setup.js`
* **Status:** `Enabled` or `Deactivated`

Use the search box to find a rule by name, and the **Campaign** filter to narrow the list to one campaign.

### Deactivating and activating a rule

Select **Deactivate** on a rule's row to stop it from running. Deactivating a rule stops the scan on every device in your organization and moves the rule's findings to the **Suppressed** tab on the [Findings](https://docs.stepsecurity.io/developer-machines/malicious-files/findings.md) page. The rule's status changes to `Deactivated`.

To turn the rule back on, select **Activate** on its row.

{% hint style="warning" %}
Deactivating a rule applies to every enrolled device in your organization. Deactivate a rule only when you have confirmed its findings are expected in your environment. To suppress only specific files, hashes or devices, create a [suppression rule](https://docs.stepsecurity.io/developer-machines/malicious-files/suppression-rules.md) instead.
{% endhint %}

### What the rules detect

Detection rules cover files associated with known supply chain attacks, including:

* A malicious `binding.gyp` that triggers code execution during `npm install`
* Editor and AI-tool configuration and instruction files that auto-execute on project open or session start

The following files are examples of editor and AI-tool integration points that can be abused to achieve code execution when a developer opens a project or starts a session:

| File                      | Tool                  | Trigger                                                    |
| ------------------------- | --------------------- | ---------------------------------------------------------- |
| `.claude/setup.mjs`       | Anthropic Claude Code | `SessionStart` hook: runs on every new Claude Code session |
| `.claude/settings.json`   | Anthropic Claude Code | Settings injection                                         |
| `.cursor/rules/setup.mdc` | Cursor                | Custom rules file: loaded on project open                  |
| `.gemini/settings.json`   | Google Gemini         | Settings injection                                         |
| `.vscode/tasks.json`      | Visual Studio Code    | `runOn: folderOpen` auto-execute                           |
| `.vscode/setup.mjs`       | Visual Studio Code    | Task-triggered setup script                                |
| `.github/setup.js`        | GitHub Actions        | Workflow injection                                         |

For example, rules for the Miasma campaign flag files such as `.cursorrules`, `.windsurfrules`, `copilot-instructions.md`, and `settings.json` on affected machines.

### How rules are maintained

StepSecurity maintains and expands the rule set continuously. As new attack techniques are identified, StepSecurity adds and updates rules centrally, and your fleet is evaluated against them automatically, so the campaigns and file patterns covered grow over time without any action on your part.

To see the files these rules have flagged on your devices, go to [Findings](https://docs.stepsecurity.io/developer-machines/malicious-files/findings.md).


---

# 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/developer-machines/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.
