Skip to content

Conversation

@lmt-swallow
Copy link
Member

This PR adds some insecure codes to main.go. These changes will result in alerts by reviewdog and go-ruleguard.

})
r.GET("/search", func(c *gin.Context) {
title, _ := c.GetQuery("title")
query := fmt.Sprintf("select * from posts where title LIKE '%%%s%%'", title)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci] reported by reviewdog 🐶
ruleguard: A raw query is used: "select * from posts where title LIKE '%%!s(MISSING)%'", title (gocritic)

@lmt-swallow lmt-swallow self-assigned this Feb 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants