UNPKG

mcp-server-semgrep

Version:

MCP Server for Semgrep Integration - static code analysis with AI

30 lines (29 loc) 775 B
rules: - id: rails-no-render-after-save mode: taint pattern-sources: - patterns: - pattern: $T - pattern-inside: | $T.save ... pattern-sinks: - patterns: - pattern-inside: | render $T message: Found a call to `render $T` after calling `$T.save`. Do not call `render` after calling `save` on an ActiveRecord object. Reloading the page will cause the state-changing operation to be repeated which may cause undesirable side effects. Use `redirect_to` instead. languages: - ruby severity: WARNING fix: redirect_to $T metadata: references: - https://guides.rubyonrails.org/getting_started.html#creating-a-new-article category: correctness technology: - rails - ruby - activerecord