Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/semgrep/semgrep-rules
Semgrep rules registry
https://github.com/semgrep/semgrep-rules
grep-like program-analysis security security-scanner semgrep semgrep-registry semgrep-rules static-analysis
Last synced: about 1 month ago
JSON representation
Semgrep rules registry
- Host: GitHub
- URL: https://github.com/semgrep/semgrep-rules
- Owner: semgrep
- License: other
- Created: 2020-01-22T00:11:56.000Z (over 4 years ago)
- Default Branch: develop
- Last Pushed: 2024-04-12T03:29:14.000Z (5 months ago)
- Last Synced: 2024-04-13T18:47:53.880Z (5 months ago)
- Topics: grep-like, program-analysis, security, security-scanner, semgrep, semgrep-registry, semgrep-rules, static-analysis
- Language: Solidity
- Homepage: https://semgrep.dev/registry
- Size: 9.14 MB
- Stars: 705
- Watchers: 34
- Forks: 363
- Open Issues: 60
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
README
# semgrep-rules
[![powered by semgrep](https://img.shields.io/badge/powered%20by%20semgrep-2ACFA6)](https://semgrep.dev/)
Welcome! This repository is the standard library for open source [Semgrep](https://semgrep.dev/) rules.
In addition to the rules in this repository, the [Semgrep Registry](https://semgrep.dev/explore) offers proprietary [Pro rules](https://semgrep.dev/products/semgrep-code/pro-rules) that enable interfile and interprocedural analysis.
- Find rules: search for open source and Pro rules through the [Semgrep registry search](https://semgrep.dev/r).
- Use rules: Scan your code with these rules through [Semgrep AppSec Platform](https://semgrep.dev/login)
- Contribute to rules: see [Contributing to Semgrep rules](https://semgrep.dev/docs/contributing/contributing-to-semgrep-rules-repository/) for more information.## Using the Semgrep rules repository
To start writing and using Semgrep rules, see [Learn Semgrep syntax](https://semgrep.dev/learn) and [Writing rules](https://semgrep.dev/docs/writing-rules/overview/). Then, run existing and custom Semgrep rules locally with the [Semgrep command line interface (Semgrep CLI)](https://semgrep.dev/docs/getting-started/) or [continuously with Semgrep in CI while using Semgrep AppSec Platform](https://semgrep.dev/docs/semgrep-app/getting-started-with-semgrep-app/).
## Writing Semgrep rules
See [Writing rules](https://semgrep.dev/docs/writing-rules/overview/) for information including:
- Pattern syntax, describing what Semgrep patterns can do in detail, and example use cases of the ellipsis operator, metavariables.
- Rule syntax, describing Semgrep YAML rule files, which can have multiple patterns, detailed output messages, and autofixes. The syntax allows the composition of individual patterns with boolean operators.You can also learn how to write rules using the [interactive, example-based Semgrep rule tutorial](https://semgrep.dev/learn).
## Contributing
We welcome Semgrep rule contributions directly to this repository! When submitting your contribution to this repository, we’ll ask you to make Semgrep, Inc. a joint owner of your contributions. While you still own copyright rights to your rule, joint ownership allows Semgrep, Inc. to license these contributions to other [Semgrep Registry](https://semgrep.dev/r) users pursuant to the LGPL 2.1 under the [Commons Clause](https://commonsclause.com/). See full [license details](https://github.com/returntocorp/semgrep-rules/blob/develop/LICENSE).
Note: To contribute, review the **[Contributing to Semgrep rules](https://semgrep.dev/docs/contributing/contributing-to-semgrep-rules-repository/)** documentation.
You can also contact us at [email protected] to make Semgrep rule contributions. We will import your rules for everyone to use!
## Additional information
### Help
Join [Slack](https://go.semgrep.dev/slack) for the fastest answers to your questions! Or contact the team at [email protected].
### GitHub action to run tests
If you fork this repository or create your own, you can add a GitHub Action to your workflow that will automatically test your rules using the latest version of Semgrep. See our [semgrep-rules-test example](https://github.com/returntocorp/semgrep-rules/blob/develop/.github/workflows/semgrep-rules-test.yml).
### Rulesets
Rulesets are groups of rules organized by purpose, language, or framework sourced from the Semgrep Registry. If you want to modify existing rulesets or create your own, please contact us at [email protected].