> For the complete documentation index, see [llms.txt](https://docs.scanner.dev/scanner/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.scanner.dev/scanner/using-scanner-complete-feature-reference/detections-and-alerting/detection-rules/detection-rules-as-code/managing-synced-detection-rules.md).

# Managing Synced Detection Rules

The rules on this page apply to detection rules synced from either of the [sync modes](/scanner/using-scanner-complete-feature-reference/detections-and-alerting/detection-rules/detection-rules-as-code/getting-started.md#choose-a-sync-mode) — GitHub-polled or user-pushed.

## Update or delete a synced detection rule

Synced detection rules cannot be updated or deleted via web client or API.

To update a synced detection rule, update the YAML file it was synced from and check in the changes. The detection rule will be updated in the next sync.

To delete a synced detection rule, delete the YAML file it was synced from or remove the schema comment from the file. The detection rule will be deleted in the next sync.

## Permissions

If RBAC is enabled, sync sources have resource permissions. Any role that has **Read** permission on the sync source has **Read** permission on the detection rules synced from that source.

Since synced detection rules cannot be created, updated, or deleted via web client or API, **Create**, **Update**, and **Delete** permissions do not apply.

## Delete a sync source

When a sync source is deleted, the **Read** permissions of the sync source will be propagated to all the detection rules synced from that source. All roles that had **Read** access to the detection rule will continue to have **Read** access. The detection rules can now be updated or deleted via web client or API.

There is also an option to delete all the detection rules from the sync.


---

# 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.scanner.dev/scanner/using-scanner-complete-feature-reference/detections-and-alerting/detection-rules/detection-rules-as-code/managing-synced-detection-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.
