> For the complete documentation index, see [llms.txt](https://docs.snyk.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.snyk.io/scan-fix-and-prevent/scan-with-snyk/snyk-code/rule-extensions.md).

# Rule Extensions

You can extend Snyk Code's security rules to fit your Project's unique context. Rule Extensions add custom functions to existing security rules, which helps the engine understand your code's specific logic and provides more accurate findings.

A primary use for this feature is to reduce false positives. For example, you can register your Project's in-house [sanitizer functions](/scan-fix-and-prevent/scan-with-snyk/snyk-code/rule-extensions/custom-sanitizers.md) so the scanner recognizes them as valid ways to clean data.

Rule Extensions are available to Enterprise customers and can be managed through the Snyk Web UI or the public REST API. Access is granted through a custom role — see [Rule Extensions permissions](/scan-fix-and-prevent/scan-with-snyk/snyk-code/rule-extensions/rule-extensions-permissions.md) for the permissions required for each.


---

# 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.snyk.io/scan-fix-and-prevent/scan-with-snyk/snyk-code/rule-extensions.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.
