-
Notifications
You must be signed in to change notification settings - Fork 0
Posts CRUD: example Pull Request #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
https://github.com/gooroo-dev please review |
|
{mistakes: 2, typos: 1, security: 1, performance: 0, code_styling: 2, others: 1}
Yours, Gooroo.dev. Feel free to react or reply with your feedback! |
|
{mistakes: 1, typos: 1, security: 1, performance: 0, code_styling: 2, others: 0}
Yours, Gooroo.dev. I'd love to hear from you! React or reply. |
|
@gooroodev please review |
Summary of ChangesThis pull request introduces a CRUD feature for
Found Issues
Fixes1. Fix SQL Injection VulnerabilityFile: # Replace the search method with parameterized queries
def search
@posts = Post.where("title LIKE ?", "%#{params[:query]}%")
end2. Fix Typo in
|
|
Appreciate your mention, @admsev!
Summary of ChangesThis pull request introduces a CRUD functionality for posts. The changes include:
Found Issues
Code Snippets for Fixes
General Review of Code Quality and StyleThe code is generally well-structured and follows the Rails convention for CRUD operations. However, there are critical security vulnerabilities that need immediate attention, such as the SQL injection and potential XSS issues. Additionally, there are minor readability and best practices improvements that can enhance the overall code quality. It's important to ensure that all files end with a newline and that comments are added for clarity, especially for non-standard methods like -- |
|
@gooroodev can you generate tests? |
Overview of This Pull Request
This Pull Request introduces the implementation of CRUD operations for a new entity, Post. While the code is structured neatly, it contains several issues, including XSS vulnerabilities, SQL injection risks, and a typographical error.
Using Gooroo.dev
To use Gooroo.dev for code review:
@gooroo-dev review