https://github.com/dkorunic/semgrep-go
Go rules for semgrep
https://github.com/dkorunic/semgrep-go
Last synced: 5 months ago
JSON representation
Go rules for semgrep
- Host: GitHub
- URL: https://github.com/dkorunic/semgrep-go
- Owner: dkorunic
- License: mit
- Created: 2022-02-11T08:03:52.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-01-27T14:13:11.000Z (over 1 year ago)
- Last Synced: 2025-10-08T07:39:20.435Z (9 months ago)
- Size: 5.86 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# semgrep-go
## About
This repo is holding [Semgrep](https://semgrep.dev/) patterns for finding possibly problematic code.
To run individual semgrep rule on the current Go project:
```shell
semgrep -f rule.yml .
```
To run all included semgrep rules on the current Go project:
```shell
semgrep -f path/to/semgrep-go/ .
```
To make Semgrep [skip over some](https://semgrep.dev/docs/ignoring-files-folders-code/) files (ie. go-swagger or some other auto-generated files), use either `.semgrepignore` or `.gitignore`.
## Contents
- `json-without-jsoniter`: check for stdlib _json_ `Marshal()` or `Unmarshal()` use without _jsoniter_
- `err-overwrite.yml`: check if err is being overwritten in Go routines without shadow declarations