dgryski.semgrep-go.timeafter.leaky-time-after

Author
581
Download Count*
License
Leaky use of time.After in for-select, see: https://groups.google.com/g/golang-nuts/c/cCdm0Ixwi9A/m/jMiJJScAEAAJ
Run Locally
Run in CI
Defintion
rules:
- id: leaky-time-after
patterns:
- pattern-either:
- pattern: |
for {
...
select {
case <- time.After(...):
...
}
...
}
message: "Leaky use of time.After in for-select, see:
https://groups.google.com/g/golang-nuts/c/cCdm0Ixwi9A/m/jMiJJScAEAAJ"
languages:
- go
severity: ERROR
metadata:
license: MIT
Short Link: https://sg.run/dgrQ