> 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 dynamically by asking a question.

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

```
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=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
