semgrep.yml 652 B

123456789101112131415161718192021222324252627
  1. # Usage: semgrep scan -f semgrep.yml
  2. rules:
  3. - id: rule-0
  4. message: "find http requests made not with *fiber.Ctx available"
  5. languages: [go]
  6. severity: WARNING
  7. patterns:
  8. - pattern-either:
  9. - pattern: |
  10. http.UnwrapWebAPIRequest(...)
  11. - pattern: |
  12. http.WebAPIRequest(...)
  13. - pattern-not-inside: |
  14. func $FUNC(c *fiber.Ctx, ...) $RET {
  15. ...
  16. }
  17. - id: rule-1
  18. message: "find http requests made (limiter should be installed at all places)"
  19. languages: [go]
  20. severity: INFO
  21. patterns:
  22. - pattern-either:
  23. - pattern: |
  24. http.UnwrapWebAPIRequest(...)
  25. - pattern: |
  26. http.WebAPIRequest(...)