AnaTofuZ / BookmarkTarou

0 stars 0 forks source link

ユーザーのログイン機能を実装 #16

Closed AnaTofuZ closed 4 years ago

AnaTofuZ commented 4 years ago

ユーザーのログイン機能を実装

やること

github-actions[bot] commented 4 years ago

⚠ gosec Failed

Summary:
   Files: 20
   Lines: 6825
   Nosec: 0
  Issues: 104
Show Detail ``` Results: Golang errors in file: [/github/workspace/app/usr.go]: > [line 60 : column 13] - Is not declared by package errors Golang errors in file: [/github/workspace/infra/store/mysql/user_store.go]: > [line 29 : column 14] - Is not declared by package errors > [line 82 : column 14] - Is not declared by package errors [/github/workspace/infra/record/entries.go:807-809] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `entries` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, colNames), strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, entryPrimaryKeyColumns, len(o))) [/github/workspace/infra/record/users.go:1108-1109] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "SELECT `users`.* FROM `users` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, userPrimaryKeyColumns, len(*o)) [/github/workspace/infra/record/users.go:1053-1054] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "DELETE FROM `users` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, userPrimaryKeyColumns, len(o)) [/github/workspace/infra/record/users.go:896-900] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "SELECT %s FROM `users` WHERE %s", strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, ret), ","), strmangle.WhereClause("`", "`", 0, nzUniques), ) [/github/workspace/infra/record/bookmark_tag_relations.go:642-646] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmark_tag_relations` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"bookmark_id"}), strmangle.WhereClause("`", "`", 0, bookmarkTagRelationPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmark_tag_relations.go:689-693] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmark_tag_relations` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"tag_id"}), strmangle.WhereClause("`", "`", 0, bookmarkTagRelationPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmark_tag_relations.go:804] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("INSERT INTO `bookmark_tag_relations` (`%s`) %%sVALUES (%s)%%s", strings.Join(wl, "`,`"), strmangle.Placeholders(dialect.UseIndexPlaceholders, len(wl), 1, 1)) [/github/workspace/infra/record/bookmark_tag_relations.go:812] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("SELECT `%s` FROM `bookmark_tag_relations` WHERE %s", strings.Join(returnColumns, "`,`"), strmangle.WhereClause("`", "`", 0, bookmarkTagRelationPrimaryKeyColumns)) [/github/workspace/infra/record/bookmark_tag_relations.go:905-908] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `bookmark_tag_relations` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, wl), strmangle.WhereClause("`", "`", 0, bookmarkTagRelationPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmark_tag_relations.go:986-988] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `bookmark_tag_relations` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, colNames), strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, bookmarkTagRelationPrimaryKeyColumns, len(o))) [/github/workspace/infra/record/users.go:798-800] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `users` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, colNames), strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, userPrimaryKeyColumns, len(o))) [/github/workspace/infra/record/users.go:717-720] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `users` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, wl), strmangle.WhereClause("`", "`", 0, userPrimaryKeyColumns), ) [/github/workspace/infra/record/users.go:624] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("SELECT `%s` FROM `users` WHERE %s", strings.Join(returnColumns, "`,`"), strmangle.WhereClause("`", "`", 0, userPrimaryKeyColumns)) [/github/workspace/infra/record/bookmarks.go:975] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("SELECT `%s` FROM `bookmarks` WHERE %s", strings.Join(returnColumns, "`,`"), strmangle.WhereClause("`", "`", 0, bookmarkPrimaryKeyColumns)) [/github/workspace/infra/record/users.go:616] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("INSERT INTO `users` (`%s`) %%sVALUES (%s)%%s", strings.Join(wl, "`,`"), strmangle.Placeholders(dialect.UseIndexPlaceholders, len(wl), 1, 1)) [/github/workspace/infra/record/users.go:497-501] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmarks` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"user_id"}), strmangle.WhereClause("`", "`", 0, bookmarkPrimaryKeyColumns), ) [/github/workspace/infra/record/tags.go:1103-1104] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "SELECT `tags`.* FROM `tags` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, tagPrimaryKeyColumns, len(*o)) [/github/workspace/infra/record/tags.go:1048-1049] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "DELETE FROM `tags` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, tagPrimaryKeyColumns, len(o)) [/github/workspace/infra/record/tags.go:891-895] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "SELECT %s FROM `tags` WHERE %s", strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, ret), ","), strmangle.WhereClause("`", "`", 0, nzUniques), ) [/github/workspace/infra/record/bookmark_tag_relations.go:1083-1087] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "SELECT %s FROM `bookmark_tag_relations` WHERE %s", strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, ret), ","), strmangle.WhereClause("`", "`", 0, nzUniques), ) [/github/workspace/infra/record/bookmark_tag_relations.go:1240-1241] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "DELETE FROM `bookmark_tag_relations` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, bookmarkTagRelationPrimaryKeyColumns, len(o)) [/github/workspace/infra/record/bookmark_tag_relations.go:1295-1296] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "SELECT `bookmark_tag_relations`.* FROM `bookmark_tag_relations` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, bookmarkTagRelationPrimaryKeyColumns, len(*o)) [/github/workspace/infra/record/bookmarks.go:752-756] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmarks` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"user_id"}), strmangle.WhereClause("`", "`", 0, bookmarkPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmarks.go:799-803] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmarks` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"entry_id"}), strmangle.WhereClause("`", "`", 0, bookmarkPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmarks.go:848-852] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmark_tag_relations` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"bookmark_id"}), strmangle.WhereClause("`", "`", 0, bookmarkTagRelationPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmarks.go:967] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("INSERT INTO `bookmarks` (`%s`) %%sVALUES (%s)%%s", strings.Join(wl, "`,`"), strmangle.Placeholders(dialect.UseIndexPlaceholders, len(wl), 1, 1)) [/github/workspace/infra/record/tags.go:793-795] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `tags` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, colNames), strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, tagPrimaryKeyColumns, len(o))) [/github/workspace/infra/record/bookmarks.go:1068-1071] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `bookmarks` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, wl), strmangle.WhereClause("`", "`", 0, bookmarkPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmarks.go:1149-1151] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `bookmarks` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, colNames), strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, bookmarkPrimaryKeyColumns, len(o))) [/github/workspace/infra/record/tags.go:712-715] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `tags` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, wl), strmangle.WhereClause("`", "`", 0, tagPrimaryKeyColumns), ) [/github/workspace/infra/record/tags.go:619] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("SELECT `%s` FROM `tags` WHERE %s", strings.Join(returnColumns, "`,`"), strmangle.WhereClause("`", "`", 0, tagPrimaryKeyColumns)) [/github/workspace/infra/record/tags.go:611] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("INSERT INTO `tags` (`%s`) %%sVALUES (%s)%%s", strings.Join(wl, "`,`"), strmangle.Placeholders(dialect.UseIndexPlaceholders, len(wl), 1, 1)) [/github/workspace/infra/record/mysql_upsert.go:38-44] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Fprintf( buf, "INSERT INTO %s (%s) VALUES (%s) ON DUPLICATE KEY UPDATE ", tableName, columns, strmangle.Placeholders(dia.UseIndexPlaceholders, len(whitelist), 1, 1), ) [/github/workspace/infra/record/mysql_upsert.go:28-34] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Fprintf( buf, "INSERT IGNORE INTO %s (%s) VALUES (%s)", tableName, columns, strmangle.Placeholders(dia.UseIndexPlaceholders, len(whitelist), 1, 1), ) [/github/workspace/infra/record/entries.go:1117-1118] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "SELECT `entries`.* FROM `entries` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, entryPrimaryKeyColumns, len(*o)) [/github/workspace/infra/record/entries.go:1062-1063] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "DELETE FROM `entries` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, entryPrimaryKeyColumns, len(o)) [/github/workspace/infra/record/entries.go:905-909] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "SELECT %s FROM `entries` WHERE %s", strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, ret), ","), strmangle.WhereClause("`", "`", 0, nzUniques), ) [/github/workspace/infra/record/tags.go:492-496] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmark_tag_relations` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"tag_id"}), strmangle.WhereClause("`", "`", 0, bookmarkTagRelationPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmarks.go:1246-1250] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "SELECT %s FROM `bookmarks` WHERE %s", strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, ret), ","), strmangle.WhereClause("`", "`", 0, nzUniques), ) [/github/workspace/infra/record/bookmarks.go:1403-1404] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "DELETE FROM `bookmarks` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, bookmarkPrimaryKeyColumns, len(o)) [/github/workspace/infra/record/bookmarks.go:1458-1459] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "SELECT `bookmarks`.* FROM `bookmarks` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, bookmarkPrimaryKeyColumns, len(*o)) [/github/workspace/infra/record/entries.go:506-510] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmarks` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"entry_id"}), strmangle.WhereClause("`", "`", 0, bookmarkPrimaryKeyColumns), ) [/github/workspace/infra/record/entries.go:625] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("INSERT INTO `entries` (`%s`) %%sVALUES (%s)%%s", strings.Join(wl, "`,`"), strmangle.Placeholders(dialect.UseIndexPlaceholders, len(wl), 1, 1)) [/github/workspace/infra/record/entries.go:633] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("SELECT `%s` FROM `entries` WHERE %s", strings.Join(returnColumns, "`,`"), strmangle.WhereClause("`", "`", 0, entryPrimaryKeyColumns)) [/github/workspace/infra/record/entries.go:726-729] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `entries` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, wl), strmangle.WhereClause("`", "`", 0, entryPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmark_tag_relations.go:1044] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(insertColumns.Kind)) [/github/workspace/infra/record/entries.go:861] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(updateColumns.Kind)) [/github/workspace/infra/record/entries.go:863] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/entries.go:865] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/entries.go:866] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(insertColumns.Kind)) [/github/workspace/infra/record/entries.go:868] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/entries.go:870] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/bookmarks.go:1217] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/entries.go:874] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/entries.go:876] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmarks.go:1215] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/bookmarks.go:1213] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmarks.go:1211] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/bookmarks.go:1209] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmarks.go:1207] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(insertColumns.Kind)) [/github/workspace/infra/record/mysql_upsert.go:48] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte(',') [/github/workspace/infra/record/mysql_upsert.go:51] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(quoted) [/github/workspace/infra/record/mysql_upsert.go:52] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(" = VALUES(") [/github/workspace/infra/record/mysql_upsert.go:53] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(quoted) [/github/workspace/infra/record/mysql_upsert.go:54] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte(')') [/github/workspace/infra/record/entries.go:872] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmarks.go:1206] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/bookmarks.go:1204] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmarks.go:1202] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(updateColumns.Kind)) [/github/workspace/infra/record/boil_types.go:37] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(cols.Kind)) [/github/workspace/infra/record/tags.go:847] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(updateColumns.Kind)) [/github/workspace/infra/record/tags.go:849] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/tags.go:851] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/tags.go:852] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(insertColumns.Kind)) [/github/workspace/infra/record/tags.go:854] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/tags.go:856] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/tags.go:858] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/tags.go:860] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/tags.go:862] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmark_tag_relations.go:1054] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmark_tag_relations.go:1052] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/bookmark_tag_relations.go:1050] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmark_tag_relations.go:1048] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/bookmark_tag_relations.go:1046] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmark_tag_relations.go:1043] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/bookmark_tag_relations.go:1041] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmark_tag_relations.go:1039] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(updateColumns.Kind)) [/github/workspace/infra/record/users.go:852] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(updateColumns.Kind)) [/github/workspace/infra/record/users.go:854] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/users.go:856] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/users.go:857] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(insertColumns.Kind)) [/github/workspace/infra/record/users.go:859] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/users.go:861] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/users.go:863] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/users.go:865] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/users.go:867] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/boil_types.go:46] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(nz) [/github/workspace/infra/record/boil_types.go:43] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/boil_types.go:39] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(w) [/github/workspace/infra/store/mysql/user_store.go:43] - G103 (CWE-242): Use of unsafe calls should be audited (Confidence: HIGH, Severity: LOW) > unsafe.Pointer(&name) [/github/workspace/infra/store/mysql/user_store.go:53] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > tx.Rollback() [/github/workspace/infra/store/mysql/user_store.go:59] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > tx.Rollback() [/github/workspace/infra/store/mysql/user_store.go:92] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > tx.Rollback() [/github/workspace/infra/store/mysql/user_store.go:97] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > tx.Rollback() Summary: Files: 20 Lines: 6825 Nosec: 0 Issues: 104 ``` [Code Reference](https://github.com/securego/gosec#available-rules)
github-actions[bot] commented 4 years ago

⚠ vet Failed

# github.com/anatofuz/BookmarkTarou/infra/store/mysql
infra/store/mysql/user_store.go:29:7: undefined: errors.Is
infra/store/mysql/user_store.go:82:7: undefined: errors.Is
note: module requires Go 1.13
# github.com/anatofuz/BookmarkTarou/app
app/usr.go:60:6: undefined: errors.Is
note: module requires Go 1.13
github-actions[bot] commented 4 years ago

⚠ gosec Failed

Summary:
   Files: 20
   Lines: 6820
   Nosec: 0
  Issues: 104
Show Detail ``` Results: Golang errors in file: [/github/workspace/app/usr.go]: > [line 60 : column 13] - Is not declared by package errors Golang errors in file: [/github/workspace/infra/store/mysql/user_store.go]: > [line 29 : column 14] - Is not declared by package errors > [line 82 : column 14] - Is not declared by package errors [/github/workspace/infra/record/entries.go:807-809] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `entries` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, colNames), strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, entryPrimaryKeyColumns, len(o))) [/github/workspace/infra/record/users.go:1108-1109] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "SELECT `users`.* FROM `users` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, userPrimaryKeyColumns, len(*o)) [/github/workspace/infra/record/users.go:1053-1054] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "DELETE FROM `users` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, userPrimaryKeyColumns, len(o)) [/github/workspace/infra/record/users.go:896-900] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "SELECT %s FROM `users` WHERE %s", strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, ret), ","), strmangle.WhereClause("`", "`", 0, nzUniques), ) [/github/workspace/infra/record/bookmark_tag_relations.go:642-646] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmark_tag_relations` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"bookmark_id"}), strmangle.WhereClause("`", "`", 0, bookmarkTagRelationPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmark_tag_relations.go:689-693] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmark_tag_relations` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"tag_id"}), strmangle.WhereClause("`", "`", 0, bookmarkTagRelationPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmark_tag_relations.go:804] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("INSERT INTO `bookmark_tag_relations` (`%s`) %%sVALUES (%s)%%s", strings.Join(wl, "`,`"), strmangle.Placeholders(dialect.UseIndexPlaceholders, len(wl), 1, 1)) [/github/workspace/infra/record/bookmark_tag_relations.go:812] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("SELECT `%s` FROM `bookmark_tag_relations` WHERE %s", strings.Join(returnColumns, "`,`"), strmangle.WhereClause("`", "`", 0, bookmarkTagRelationPrimaryKeyColumns)) [/github/workspace/infra/record/bookmark_tag_relations.go:905-908] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `bookmark_tag_relations` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, wl), strmangle.WhereClause("`", "`", 0, bookmarkTagRelationPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmark_tag_relations.go:986-988] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `bookmark_tag_relations` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, colNames), strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, bookmarkTagRelationPrimaryKeyColumns, len(o))) [/github/workspace/infra/record/users.go:798-800] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `users` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, colNames), strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, userPrimaryKeyColumns, len(o))) [/github/workspace/infra/record/users.go:717-720] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `users` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, wl), strmangle.WhereClause("`", "`", 0, userPrimaryKeyColumns), ) [/github/workspace/infra/record/users.go:624] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("SELECT `%s` FROM `users` WHERE %s", strings.Join(returnColumns, "`,`"), strmangle.WhereClause("`", "`", 0, userPrimaryKeyColumns)) [/github/workspace/infra/record/bookmarks.go:975] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("SELECT `%s` FROM `bookmarks` WHERE %s", strings.Join(returnColumns, "`,`"), strmangle.WhereClause("`", "`", 0, bookmarkPrimaryKeyColumns)) [/github/workspace/infra/record/users.go:616] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("INSERT INTO `users` (`%s`) %%sVALUES (%s)%%s", strings.Join(wl, "`,`"), strmangle.Placeholders(dialect.UseIndexPlaceholders, len(wl), 1, 1)) [/github/workspace/infra/record/users.go:497-501] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmarks` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"user_id"}), strmangle.WhereClause("`", "`", 0, bookmarkPrimaryKeyColumns), ) [/github/workspace/infra/record/tags.go:1103-1104] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "SELECT `tags`.* FROM `tags` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, tagPrimaryKeyColumns, len(*o)) [/github/workspace/infra/record/tags.go:1048-1049] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "DELETE FROM `tags` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, tagPrimaryKeyColumns, len(o)) [/github/workspace/infra/record/tags.go:891-895] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "SELECT %s FROM `tags` WHERE %s", strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, ret), ","), strmangle.WhereClause("`", "`", 0, nzUniques), ) [/github/workspace/infra/record/bookmark_tag_relations.go:1083-1087] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "SELECT %s FROM `bookmark_tag_relations` WHERE %s", strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, ret), ","), strmangle.WhereClause("`", "`", 0, nzUniques), ) [/github/workspace/infra/record/bookmark_tag_relations.go:1240-1241] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "DELETE FROM `bookmark_tag_relations` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, bookmarkTagRelationPrimaryKeyColumns, len(o)) [/github/workspace/infra/record/bookmark_tag_relations.go:1295-1296] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "SELECT `bookmark_tag_relations`.* FROM `bookmark_tag_relations` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, bookmarkTagRelationPrimaryKeyColumns, len(*o)) [/github/workspace/infra/record/bookmarks.go:752-756] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmarks` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"user_id"}), strmangle.WhereClause("`", "`", 0, bookmarkPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmarks.go:799-803] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmarks` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"entry_id"}), strmangle.WhereClause("`", "`", 0, bookmarkPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmarks.go:848-852] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmark_tag_relations` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"bookmark_id"}), strmangle.WhereClause("`", "`", 0, bookmarkTagRelationPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmarks.go:967] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("INSERT INTO `bookmarks` (`%s`) %%sVALUES (%s)%%s", strings.Join(wl, "`,`"), strmangle.Placeholders(dialect.UseIndexPlaceholders, len(wl), 1, 1)) [/github/workspace/infra/record/tags.go:793-795] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `tags` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, colNames), strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, tagPrimaryKeyColumns, len(o))) [/github/workspace/infra/record/bookmarks.go:1068-1071] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `bookmarks` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, wl), strmangle.WhereClause("`", "`", 0, bookmarkPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmarks.go:1149-1151] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `bookmarks` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, colNames), strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, bookmarkPrimaryKeyColumns, len(o))) [/github/workspace/infra/record/tags.go:712-715] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `tags` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, wl), strmangle.WhereClause("`", "`", 0, tagPrimaryKeyColumns), ) [/github/workspace/infra/record/tags.go:619] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("SELECT `%s` FROM `tags` WHERE %s", strings.Join(returnColumns, "`,`"), strmangle.WhereClause("`", "`", 0, tagPrimaryKeyColumns)) [/github/workspace/infra/record/tags.go:611] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("INSERT INTO `tags` (`%s`) %%sVALUES (%s)%%s", strings.Join(wl, "`,`"), strmangle.Placeholders(dialect.UseIndexPlaceholders, len(wl), 1, 1)) [/github/workspace/infra/record/mysql_upsert.go:38-44] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Fprintf( buf, "INSERT INTO %s (%s) VALUES (%s) ON DUPLICATE KEY UPDATE ", tableName, columns, strmangle.Placeholders(dia.UseIndexPlaceholders, len(whitelist), 1, 1), ) [/github/workspace/infra/record/mysql_upsert.go:28-34] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Fprintf( buf, "INSERT IGNORE INTO %s (%s) VALUES (%s)", tableName, columns, strmangle.Placeholders(dia.UseIndexPlaceholders, len(whitelist), 1, 1), ) [/github/workspace/infra/record/entries.go:1117-1118] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "SELECT `entries`.* FROM `entries` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, entryPrimaryKeyColumns, len(*o)) [/github/workspace/infra/record/entries.go:1062-1063] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "DELETE FROM `entries` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, entryPrimaryKeyColumns, len(o)) [/github/workspace/infra/record/entries.go:905-909] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "SELECT %s FROM `entries` WHERE %s", strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, ret), ","), strmangle.WhereClause("`", "`", 0, nzUniques), ) [/github/workspace/infra/record/tags.go:492-496] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmark_tag_relations` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"tag_id"}), strmangle.WhereClause("`", "`", 0, bookmarkTagRelationPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmarks.go:1246-1250] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "SELECT %s FROM `bookmarks` WHERE %s", strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, ret), ","), strmangle.WhereClause("`", "`", 0, nzUniques), ) [/github/workspace/infra/record/bookmarks.go:1403-1404] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "DELETE FROM `bookmarks` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, bookmarkPrimaryKeyColumns, len(o)) [/github/workspace/infra/record/bookmarks.go:1458-1459] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "SELECT `bookmarks`.* FROM `bookmarks` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, bookmarkPrimaryKeyColumns, len(*o)) [/github/workspace/infra/record/entries.go:506-510] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmarks` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"entry_id"}), strmangle.WhereClause("`", "`", 0, bookmarkPrimaryKeyColumns), ) [/github/workspace/infra/record/entries.go:625] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("INSERT INTO `entries` (`%s`) %%sVALUES (%s)%%s", strings.Join(wl, "`,`"), strmangle.Placeholders(dialect.UseIndexPlaceholders, len(wl), 1, 1)) [/github/workspace/infra/record/entries.go:633] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("SELECT `%s` FROM `entries` WHERE %s", strings.Join(returnColumns, "`,`"), strmangle.WhereClause("`", "`", 0, entryPrimaryKeyColumns)) [/github/workspace/infra/record/entries.go:726-729] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `entries` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, wl), strmangle.WhereClause("`", "`", 0, entryPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmark_tag_relations.go:1044] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(insertColumns.Kind)) [/github/workspace/infra/record/entries.go:861] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(updateColumns.Kind)) [/github/workspace/infra/record/entries.go:863] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/entries.go:865] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/entries.go:866] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(insertColumns.Kind)) [/github/workspace/infra/record/entries.go:868] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/entries.go:870] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/bookmarks.go:1217] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/entries.go:874] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/entries.go:876] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmarks.go:1215] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/bookmarks.go:1213] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmarks.go:1211] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/bookmarks.go:1209] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmarks.go:1207] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(insertColumns.Kind)) [/github/workspace/infra/record/mysql_upsert.go:48] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte(',') [/github/workspace/infra/record/mysql_upsert.go:51] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(quoted) [/github/workspace/infra/record/mysql_upsert.go:52] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(" = VALUES(") [/github/workspace/infra/record/mysql_upsert.go:53] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(quoted) [/github/workspace/infra/record/mysql_upsert.go:54] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte(')') [/github/workspace/infra/record/entries.go:872] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmarks.go:1206] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/bookmarks.go:1204] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmarks.go:1202] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(updateColumns.Kind)) [/github/workspace/infra/record/boil_types.go:37] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(cols.Kind)) [/github/workspace/infra/record/tags.go:847] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(updateColumns.Kind)) [/github/workspace/infra/record/tags.go:849] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/tags.go:851] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/tags.go:852] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(insertColumns.Kind)) [/github/workspace/infra/record/tags.go:854] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/tags.go:856] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/tags.go:858] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/tags.go:860] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/tags.go:862] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmark_tag_relations.go:1054] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmark_tag_relations.go:1052] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/bookmark_tag_relations.go:1050] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmark_tag_relations.go:1048] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/bookmark_tag_relations.go:1046] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmark_tag_relations.go:1043] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/bookmark_tag_relations.go:1041] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmark_tag_relations.go:1039] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(updateColumns.Kind)) [/github/workspace/infra/record/users.go:852] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(updateColumns.Kind)) [/github/workspace/infra/record/users.go:854] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/users.go:856] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/users.go:857] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(insertColumns.Kind)) [/github/workspace/infra/record/users.go:859] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/users.go:861] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/users.go:863] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/users.go:865] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/users.go:867] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/boil_types.go:46] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(nz) [/github/workspace/infra/record/boil_types.go:43] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/boil_types.go:39] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(w) [/github/workspace/infra/store/mysql/user_store.go:43] - G103 (CWE-242): Use of unsafe calls should be audited (Confidence: HIGH, Severity: LOW) > unsafe.Pointer(&name) [/github/workspace/infra/store/mysql/user_store.go:53] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > tx.Rollback() [/github/workspace/infra/store/mysql/user_store.go:59] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > tx.Rollback() [/github/workspace/infra/store/mysql/user_store.go:92] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > tx.Rollback() [/github/workspace/infra/store/mysql/user_store.go:97] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > tx.Rollback() Summary: Files: 20 Lines: 6820 Nosec: 0 Issues: 104 ``` [Code Reference](https://github.com/securego/gosec#available-rules)
github-actions[bot] commented 4 years ago

⚠ errcheck Failed

error: failed to check packages: errors while loading package github.com/anatofuz/BookmarkTarou/infra/store/mysql: [/github/workspace/infra/store/mysql/user_store.go:82:14: Is not declared by package errors /github/workspace/infra/store/mysql/user_store.go:29:14: Is not declared by package errors]
github-actions[bot] commented 4 years ago

⚠ staticcheck Failed

-: could not analyze dependency github.com/anatofuz/BookmarkTarou/app of github.com/anatofuz/BookmarkTarou/web (compile)
-: could not analyze dependency github.com/anatofuz/BookmarkTarou/app/config of github.com/anatofuz/BookmarkTarou (compile)
-: could not analyze dependency github.com/anatofuz/BookmarkTarou/infra/store/mysql of github.com/anatofuz/BookmarkTarou/app/config (compile)
app/usr.go:60:13: Is not declared by package errors (compile)
infra/store/mysql/user_store.go:82:14: Is not declared by package errors (compile)
model/user.go:21:5: error var UserErrNotFound should have name of the form ErrFoo (ST1012)

Checks Document

github-actions[bot] commented 4 years ago

⚠ gofmt Failed

app/config/config.go ```diff } type appComponentImpl struct { - bookmarkDB *sql.DB + bookmarkDB *sql.DB userSessionRedis *redis.Client } - type config struct { port int dsn string } return &appComponentImpl{ - bookmarkDB: db, - userSessionRedis:client, + bookmarkDB: db, + userSessionRedis: client, }, nil } ```
app/usr.go ```diff userStore store.UserStore } - func NewUserApp(userStore store.UserStore) UserApp { return &UserAppImpl{userStore: userStore} } if err != nil { return nil, fmt.Errorf("failed CreateUser: %w", err) } - usrWP, err := u.userStore.GetPasswordWithUserFromName(ctx,name) + usrWP, err := u.userStore.GetPasswordWithUserFromName(ctx, name) - if err := bcrypt.CompareHashAndPassword(hashedPass,usrWP.Pw); err != nil { + if err := bcrypt.CompareHashAndPassword(hashedPass, usrWP.Pw); err != nil { if err == bcrypt.ErrMismatchedHashAndPassword { return nil, nil } - return nil, fmt.Errorf("failed login: %w",err) + return nil, fmt.Errorf("failed login: %w", err) } - return &usrWP.User,nil + return &usrWP.User, nil } ```
infra/store/kvs/user_session_store.go ```diff client *redis.Client } - -func NewRedisStore(client *redis.Client) store.UserSessionStore{ - return &redisStore{client:client} +func NewRedisStore(client *redis.Client) store.UserSessionStore { + return &redisStore{client: client} } func (r redisStore) Get(token string) (*model.User, error) { ```
web/user.go ```diff return fmt.Errorf("failed signup: %w", err) } return c.Render(http.StatusOK, "index.tmpl", map[string]interface{}{ - "User":usr, + "User": usr, }) } ```
github-actions[bot] commented 4 years ago

⚠ golint Failed

Found 13 lint suggestions; failing.

Show Detail ``` app/usr.go:13:6: exported type UserApp should have comment or be unexported app/usr.go:19:6: exported type UserAppImpl should have comment or be unexported app/usr.go:24:1: exported function NewUserApp should have comment or be unexported app/usr.go:28:1: exported method UserAppImpl.Create should have comment or be unexported app/usr.go:47:1: exported method UserAppImpl.SignUp should have comment or be unexported app/usr.go:72:1: exported method UserAppImpl.SignIn should have comment or be unexported app/config/config.go:14:2: a blank import should be only in a main or test package, or have a comment justifying it infra/store/user_session_store.go:5:6: exported type UserSessionStore should have comment or be unexported infra/store/kvs/user_session_store.go:17:1: exported function NewRedisStore should have comment or be unexported model/user.go:21:5: error var UserErrNotFound should have name of the form ErrFoo web/perform.go:8:6: exported type Handler should have comment or be unexported web/perform.go:12:6: exported type HandlerImpl should have comment or be unexported web/perform.go:15:1: exported function CreateHandlerImpl should have comment or be unexported ```
github-actions[bot] commented 4 years ago

⚠ vet Failed

# github.com/anatofuz/BookmarkTarou/infra/store/mysql
infra/store/mysql/user_store.go:29:7: undefined: errors.Is
infra/store/mysql/user_store.go:82:7: undefined: errors.Is
note: module requires Go 1.13
# github.com/anatofuz/BookmarkTarou/app
app/usr.go:61:6: undefined: errors.Is
note: module requires Go 1.13
# github.com/anatofuz/BookmarkTarou/infra/store/kvs
infra/store/kvs/user_session_store.go:26:15: Errorf format %w has unknown verb w
infra/store/kvs/user_session_store.go:29:15: Errorf format %w has unknown verb w
infra/store/kvs/user_session_store.go:37:10: Errorf format %w has unknown verb w
infra/store/kvs/user_session_store.go:41:10: Errorf format %w has unknown verb w
github-actions[bot] commented 4 years ago

⚠ errcheck Failed

error: failed to check packages: errors while loading package github.com/anatofuz/BookmarkTarou/infra/store/mysql: [/github/workspace/infra/store/mysql/user_store.go:82:14: Is not declared by package errors /github/workspace/infra/store/mysql/user_store.go:29:14: Is not declared by package errors]
github-actions[bot] commented 4 years ago

⚠ gosec Failed

Summary:
   Files: 22
   Lines: 6925
   Nosec: 0
  Issues: 104
Show Detail ``` Results: Golang errors in file: [/github/workspace/app/usr.go]: > [line 61 : column 13] - Is not declared by package errors Golang errors in file: [/github/workspace/infra/store/mysql/user_store.go]: > [line 29 : column 14] - Is not declared by package errors > [line 82 : column 14] - Is not declared by package errors [/github/workspace/infra/record/entries.go:807-809] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `entries` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, colNames), strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, entryPrimaryKeyColumns, len(o))) [/github/workspace/infra/record/users.go:1108-1109] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "SELECT `users`.* FROM `users` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, userPrimaryKeyColumns, len(*o)) [/github/workspace/infra/record/users.go:1053-1054] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "DELETE FROM `users` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, userPrimaryKeyColumns, len(o)) [/github/workspace/infra/record/users.go:896-900] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "SELECT %s FROM `users` WHERE %s", strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, ret), ","), strmangle.WhereClause("`", "`", 0, nzUniques), ) [/github/workspace/infra/record/bookmark_tag_relations.go:642-646] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmark_tag_relations` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"bookmark_id"}), strmangle.WhereClause("`", "`", 0, bookmarkTagRelationPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmark_tag_relations.go:689-693] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmark_tag_relations` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"tag_id"}), strmangle.WhereClause("`", "`", 0, bookmarkTagRelationPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmark_tag_relations.go:804] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("INSERT INTO `bookmark_tag_relations` (`%s`) %%sVALUES (%s)%%s", strings.Join(wl, "`,`"), strmangle.Placeholders(dialect.UseIndexPlaceholders, len(wl), 1, 1)) [/github/workspace/infra/record/bookmark_tag_relations.go:812] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("SELECT `%s` FROM `bookmark_tag_relations` WHERE %s", strings.Join(returnColumns, "`,`"), strmangle.WhereClause("`", "`", 0, bookmarkTagRelationPrimaryKeyColumns)) [/github/workspace/infra/record/bookmark_tag_relations.go:905-908] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `bookmark_tag_relations` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, wl), strmangle.WhereClause("`", "`", 0, bookmarkTagRelationPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmark_tag_relations.go:986-988] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `bookmark_tag_relations` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, colNames), strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, bookmarkTagRelationPrimaryKeyColumns, len(o))) [/github/workspace/infra/record/users.go:798-800] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `users` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, colNames), strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, userPrimaryKeyColumns, len(o))) [/github/workspace/infra/record/users.go:717-720] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `users` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, wl), strmangle.WhereClause("`", "`", 0, userPrimaryKeyColumns), ) [/github/workspace/infra/record/users.go:624] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("SELECT `%s` FROM `users` WHERE %s", strings.Join(returnColumns, "`,`"), strmangle.WhereClause("`", "`", 0, userPrimaryKeyColumns)) [/github/workspace/infra/record/bookmarks.go:975] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("SELECT `%s` FROM `bookmarks` WHERE %s", strings.Join(returnColumns, "`,`"), strmangle.WhereClause("`", "`", 0, bookmarkPrimaryKeyColumns)) [/github/workspace/infra/record/users.go:616] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("INSERT INTO `users` (`%s`) %%sVALUES (%s)%%s", strings.Join(wl, "`,`"), strmangle.Placeholders(dialect.UseIndexPlaceholders, len(wl), 1, 1)) [/github/workspace/infra/record/users.go:497-501] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmarks` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"user_id"}), strmangle.WhereClause("`", "`", 0, bookmarkPrimaryKeyColumns), ) [/github/workspace/infra/record/tags.go:1103-1104] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "SELECT `tags`.* FROM `tags` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, tagPrimaryKeyColumns, len(*o)) [/github/workspace/infra/record/tags.go:1048-1049] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "DELETE FROM `tags` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, tagPrimaryKeyColumns, len(o)) [/github/workspace/infra/record/tags.go:891-895] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "SELECT %s FROM `tags` WHERE %s", strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, ret), ","), strmangle.WhereClause("`", "`", 0, nzUniques), ) [/github/workspace/infra/record/bookmark_tag_relations.go:1083-1087] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "SELECT %s FROM `bookmark_tag_relations` WHERE %s", strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, ret), ","), strmangle.WhereClause("`", "`", 0, nzUniques), ) [/github/workspace/infra/record/bookmark_tag_relations.go:1240-1241] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "DELETE FROM `bookmark_tag_relations` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, bookmarkTagRelationPrimaryKeyColumns, len(o)) [/github/workspace/infra/record/bookmark_tag_relations.go:1295-1296] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "SELECT `bookmark_tag_relations`.* FROM `bookmark_tag_relations` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, bookmarkTagRelationPrimaryKeyColumns, len(*o)) [/github/workspace/infra/record/bookmarks.go:752-756] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmarks` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"user_id"}), strmangle.WhereClause("`", "`", 0, bookmarkPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmarks.go:799-803] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmarks` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"entry_id"}), strmangle.WhereClause("`", "`", 0, bookmarkPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmarks.go:848-852] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmark_tag_relations` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"bookmark_id"}), strmangle.WhereClause("`", "`", 0, bookmarkTagRelationPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmarks.go:967] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("INSERT INTO `bookmarks` (`%s`) %%sVALUES (%s)%%s", strings.Join(wl, "`,`"), strmangle.Placeholders(dialect.UseIndexPlaceholders, len(wl), 1, 1)) [/github/workspace/infra/record/tags.go:793-795] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `tags` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, colNames), strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, tagPrimaryKeyColumns, len(o))) [/github/workspace/infra/record/bookmarks.go:1068-1071] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `bookmarks` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, wl), strmangle.WhereClause("`", "`", 0, bookmarkPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmarks.go:1149-1151] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `bookmarks` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, colNames), strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, bookmarkPrimaryKeyColumns, len(o))) [/github/workspace/infra/record/tags.go:712-715] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `tags` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, wl), strmangle.WhereClause("`", "`", 0, tagPrimaryKeyColumns), ) [/github/workspace/infra/record/tags.go:619] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("SELECT `%s` FROM `tags` WHERE %s", strings.Join(returnColumns, "`,`"), strmangle.WhereClause("`", "`", 0, tagPrimaryKeyColumns)) [/github/workspace/infra/record/tags.go:611] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("INSERT INTO `tags` (`%s`) %%sVALUES (%s)%%s", strings.Join(wl, "`,`"), strmangle.Placeholders(dialect.UseIndexPlaceholders, len(wl), 1, 1)) [/github/workspace/infra/record/mysql_upsert.go:38-44] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Fprintf( buf, "INSERT INTO %s (%s) VALUES (%s) ON DUPLICATE KEY UPDATE ", tableName, columns, strmangle.Placeholders(dia.UseIndexPlaceholders, len(whitelist), 1, 1), ) [/github/workspace/infra/record/mysql_upsert.go:28-34] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Fprintf( buf, "INSERT IGNORE INTO %s (%s) VALUES (%s)", tableName, columns, strmangle.Placeholders(dia.UseIndexPlaceholders, len(whitelist), 1, 1), ) [/github/workspace/infra/record/entries.go:1117-1118] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "SELECT `entries`.* FROM `entries` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, entryPrimaryKeyColumns, len(*o)) [/github/workspace/infra/record/entries.go:1062-1063] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "DELETE FROM `entries` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, entryPrimaryKeyColumns, len(o)) [/github/workspace/infra/record/entries.go:905-909] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "SELECT %s FROM `entries` WHERE %s", strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, ret), ","), strmangle.WhereClause("`", "`", 0, nzUniques), ) [/github/workspace/infra/record/tags.go:492-496] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmark_tag_relations` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"tag_id"}), strmangle.WhereClause("`", "`", 0, bookmarkTagRelationPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmarks.go:1246-1250] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "SELECT %s FROM `bookmarks` WHERE %s", strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, ret), ","), strmangle.WhereClause("`", "`", 0, nzUniques), ) [/github/workspace/infra/record/bookmarks.go:1403-1404] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "DELETE FROM `bookmarks` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, bookmarkPrimaryKeyColumns, len(o)) [/github/workspace/infra/record/bookmarks.go:1458-1459] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "SELECT `bookmarks`.* FROM `bookmarks` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, bookmarkPrimaryKeyColumns, len(*o)) [/github/workspace/infra/record/entries.go:506-510] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmarks` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"entry_id"}), strmangle.WhereClause("`", "`", 0, bookmarkPrimaryKeyColumns), ) [/github/workspace/infra/record/entries.go:625] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("INSERT INTO `entries` (`%s`) %%sVALUES (%s)%%s", strings.Join(wl, "`,`"), strmangle.Placeholders(dialect.UseIndexPlaceholders, len(wl), 1, 1)) [/github/workspace/infra/record/entries.go:633] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("SELECT `%s` FROM `entries` WHERE %s", strings.Join(returnColumns, "`,`"), strmangle.WhereClause("`", "`", 0, entryPrimaryKeyColumns)) [/github/workspace/infra/record/entries.go:726-729] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `entries` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, wl), strmangle.WhereClause("`", "`", 0, entryPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmark_tag_relations.go:1044] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(insertColumns.Kind)) [/github/workspace/infra/record/entries.go:861] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(updateColumns.Kind)) [/github/workspace/infra/record/entries.go:863] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/entries.go:865] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/entries.go:866] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(insertColumns.Kind)) [/github/workspace/infra/record/entries.go:868] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/entries.go:870] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/bookmarks.go:1217] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/entries.go:874] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/entries.go:876] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmarks.go:1215] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/bookmarks.go:1213] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmarks.go:1211] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/bookmarks.go:1209] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmarks.go:1207] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(insertColumns.Kind)) [/github/workspace/infra/record/mysql_upsert.go:48] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte(',') [/github/workspace/infra/record/mysql_upsert.go:51] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(quoted) [/github/workspace/infra/record/mysql_upsert.go:52] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(" = VALUES(") [/github/workspace/infra/record/mysql_upsert.go:53] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(quoted) [/github/workspace/infra/record/mysql_upsert.go:54] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte(')') [/github/workspace/infra/record/entries.go:872] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmarks.go:1206] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/bookmarks.go:1204] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmarks.go:1202] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(updateColumns.Kind)) [/github/workspace/infra/record/boil_types.go:37] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(cols.Kind)) [/github/workspace/infra/record/tags.go:847] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(updateColumns.Kind)) [/github/workspace/infra/record/tags.go:849] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/tags.go:851] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/tags.go:852] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(insertColumns.Kind)) [/github/workspace/infra/record/tags.go:854] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/tags.go:856] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/tags.go:858] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/tags.go:860] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/tags.go:862] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmark_tag_relations.go:1054] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmark_tag_relations.go:1052] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/bookmark_tag_relations.go:1050] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmark_tag_relations.go:1048] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/bookmark_tag_relations.go:1046] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmark_tag_relations.go:1043] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/bookmark_tag_relations.go:1041] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmark_tag_relations.go:1039] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(updateColumns.Kind)) [/github/workspace/infra/record/users.go:852] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(updateColumns.Kind)) [/github/workspace/infra/record/users.go:854] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/users.go:856] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/users.go:857] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(insertColumns.Kind)) [/github/workspace/infra/record/users.go:859] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/users.go:861] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/users.go:863] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/users.go:865] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/users.go:867] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/boil_types.go:46] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(nz) [/github/workspace/infra/record/boil_types.go:43] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/boil_types.go:39] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(w) [/github/workspace/infra/store/mysql/user_store.go:43] - G103 (CWE-242): Use of unsafe calls should be audited (Confidence: HIGH, Severity: LOW) > unsafe.Pointer(&name) [/github/workspace/infra/store/mysql/user_store.go:53] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > tx.Rollback() [/github/workspace/infra/store/mysql/user_store.go:59] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > tx.Rollback() [/github/workspace/infra/store/mysql/user_store.go:92] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > tx.Rollback() [/github/workspace/infra/store/mysql/user_store.go:97] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > tx.Rollback() Summary: Files: 22 Lines: 6925 Nosec: 0 Issues: 104 ``` [Code Reference](https://github.com/securego/gosec#available-rules)
github-actions[bot] commented 4 years ago

⚠ staticcheck Failed

-: could not analyze dependency github.com/anatofuz/BookmarkTarou/app of github.com/anatofuz/BookmarkTarou/web (compile)
-: could not analyze dependency github.com/anatofuz/BookmarkTarou/app/config of github.com/anatofuz/BookmarkTarou (compile)
-: could not analyze dependency github.com/anatofuz/BookmarkTarou/infra/store/mysql of github.com/anatofuz/BookmarkTarou/app/config (compile)
app/usr.go:61:13: Is not declared by package errors (compile)
infra/store/mysql/user_store.go:82:14: Is not declared by package errors (compile)
model/user.go:21:5: error var UserErrNotFound should have name of the form ErrFoo (ST1012)

Checks Document

github-actions[bot] commented 4 years ago

⚠ golint Failed

Found 13 lint suggestions; failing.

Show Detail ``` app/usr.go:13:6: exported type UserApp should have comment or be unexported app/usr.go:19:6: exported type UserAppImpl should have comment or be unexported app/usr.go:24:1: exported function NewUserApp should have comment or be unexported app/usr.go:28:1: exported method UserAppImpl.Create should have comment or be unexported app/usr.go:47:1: exported method UserAppImpl.SignUp should have comment or be unexported app/usr.go:72:1: exported method UserAppImpl.SignIn should have comment or be unexported app/config/config.go:14:2: a blank import should be only in a main or test package, or have a comment justifying it infra/store/user_session_store.go:5:6: exported type UserSessionStore should have comment or be unexported infra/store/kvs/user_session_store.go:17:1: exported function NewRedisStore should have comment or be unexported model/user.go:21:5: error var UserErrNotFound should have name of the form ErrFoo web/perform.go:8:6: exported type Handler should have comment or be unexported web/perform.go:12:6: exported type HandlerImpl should have comment or be unexported web/perform.go:15:1: exported function CreateHandlerImpl should have comment or be unexported ```
github-actions[bot] commented 4 years ago

⚠ gofmt Failed

app/config/config.go ```diff } type appComponentImpl struct { - bookmarkDB *sql.DB + bookmarkDB *sql.DB userSessionRedis *redis.Client } - type config struct { port int dsn string } return &appComponentImpl{ - bookmarkDB: db, - userSessionRedis:client, + bookmarkDB: db, + userSessionRedis: client, }, nil } ```
app/usr.go ```diff userStore store.UserStore } - func NewUserApp(userStore store.UserStore) UserApp { return &UserAppImpl{userStore: userStore} } if err != nil { return nil, fmt.Errorf("failed CreateUser: %w", err) } - usrWP, err := u.userStore.GetPasswordWithUserFromName(ctx,name) + usrWP, err := u.userStore.GetPasswordWithUserFromName(ctx, name) - if err := bcrypt.CompareHashAndPassword(hashedPass,usrWP.Pw); err != nil { + if err := bcrypt.CompareHashAndPassword(hashedPass, usrWP.Pw); err != nil { if err == bcrypt.ErrMismatchedHashAndPassword { return nil, nil } - return nil, fmt.Errorf("failed login: %w",err) + return nil, fmt.Errorf("failed login: %w", err) } - return &usrWP.User,nil + return &usrWP.User, nil } ```
infra/store/kvs/user_session_store.go ```diff client *redis.Client } - -func NewRedisStore(client *redis.Client) store.UserSessionStore{ - return &redisStore{client:client} +func NewRedisStore(client *redis.Client) store.UserSessionStore { + return &redisStore{client: client} } func (r redisStore) Get(token string) (*model.User, error) { ```
web/user.go ```diff return fmt.Errorf("failed signup: %w", err) } return c.Render(http.StatusOK, "index.tmpl", map[string]interface{}{ - "User":usr, + "User": usr, }) } ```
github-actions[bot] commented 4 years ago

⚠ golint Failed

Found 13 lint suggestions; failing.

Show Detail ``` app/usr.go:13:6: exported type UserApp should have comment or be unexported app/usr.go:19:6: exported type UserAppImpl should have comment or be unexported app/usr.go:24:1: exported function NewUserApp should have comment or be unexported app/usr.go:28:1: exported method UserAppImpl.Create should have comment or be unexported app/usr.go:47:1: exported method UserAppImpl.SignUp should have comment or be unexported app/usr.go:72:1: exported method UserAppImpl.SignIn should have comment or be unexported app/config/config.go:14:2: a blank import should be only in a main or test package, or have a comment justifying it infra/store/user_session_store.go:5:6: exported type UserSessionStore should have comment or be unexported infra/store/kvs/user_session_store.go:17:1: exported function NewRedisStore should have comment or be unexported model/user.go:21:5: error var UserErrNotFound should have name of the form ErrFoo web/perform.go:8:6: exported type Handler should have comment or be unexported web/perform.go:12:6: exported type HandlerImpl should have comment or be unexported web/perform.go:15:1: exported function CreateHandlerImpl should have comment or be unexported ```
github-actions[bot] commented 4 years ago

⚠ gosec Failed

Summary:
   Files: 22
   Lines: 6925
   Nosec: 0
  Issues: 104
Show Detail ``` Results: Golang errors in file: [/github/workspace/app/usr.go]: > [line 61 : column 13] - Is not declared by package errors Golang errors in file: [/github/workspace/infra/store/mysql/user_store.go]: > [line 29 : column 14] - Is not declared by package errors > [line 82 : column 14] - Is not declared by package errors [/github/workspace/infra/record/bookmarks.go:1403-1404] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "DELETE FROM `bookmarks` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, bookmarkPrimaryKeyColumns, len(o)) [/github/workspace/infra/record/users.go:1053-1054] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "DELETE FROM `users` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, userPrimaryKeyColumns, len(o)) [/github/workspace/infra/record/users.go:896-900] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "SELECT %s FROM `users` WHERE %s", strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, ret), ","), strmangle.WhereClause("`", "`", 0, nzUniques), ) [/github/workspace/infra/record/users.go:798-800] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `users` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, colNames), strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, userPrimaryKeyColumns, len(o))) [/github/workspace/infra/record/users.go:717-720] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `users` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, wl), strmangle.WhereClause("`", "`", 0, userPrimaryKeyColumns), ) [/github/workspace/infra/record/users.go:624] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("SELECT `%s` FROM `users` WHERE %s", strings.Join(returnColumns, "`,`"), strmangle.WhereClause("`", "`", 0, userPrimaryKeyColumns)) [/github/workspace/infra/record/users.go:616] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("INSERT INTO `users` (`%s`) %%sVALUES (%s)%%s", strings.Join(wl, "`,`"), strmangle.Placeholders(dialect.UseIndexPlaceholders, len(wl), 1, 1)) [/github/workspace/infra/record/users.go:497-501] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmarks` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"user_id"}), strmangle.WhereClause("`", "`", 0, bookmarkPrimaryKeyColumns), ) [/github/workspace/infra/record/tags.go:1103-1104] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "SELECT `tags`.* FROM `tags` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, tagPrimaryKeyColumns, len(*o)) [/github/workspace/infra/record/bookmark_tag_relations.go:642-646] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmark_tag_relations` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"bookmark_id"}), strmangle.WhereClause("`", "`", 0, bookmarkTagRelationPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmark_tag_relations.go:689-693] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmark_tag_relations` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"tag_id"}), strmangle.WhereClause("`", "`", 0, bookmarkTagRelationPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmark_tag_relations.go:804] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("INSERT INTO `bookmark_tag_relations` (`%s`) %%sVALUES (%s)%%s", strings.Join(wl, "`,`"), strmangle.Placeholders(dialect.UseIndexPlaceholders, len(wl), 1, 1)) [/github/workspace/infra/record/bookmark_tag_relations.go:812] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("SELECT `%s` FROM `bookmark_tag_relations` WHERE %s", strings.Join(returnColumns, "`,`"), strmangle.WhereClause("`", "`", 0, bookmarkTagRelationPrimaryKeyColumns)) [/github/workspace/infra/record/bookmark_tag_relations.go:905-908] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `bookmark_tag_relations` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, wl), strmangle.WhereClause("`", "`", 0, bookmarkTagRelationPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmark_tag_relations.go:986-988] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `bookmark_tag_relations` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, colNames), strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, bookmarkTagRelationPrimaryKeyColumns, len(o))) [/github/workspace/infra/record/tags.go:1048-1049] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "DELETE FROM `tags` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, tagPrimaryKeyColumns, len(o)) [/github/workspace/infra/record/tags.go:891-895] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "SELECT %s FROM `tags` WHERE %s", strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, ret), ","), strmangle.WhereClause("`", "`", 0, nzUniques), ) [/github/workspace/infra/record/tags.go:793-795] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `tags` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, colNames), strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, tagPrimaryKeyColumns, len(o))) [/github/workspace/infra/record/tags.go:712-715] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `tags` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, wl), strmangle.WhereClause("`", "`", 0, tagPrimaryKeyColumns), ) [/github/workspace/infra/record/tags.go:619] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("SELECT `%s` FROM `tags` WHERE %s", strings.Join(returnColumns, "`,`"), strmangle.WhereClause("`", "`", 0, tagPrimaryKeyColumns)) [/github/workspace/infra/record/tags.go:611] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("INSERT INTO `tags` (`%s`) %%sVALUES (%s)%%s", strings.Join(wl, "`,`"), strmangle.Placeholders(dialect.UseIndexPlaceholders, len(wl), 1, 1)) [/github/workspace/infra/record/tags.go:492-496] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmark_tag_relations` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"tag_id"}), strmangle.WhereClause("`", "`", 0, bookmarkTagRelationPrimaryKeyColumns), ) [/github/workspace/infra/record/mysql_upsert.go:38-44] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Fprintf( buf, "INSERT INTO %s (%s) VALUES (%s) ON DUPLICATE KEY UPDATE ", tableName, columns, strmangle.Placeholders(dia.UseIndexPlaceholders, len(whitelist), 1, 1), ) [/github/workspace/infra/record/mysql_upsert.go:28-34] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Fprintf( buf, "INSERT IGNORE INTO %s (%s) VALUES (%s)", tableName, columns, strmangle.Placeholders(dia.UseIndexPlaceholders, len(whitelist), 1, 1), ) [/github/workspace/infra/record/bookmark_tag_relations.go:1083-1087] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "SELECT %s FROM `bookmark_tag_relations` WHERE %s", strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, ret), ","), strmangle.WhereClause("`", "`", 0, nzUniques), ) [/github/workspace/infra/record/bookmark_tag_relations.go:1240-1241] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "DELETE FROM `bookmark_tag_relations` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, bookmarkTagRelationPrimaryKeyColumns, len(o)) [/github/workspace/infra/record/entries.go:1117-1118] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "SELECT `entries`.* FROM `entries` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, entryPrimaryKeyColumns, len(*o)) [/github/workspace/infra/record/bookmarks.go:752-756] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmarks` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"user_id"}), strmangle.WhereClause("`", "`", 0, bookmarkPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmarks.go:799-803] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmarks` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"entry_id"}), strmangle.WhereClause("`", "`", 0, bookmarkPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmarks.go:848-852] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmark_tag_relations` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"bookmark_id"}), strmangle.WhereClause("`", "`", 0, bookmarkTagRelationPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmarks.go:967] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("INSERT INTO `bookmarks` (`%s`) %%sVALUES (%s)%%s", strings.Join(wl, "`,`"), strmangle.Placeholders(dialect.UseIndexPlaceholders, len(wl), 1, 1)) [/github/workspace/infra/record/bookmarks.go:975] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("SELECT `%s` FROM `bookmarks` WHERE %s", strings.Join(returnColumns, "`,`"), strmangle.WhereClause("`", "`", 0, bookmarkPrimaryKeyColumns)) [/github/workspace/infra/record/bookmarks.go:1068-1071] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `bookmarks` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, wl), strmangle.WhereClause("`", "`", 0, bookmarkPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmarks.go:1149-1151] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `bookmarks` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, colNames), strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, bookmarkPrimaryKeyColumns, len(o))) [/github/workspace/infra/record/entries.go:1062-1063] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "DELETE FROM `entries` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, entryPrimaryKeyColumns, len(o)) [/github/workspace/infra/record/entries.go:905-909] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "SELECT %s FROM `entries` WHERE %s", strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, ret), ","), strmangle.WhereClause("`", "`", 0, nzUniques), ) [/github/workspace/infra/record/bookmark_tag_relations.go:1295-1296] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "SELECT `bookmark_tag_relations`.* FROM `bookmark_tag_relations` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, bookmarkTagRelationPrimaryKeyColumns, len(*o)) [/github/workspace/infra/record/entries.go:807-809] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `entries` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, colNames), strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, entryPrimaryKeyColumns, len(o))) [/github/workspace/infra/record/entries.go:726-729] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `entries` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, wl), strmangle.WhereClause("`", "`", 0, entryPrimaryKeyColumns), ) [/github/workspace/infra/record/entries.go:633] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("SELECT `%s` FROM `entries` WHERE %s", strings.Join(returnColumns, "`,`"), strmangle.WhereClause("`", "`", 0, entryPrimaryKeyColumns)) [/github/workspace/infra/record/entries.go:625] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("INSERT INTO `entries` (`%s`) %%sVALUES (%s)%%s", strings.Join(wl, "`,`"), strmangle.Placeholders(dialect.UseIndexPlaceholders, len(wl), 1, 1)) [/github/workspace/infra/record/entries.go:506-510] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmarks` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"entry_id"}), strmangle.WhereClause("`", "`", 0, bookmarkPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmarks.go:1458-1459] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "SELECT `bookmarks`.* FROM `bookmarks` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, bookmarkPrimaryKeyColumns, len(*o)) [/github/workspace/infra/record/bookmarks.go:1246-1250] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "SELECT %s FROM `bookmarks` WHERE %s", strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, ret), ","), strmangle.WhereClause("`", "`", 0, nzUniques), ) [/github/workspace/infra/record/users.go:1108-1109] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "SELECT `users`.* FROM `users` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, userPrimaryKeyColumns, len(*o)) [/github/workspace/infra/record/bookmarks.go:1217] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmarks.go:1215] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/bookmarks.go:1213] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmarks.go:1211] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/bookmarks.go:1209] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmarks.go:1207] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(insertColumns.Kind)) [/github/workspace/infra/record/entries.go:861] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(updateColumns.Kind)) [/github/workspace/infra/record/bookmarks.go:1206] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/entries.go:865] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/entries.go:866] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(insertColumns.Kind)) [/github/workspace/infra/record/entries.go:868] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/entries.go:870] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/entries.go:872] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/entries.go:874] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/entries.go:876] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmarks.go:1204] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmarks.go:1202] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(updateColumns.Kind)) [/github/workspace/infra/store/mysql/user_store.go:43] - G103 (CWE-242): Use of unsafe calls should be audited (Confidence: HIGH, Severity: LOW) > unsafe.Pointer(&name) [/github/workspace/infra/record/bookmark_tag_relations.go:1054] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmark_tag_relations.go:1052] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/mysql_upsert.go:48] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte(',') [/github/workspace/infra/record/mysql_upsert.go:51] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(quoted) [/github/workspace/infra/record/mysql_upsert.go:52] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(" = VALUES(") [/github/workspace/infra/record/mysql_upsert.go:53] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(quoted) [/github/workspace/infra/record/mysql_upsert.go:54] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte(')') [/github/workspace/infra/record/bookmark_tag_relations.go:1050] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmark_tag_relations.go:1048] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/bookmark_tag_relations.go:1046] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmark_tag_relations.go:1044] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(insertColumns.Kind)) [/github/workspace/infra/record/bookmark_tag_relations.go:1043] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/tags.go:847] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(updateColumns.Kind)) [/github/workspace/infra/record/tags.go:849] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/tags.go:851] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/tags.go:852] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(insertColumns.Kind)) [/github/workspace/infra/record/tags.go:854] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/tags.go:856] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/tags.go:858] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/tags.go:860] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/tags.go:862] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmark_tag_relations.go:1041] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmark_tag_relations.go:1039] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(updateColumns.Kind)) [/github/workspace/infra/record/boil_types.go:46] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(nz) [/github/workspace/infra/record/boil_types.go:43] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/boil_types.go:39] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(w) [/github/workspace/infra/record/boil_types.go:37] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(cols.Kind)) [/github/workspace/infra/store/mysql/user_store.go:97] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > tx.Rollback() [/github/workspace/infra/store/mysql/user_store.go:92] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > tx.Rollback() [/github/workspace/infra/record/users.go:852] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(updateColumns.Kind)) [/github/workspace/infra/record/users.go:854] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/users.go:856] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/users.go:857] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(insertColumns.Kind)) [/github/workspace/infra/record/users.go:859] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/users.go:861] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/users.go:863] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/users.go:865] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/users.go:867] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/store/mysql/user_store.go:59] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > tx.Rollback() [/github/workspace/infra/store/mysql/user_store.go:53] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > tx.Rollback() [/github/workspace/infra/record/entries.go:863] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) Summary: Files: 22 Lines: 6925 Nosec: 0 Issues: 104 ``` [Code Reference](https://github.com/securego/gosec#available-rules)
github-actions[bot] commented 4 years ago

⚠ errcheck Failed

error: failed to check packages: errors while loading package github.com/anatofuz/BookmarkTarou/infra/store/mysql: [/github/workspace/infra/store/mysql/user_store.go:82:14: Is not declared by package errors /github/workspace/infra/store/mysql/user_store.go:29:14: Is not declared by package errors]
github-actions[bot] commented 4 years ago

⚠ vet Failed

# github.com/anatofuz/BookmarkTarou/infra/store/mysql
infra/store/mysql/user_store.go:29:7: undefined: errors.Is
infra/store/mysql/user_store.go:82:7: undefined: errors.Is
note: module requires Go 1.13
# github.com/anatofuz/BookmarkTarou/app
app/usr.go:61:6: undefined: errors.Is
note: module requires Go 1.13
# github.com/anatofuz/BookmarkTarou/infra/store/kvs
infra/store/kvs/user_session_store.go:26:15: Errorf format %w has unknown verb w
infra/store/kvs/user_session_store.go:29:15: Errorf format %w has unknown verb w
infra/store/kvs/user_session_store.go:37:10: Errorf format %w has unknown verb w
infra/store/kvs/user_session_store.go:41:10: Errorf format %w has unknown verb w
github-actions[bot] commented 4 years ago

⚠ gofmt Failed

app/config/config.go ```diff } type appComponentImpl struct { - bookmarkDB *sql.DB + bookmarkDB *sql.DB userSessionRedis *redis.Client } - type config struct { port int dsn string } return &appComponentImpl{ - bookmarkDB: db, - userSessionRedis:client, + bookmarkDB: db, + userSessionRedis: client, }, nil } ```
app/usr.go ```diff userStore store.UserStore } - func NewUserApp(userStore store.UserStore) UserApp { return &UserAppImpl{userStore: userStore} } if err != nil { return nil, fmt.Errorf("failed CreateUser: %w", err) } - usrWP, err := u.userStore.GetPasswordWithUserFromName(ctx,name) + usrWP, err := u.userStore.GetPasswordWithUserFromName(ctx, name) - if err := bcrypt.CompareHashAndPassword(hashedPass,usrWP.Pw); err != nil { + if err := bcrypt.CompareHashAndPassword(hashedPass, usrWP.Pw); err != nil { if err == bcrypt.ErrMismatchedHashAndPassword { return nil, nil } - return nil, fmt.Errorf("failed login: %w",err) + return nil, fmt.Errorf("failed login: %w", err) } - return &usrWP.User,nil + return &usrWP.User, nil } ```
infra/store/kvs/user_session_store.go ```diff client *redis.Client } - -func NewRedisStore(client *redis.Client) store.UserSessionStore{ - return &redisStore{client:client} +func NewRedisStore(client *redis.Client) store.UserSessionStore { + return &redisStore{client: client} } func (r redisStore) Get(token string) (*model.User, error) { ```
web/user.go ```diff return fmt.Errorf("failed signup: %w", err) } return c.Render(http.StatusOK, "index.tmpl", map[string]interface{}{ - "User":usr, + "User": usr, }) } ```
github-actions[bot] commented 4 years ago

⚠ gosec Failed

Summary:
   Files: 22
   Lines: 6925
   Nosec: 0
  Issues: 104
Show Detail ``` Results: Golang errors in file: [/github/workspace/app/usr.go]: > [line 61 : column 13] - Is not declared by package errors Golang errors in file: [/github/workspace/infra/store/mysql/user_store.go]: > [line 29 : column 14] - Is not declared by package errors > [line 82 : column 14] - Is not declared by package errors [/github/workspace/infra/record/bookmarks.go:1403-1404] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "DELETE FROM `bookmarks` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, bookmarkPrimaryKeyColumns, len(o)) [/github/workspace/infra/record/users.go:1053-1054] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "DELETE FROM `users` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, userPrimaryKeyColumns, len(o)) [/github/workspace/infra/record/users.go:896-900] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "SELECT %s FROM `users` WHERE %s", strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, ret), ","), strmangle.WhereClause("`", "`", 0, nzUniques), ) [/github/workspace/infra/record/users.go:798-800] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `users` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, colNames), strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, userPrimaryKeyColumns, len(o))) [/github/workspace/infra/record/users.go:717-720] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `users` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, wl), strmangle.WhereClause("`", "`", 0, userPrimaryKeyColumns), ) [/github/workspace/infra/record/users.go:624] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("SELECT `%s` FROM `users` WHERE %s", strings.Join(returnColumns, "`,`"), strmangle.WhereClause("`", "`", 0, userPrimaryKeyColumns)) [/github/workspace/infra/record/users.go:616] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("INSERT INTO `users` (`%s`) %%sVALUES (%s)%%s", strings.Join(wl, "`,`"), strmangle.Placeholders(dialect.UseIndexPlaceholders, len(wl), 1, 1)) [/github/workspace/infra/record/users.go:497-501] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmarks` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"user_id"}), strmangle.WhereClause("`", "`", 0, bookmarkPrimaryKeyColumns), ) [/github/workspace/infra/record/tags.go:1103-1104] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "SELECT `tags`.* FROM `tags` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, tagPrimaryKeyColumns, len(*o)) [/github/workspace/infra/record/bookmark_tag_relations.go:642-646] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmark_tag_relations` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"bookmark_id"}), strmangle.WhereClause("`", "`", 0, bookmarkTagRelationPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmark_tag_relations.go:689-693] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmark_tag_relations` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"tag_id"}), strmangle.WhereClause("`", "`", 0, bookmarkTagRelationPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmark_tag_relations.go:804] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("INSERT INTO `bookmark_tag_relations` (`%s`) %%sVALUES (%s)%%s", strings.Join(wl, "`,`"), strmangle.Placeholders(dialect.UseIndexPlaceholders, len(wl), 1, 1)) [/github/workspace/infra/record/bookmark_tag_relations.go:812] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("SELECT `%s` FROM `bookmark_tag_relations` WHERE %s", strings.Join(returnColumns, "`,`"), strmangle.WhereClause("`", "`", 0, bookmarkTagRelationPrimaryKeyColumns)) [/github/workspace/infra/record/bookmark_tag_relations.go:905-908] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `bookmark_tag_relations` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, wl), strmangle.WhereClause("`", "`", 0, bookmarkTagRelationPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmark_tag_relations.go:986-988] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `bookmark_tag_relations` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, colNames), strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, bookmarkTagRelationPrimaryKeyColumns, len(o))) [/github/workspace/infra/record/tags.go:1048-1049] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "DELETE FROM `tags` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, tagPrimaryKeyColumns, len(o)) [/github/workspace/infra/record/tags.go:891-895] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "SELECT %s FROM `tags` WHERE %s", strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, ret), ","), strmangle.WhereClause("`", "`", 0, nzUniques), ) [/github/workspace/infra/record/tags.go:793-795] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `tags` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, colNames), strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, tagPrimaryKeyColumns, len(o))) [/github/workspace/infra/record/tags.go:712-715] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `tags` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, wl), strmangle.WhereClause("`", "`", 0, tagPrimaryKeyColumns), ) [/github/workspace/infra/record/tags.go:619] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("SELECT `%s` FROM `tags` WHERE %s", strings.Join(returnColumns, "`,`"), strmangle.WhereClause("`", "`", 0, tagPrimaryKeyColumns)) [/github/workspace/infra/record/tags.go:611] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("INSERT INTO `tags` (`%s`) %%sVALUES (%s)%%s", strings.Join(wl, "`,`"), strmangle.Placeholders(dialect.UseIndexPlaceholders, len(wl), 1, 1)) [/github/workspace/infra/record/tags.go:492-496] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmark_tag_relations` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"tag_id"}), strmangle.WhereClause("`", "`", 0, bookmarkTagRelationPrimaryKeyColumns), ) [/github/workspace/infra/record/mysql_upsert.go:38-44] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Fprintf( buf, "INSERT INTO %s (%s) VALUES (%s) ON DUPLICATE KEY UPDATE ", tableName, columns, strmangle.Placeholders(dia.UseIndexPlaceholders, len(whitelist), 1, 1), ) [/github/workspace/infra/record/mysql_upsert.go:28-34] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Fprintf( buf, "INSERT IGNORE INTO %s (%s) VALUES (%s)", tableName, columns, strmangle.Placeholders(dia.UseIndexPlaceholders, len(whitelist), 1, 1), ) [/github/workspace/infra/record/bookmark_tag_relations.go:1083-1087] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "SELECT %s FROM `bookmark_tag_relations` WHERE %s", strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, ret), ","), strmangle.WhereClause("`", "`", 0, nzUniques), ) [/github/workspace/infra/record/bookmark_tag_relations.go:1240-1241] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "DELETE FROM `bookmark_tag_relations` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, bookmarkTagRelationPrimaryKeyColumns, len(o)) [/github/workspace/infra/record/entries.go:1117-1118] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "SELECT `entries`.* FROM `entries` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, entryPrimaryKeyColumns, len(*o)) [/github/workspace/infra/record/bookmarks.go:752-756] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmarks` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"user_id"}), strmangle.WhereClause("`", "`", 0, bookmarkPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmarks.go:799-803] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmarks` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"entry_id"}), strmangle.WhereClause("`", "`", 0, bookmarkPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmarks.go:848-852] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmark_tag_relations` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"bookmark_id"}), strmangle.WhereClause("`", "`", 0, bookmarkTagRelationPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmarks.go:967] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("INSERT INTO `bookmarks` (`%s`) %%sVALUES (%s)%%s", strings.Join(wl, "`,`"), strmangle.Placeholders(dialect.UseIndexPlaceholders, len(wl), 1, 1)) [/github/workspace/infra/record/bookmarks.go:975] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("SELECT `%s` FROM `bookmarks` WHERE %s", strings.Join(returnColumns, "`,`"), strmangle.WhereClause("`", "`", 0, bookmarkPrimaryKeyColumns)) [/github/workspace/infra/record/bookmarks.go:1068-1071] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `bookmarks` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, wl), strmangle.WhereClause("`", "`", 0, bookmarkPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmarks.go:1149-1151] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `bookmarks` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, colNames), strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, bookmarkPrimaryKeyColumns, len(o))) [/github/workspace/infra/record/entries.go:1062-1063] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "DELETE FROM `entries` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, entryPrimaryKeyColumns, len(o)) [/github/workspace/infra/record/entries.go:905-909] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "SELECT %s FROM `entries` WHERE %s", strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, ret), ","), strmangle.WhereClause("`", "`", 0, nzUniques), ) [/github/workspace/infra/record/bookmark_tag_relations.go:1295-1296] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "SELECT `bookmark_tag_relations`.* FROM `bookmark_tag_relations` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, bookmarkTagRelationPrimaryKeyColumns, len(*o)) [/github/workspace/infra/record/entries.go:807-809] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `entries` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, colNames), strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, entryPrimaryKeyColumns, len(o))) [/github/workspace/infra/record/entries.go:726-729] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `entries` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, wl), strmangle.WhereClause("`", "`", 0, entryPrimaryKeyColumns), ) [/github/workspace/infra/record/entries.go:633] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("SELECT `%s` FROM `entries` WHERE %s", strings.Join(returnColumns, "`,`"), strmangle.WhereClause("`", "`", 0, entryPrimaryKeyColumns)) [/github/workspace/infra/record/entries.go:625] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("INSERT INTO `entries` (`%s`) %%sVALUES (%s)%%s", strings.Join(wl, "`,`"), strmangle.Placeholders(dialect.UseIndexPlaceholders, len(wl), 1, 1)) [/github/workspace/infra/record/entries.go:506-510] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmarks` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"entry_id"}), strmangle.WhereClause("`", "`", 0, bookmarkPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmarks.go:1458-1459] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "SELECT `bookmarks`.* FROM `bookmarks` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, bookmarkPrimaryKeyColumns, len(*o)) [/github/workspace/infra/record/bookmarks.go:1246-1250] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "SELECT %s FROM `bookmarks` WHERE %s", strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, ret), ","), strmangle.WhereClause("`", "`", 0, nzUniques), ) [/github/workspace/infra/record/users.go:1108-1109] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "SELECT `users`.* FROM `users` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, userPrimaryKeyColumns, len(*o)) [/github/workspace/infra/record/bookmarks.go:1217] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmarks.go:1215] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/bookmarks.go:1213] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmarks.go:1211] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/bookmarks.go:1209] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmarks.go:1207] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(insertColumns.Kind)) [/github/workspace/infra/record/entries.go:861] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(updateColumns.Kind)) [/github/workspace/infra/record/bookmarks.go:1206] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/entries.go:865] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/entries.go:866] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(insertColumns.Kind)) [/github/workspace/infra/record/entries.go:868] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/entries.go:870] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/entries.go:872] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/entries.go:874] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/entries.go:876] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmarks.go:1204] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmarks.go:1202] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(updateColumns.Kind)) [/github/workspace/infra/store/mysql/user_store.go:43] - G103 (CWE-242): Use of unsafe calls should be audited (Confidence: HIGH, Severity: LOW) > unsafe.Pointer(&name) [/github/workspace/infra/record/bookmark_tag_relations.go:1054] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmark_tag_relations.go:1052] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/mysql_upsert.go:48] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte(',') [/github/workspace/infra/record/mysql_upsert.go:51] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(quoted) [/github/workspace/infra/record/mysql_upsert.go:52] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(" = VALUES(") [/github/workspace/infra/record/mysql_upsert.go:53] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(quoted) [/github/workspace/infra/record/mysql_upsert.go:54] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte(')') [/github/workspace/infra/record/bookmark_tag_relations.go:1050] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmark_tag_relations.go:1048] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/bookmark_tag_relations.go:1046] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmark_tag_relations.go:1044] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(insertColumns.Kind)) [/github/workspace/infra/record/bookmark_tag_relations.go:1043] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/tags.go:847] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(updateColumns.Kind)) [/github/workspace/infra/record/tags.go:849] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/tags.go:851] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/tags.go:852] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(insertColumns.Kind)) [/github/workspace/infra/record/tags.go:854] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/tags.go:856] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/tags.go:858] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/tags.go:860] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/tags.go:862] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmark_tag_relations.go:1041] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmark_tag_relations.go:1039] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(updateColumns.Kind)) [/github/workspace/infra/record/boil_types.go:46] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(nz) [/github/workspace/infra/record/boil_types.go:43] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/boil_types.go:39] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(w) [/github/workspace/infra/record/boil_types.go:37] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(cols.Kind)) [/github/workspace/infra/store/mysql/user_store.go:97] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > tx.Rollback() [/github/workspace/infra/store/mysql/user_store.go:92] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > tx.Rollback() [/github/workspace/infra/record/users.go:852] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(updateColumns.Kind)) [/github/workspace/infra/record/users.go:854] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/users.go:856] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/users.go:857] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(insertColumns.Kind)) [/github/workspace/infra/record/users.go:859] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/users.go:861] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/users.go:863] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/users.go:865] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/users.go:867] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/store/mysql/user_store.go:59] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > tx.Rollback() [/github/workspace/infra/store/mysql/user_store.go:53] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > tx.Rollback() [/github/workspace/infra/record/entries.go:863] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) Summary: Files: 22 Lines: 6925 Nosec: 0 Issues: 104 ``` [Code Reference](https://github.com/securego/gosec#available-rules)
github-actions[bot] commented 4 years ago

⚠ errcheck Failed

error: failed to check packages: errors while loading package github.com/anatofuz/BookmarkTarou/infra/store/mysql: [/github/workspace/infra/store/mysql/user_store.go:82:14: Is not declared by package errors /github/workspace/infra/store/mysql/user_store.go:29:14: Is not declared by package errors]
github-actions[bot] commented 4 years ago

⚠ staticcheck Failed

-: could not analyze dependency github.com/anatofuz/BookmarkTarou/app of github.com/anatofuz/BookmarkTarou/web (compile)
-: could not analyze dependency github.com/anatofuz/BookmarkTarou/app/config of github.com/anatofuz/BookmarkTarou (compile)
-: could not analyze dependency github.com/anatofuz/BookmarkTarou/infra/store/mysql of github.com/anatofuz/BookmarkTarou/app/config (compile)
app/usr.go:61:13: Is not declared by package errors (compile)
infra/store/mysql/user_store.go:82:14: Is not declared by package errors (compile)
model/user.go:21:5: error var UserErrNotFound should have name of the form ErrFoo (ST1012)

Checks Document

github-actions[bot] commented 4 years ago

⚠ staticcheck Failed

-: could not analyze dependency github.com/anatofuz/BookmarkTarou/app of github.com/anatofuz/BookmarkTarou/web (compile)
-: could not analyze dependency github.com/anatofuz/BookmarkTarou/app/config of github.com/anatofuz/BookmarkTarou (compile)
-: could not analyze dependency github.com/anatofuz/BookmarkTarou/infra/store/mysql of github.com/anatofuz/BookmarkTarou/app/config (compile)
app/usr.go:61:13: Is not declared by package errors (compile)
infra/store/mysql/user_store.go:82:14: Is not declared by package errors (compile)
model/user.go:21:5: error var UserErrNotFound should have name of the form ErrFoo (ST1012)

Checks Document

github-actions[bot] commented 4 years ago

⚠ vet Failed

# github.com/anatofuz/BookmarkTarou/infra/store/mysql
infra/store/mysql/user_store.go:29:7: undefined: errors.Is
infra/store/mysql/user_store.go:82:7: undefined: errors.Is
note: module requires Go 1.13
# github.com/anatofuz/BookmarkTarou/app
app/usr.go:61:6: undefined: errors.Is
note: module requires Go 1.13
# github.com/anatofuz/BookmarkTarou/infra/store/kvs
infra/store/kvs/user_session_store.go:26:15: Errorf format %w has unknown verb w
infra/store/kvs/user_session_store.go:29:15: Errorf format %w has unknown verb w
infra/store/kvs/user_session_store.go:37:10: Errorf format %w has unknown verb w
infra/store/kvs/user_session_store.go:41:10: Errorf format %w has unknown verb w
github-actions[bot] commented 4 years ago

⚠ gofmt Failed

app/config/config.go ```diff } type appComponentImpl struct { - bookmarkDB *sql.DB + bookmarkDB *sql.DB userSessionRedis *redis.Client } - type config struct { port int dsn string } return &appComponentImpl{ - bookmarkDB: db, - userSessionRedis:client, + bookmarkDB: db, + userSessionRedis: client, }, nil } ```
github-actions[bot] commented 4 years ago

⚠ golint Failed

Found 13 lint suggestions; failing.

Show Detail ``` app/usr.go:13:6: exported type UserApp should have comment or be unexported app/usr.go:18:6: exported type UserAppImpl should have comment or be unexported app/usr.go:22:1: exported function NewUserApp should have comment or be unexported app/usr.go:26:1: exported method UserAppImpl.Create should have comment or be unexported app/usr.go:45:1: exported method UserAppImpl.SignIn should have comment or be unexported app/config/config.go:14:2: a blank import should be only in a main or test package, or have a comment justifying it infra/store/user_session_store.go:5:6: exported type UserSessionStore should have comment or be unexported infra/store/kvs/user_session_store.go:17:1: exported function NewRedisStore should have comment or be unexported infra/store/kvs/user_session_store.go:50:21: error strings should not be capitalized or end with punctuation or a newline model/user.go:21:5: error var UserErrNotFound should have name of the form ErrFoo web/perform.go:11:6: exported type Handler should have comment or be unexported web/perform.go:15:6: exported type HandlerImpl should have comment or be unexported web/perform.go:18:1: exported function CreateHandlerImpl should have comment or be unexported ```
github-actions[bot] commented 4 years ago

⚠ errcheck Failed

error: failed to check packages: errors while loading package github.com/anatofuz/BookmarkTarou/infra/store/mysql: [/github/workspace/infra/store/mysql/user_store.go:80:14: Is not declared by package errors /github/workspace/infra/store/mysql/user_store.go:27:14: Is not declared by package errors]
github-actions[bot] commented 4 years ago

⚠ vet Failed

# github.com/anatofuz/BookmarkTarou/infra/store/mysql
infra/store/mysql/user_store.go:27:7: undefined: errors.Is
infra/store/mysql/user_store.go:80:7: undefined: errors.Is
note: module requires Go 1.13
# github.com/anatofuz/BookmarkTarou/infra/store/kvs
infra/store/kvs/user_session_store.go:26:15: Errorf format %w has unknown verb w
infra/store/kvs/user_session_store.go:29:15: Errorf format %w has unknown verb w
infra/store/kvs/user_session_store.go:37:10: Errorf format %w has unknown verb w
infra/store/kvs/user_session_store.go:41:10: Errorf format %w has unknown verb w
# github.com/anatofuz/BookmarkTarou/app
app/usr.go:35:15: Errorf format %w has unknown verb w
app/usr.go:40:15: Errorf format %w has unknown verb w
app/usr.go:54:15: Errorf format %w has unknown verb w
app/usr.go:58:15: Errorf format %w has unknown verb w
app/usr.go:65:15: Errorf format %w has unknown verb w
# github.com/anatofuz/BookmarkTarou/web
web/user.go:103:10: Errorf format %w has unknown verb w
web/user.go:121:10: Errorf format %w has unknown verb w
web/user.go:131:15: Errorf format %w has unknown verb w
web/user.go:139:15: Errorf format %w has unknown verb w
github-actions[bot] commented 4 years ago

⚠ staticcheck Failed

-: could not analyze dependency github.com/anatofuz/BookmarkTarou/app/config of github.com/anatofuz/BookmarkTarou (compile)
-: could not analyze dependency github.com/anatofuz/BookmarkTarou/infra/store/mysql of github.com/anatofuz/BookmarkTarou/app/config (compile)
infra/store/kvs/user_session_store.go:50:20: error strings should not end with punctuation or a newline (ST1005)
infra/store/mysql/user_store.go:80:14: Is not declared by package errors (compile)
model/user.go:21:5: error var UserErrNotFound should have name of the form ErrFoo (ST1012)

Checks Document

github-actions[bot] commented 4 years ago

⚠ gosec Failed

Summary:
   Files: 22
   Lines: 7019
   Nosec: 0
  Issues: 104
Show Detail ``` Results: Golang errors in file: [/github/workspace/infra/store/mysql/user_store.go]: > [line 27 : column 14] - Is not declared by package errors > [line 80 : column 14] - Is not declared by package errors [/github/workspace/infra/record/entries.go:807-809] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `entries` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, colNames), strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, entryPrimaryKeyColumns, len(o))) [/github/workspace/infra/record/users.go:1108-1109] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "SELECT `users`.* FROM `users` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, userPrimaryKeyColumns, len(*o)) [/github/workspace/infra/record/users.go:1053-1054] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "DELETE FROM `users` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, userPrimaryKeyColumns, len(o)) [/github/workspace/infra/record/users.go:896-900] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "SELECT %s FROM `users` WHERE %s", strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, ret), ","), strmangle.WhereClause("`", "`", 0, nzUniques), ) [/github/workspace/infra/record/bookmark_tag_relations.go:642-646] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmark_tag_relations` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"bookmark_id"}), strmangle.WhereClause("`", "`", 0, bookmarkTagRelationPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmark_tag_relations.go:689-693] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmark_tag_relations` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"tag_id"}), strmangle.WhereClause("`", "`", 0, bookmarkTagRelationPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmark_tag_relations.go:804] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("INSERT INTO `bookmark_tag_relations` (`%s`) %%sVALUES (%s)%%s", strings.Join(wl, "`,`"), strmangle.Placeholders(dialect.UseIndexPlaceholders, len(wl), 1, 1)) [/github/workspace/infra/record/bookmark_tag_relations.go:812] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("SELECT `%s` FROM `bookmark_tag_relations` WHERE %s", strings.Join(returnColumns, "`,`"), strmangle.WhereClause("`", "`", 0, bookmarkTagRelationPrimaryKeyColumns)) [/github/workspace/infra/record/bookmark_tag_relations.go:905-908] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `bookmark_tag_relations` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, wl), strmangle.WhereClause("`", "`", 0, bookmarkTagRelationPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmark_tag_relations.go:986-988] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `bookmark_tag_relations` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, colNames), strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, bookmarkTagRelationPrimaryKeyColumns, len(o))) [/github/workspace/infra/record/users.go:798-800] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `users` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, colNames), strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, userPrimaryKeyColumns, len(o))) [/github/workspace/infra/record/users.go:717-720] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `users` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, wl), strmangle.WhereClause("`", "`", 0, userPrimaryKeyColumns), ) [/github/workspace/infra/record/users.go:624] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("SELECT `%s` FROM `users` WHERE %s", strings.Join(returnColumns, "`,`"), strmangle.WhereClause("`", "`", 0, userPrimaryKeyColumns)) [/github/workspace/infra/record/bookmarks.go:975] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("SELECT `%s` FROM `bookmarks` WHERE %s", strings.Join(returnColumns, "`,`"), strmangle.WhereClause("`", "`", 0, bookmarkPrimaryKeyColumns)) [/github/workspace/infra/record/users.go:616] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("INSERT INTO `users` (`%s`) %%sVALUES (%s)%%s", strings.Join(wl, "`,`"), strmangle.Placeholders(dialect.UseIndexPlaceholders, len(wl), 1, 1)) [/github/workspace/infra/record/users.go:497-501] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmarks` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"user_id"}), strmangle.WhereClause("`", "`", 0, bookmarkPrimaryKeyColumns), ) [/github/workspace/infra/record/tags.go:1103-1104] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "SELECT `tags`.* FROM `tags` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, tagPrimaryKeyColumns, len(*o)) [/github/workspace/infra/record/tags.go:1048-1049] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "DELETE FROM `tags` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, tagPrimaryKeyColumns, len(o)) [/github/workspace/infra/record/tags.go:891-895] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "SELECT %s FROM `tags` WHERE %s", strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, ret), ","), strmangle.WhereClause("`", "`", 0, nzUniques), ) [/github/workspace/infra/record/bookmark_tag_relations.go:1083-1087] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "SELECT %s FROM `bookmark_tag_relations` WHERE %s", strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, ret), ","), strmangle.WhereClause("`", "`", 0, nzUniques), ) [/github/workspace/infra/record/bookmark_tag_relations.go:1240-1241] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "DELETE FROM `bookmark_tag_relations` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, bookmarkTagRelationPrimaryKeyColumns, len(o)) [/github/workspace/infra/record/bookmark_tag_relations.go:1295-1296] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "SELECT `bookmark_tag_relations`.* FROM `bookmark_tag_relations` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, bookmarkTagRelationPrimaryKeyColumns, len(*o)) [/github/workspace/infra/record/bookmarks.go:752-756] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmarks` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"user_id"}), strmangle.WhereClause("`", "`", 0, bookmarkPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmarks.go:799-803] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmarks` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"entry_id"}), strmangle.WhereClause("`", "`", 0, bookmarkPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmarks.go:848-852] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmark_tag_relations` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"bookmark_id"}), strmangle.WhereClause("`", "`", 0, bookmarkTagRelationPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmarks.go:967] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("INSERT INTO `bookmarks` (`%s`) %%sVALUES (%s)%%s", strings.Join(wl, "`,`"), strmangle.Placeholders(dialect.UseIndexPlaceholders, len(wl), 1, 1)) [/github/workspace/infra/record/tags.go:793-795] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `tags` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, colNames), strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, tagPrimaryKeyColumns, len(o))) [/github/workspace/infra/record/bookmarks.go:1068-1071] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `bookmarks` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, wl), strmangle.WhereClause("`", "`", 0, bookmarkPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmarks.go:1149-1151] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `bookmarks` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, colNames), strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, bookmarkPrimaryKeyColumns, len(o))) [/github/workspace/infra/record/tags.go:712-715] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `tags` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, wl), strmangle.WhereClause("`", "`", 0, tagPrimaryKeyColumns), ) [/github/workspace/infra/record/tags.go:619] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("SELECT `%s` FROM `tags` WHERE %s", strings.Join(returnColumns, "`,`"), strmangle.WhereClause("`", "`", 0, tagPrimaryKeyColumns)) [/github/workspace/infra/record/tags.go:611] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("INSERT INTO `tags` (`%s`) %%sVALUES (%s)%%s", strings.Join(wl, "`,`"), strmangle.Placeholders(dialect.UseIndexPlaceholders, len(wl), 1, 1)) [/github/workspace/infra/record/mysql_upsert.go:38-44] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Fprintf( buf, "INSERT INTO %s (%s) VALUES (%s) ON DUPLICATE KEY UPDATE ", tableName, columns, strmangle.Placeholders(dia.UseIndexPlaceholders, len(whitelist), 1, 1), ) [/github/workspace/infra/record/mysql_upsert.go:28-34] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Fprintf( buf, "INSERT IGNORE INTO %s (%s) VALUES (%s)", tableName, columns, strmangle.Placeholders(dia.UseIndexPlaceholders, len(whitelist), 1, 1), ) [/github/workspace/infra/record/entries.go:1117-1118] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "SELECT `entries`.* FROM `entries` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, entryPrimaryKeyColumns, len(*o)) [/github/workspace/infra/record/entries.go:1062-1063] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "DELETE FROM `entries` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, entryPrimaryKeyColumns, len(o)) [/github/workspace/infra/record/entries.go:905-909] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "SELECT %s FROM `entries` WHERE %s", strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, ret), ","), strmangle.WhereClause("`", "`", 0, nzUniques), ) [/github/workspace/infra/record/tags.go:492-496] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmark_tag_relations` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"tag_id"}), strmangle.WhereClause("`", "`", 0, bookmarkTagRelationPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmarks.go:1246-1250] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "SELECT %s FROM `bookmarks` WHERE %s", strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, ret), ","), strmangle.WhereClause("`", "`", 0, nzUniques), ) [/github/workspace/infra/record/bookmarks.go:1403-1404] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "DELETE FROM `bookmarks` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, bookmarkPrimaryKeyColumns, len(o)) [/github/workspace/infra/record/bookmarks.go:1458-1459] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "SELECT `bookmarks`.* FROM `bookmarks` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, bookmarkPrimaryKeyColumns, len(*o)) [/github/workspace/infra/record/entries.go:506-510] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmarks` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"entry_id"}), strmangle.WhereClause("`", "`", 0, bookmarkPrimaryKeyColumns), ) [/github/workspace/infra/record/entries.go:625] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("INSERT INTO `entries` (`%s`) %%sVALUES (%s)%%s", strings.Join(wl, "`,`"), strmangle.Placeholders(dialect.UseIndexPlaceholders, len(wl), 1, 1)) [/github/workspace/infra/record/entries.go:633] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("SELECT `%s` FROM `entries` WHERE %s", strings.Join(returnColumns, "`,`"), strmangle.WhereClause("`", "`", 0, entryPrimaryKeyColumns)) [/github/workspace/infra/record/entries.go:726-729] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `entries` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, wl), strmangle.WhereClause("`", "`", 0, entryPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmark_tag_relations.go:1044] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(insertColumns.Kind)) [/github/workspace/infra/record/entries.go:861] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(updateColumns.Kind)) [/github/workspace/infra/record/entries.go:863] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/entries.go:865] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/entries.go:866] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(insertColumns.Kind)) [/github/workspace/infra/record/entries.go:868] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/entries.go:870] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/bookmarks.go:1217] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/entries.go:874] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/entries.go:876] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmarks.go:1215] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/bookmarks.go:1213] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmarks.go:1211] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/bookmarks.go:1209] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmarks.go:1207] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(insertColumns.Kind)) [/github/workspace/infra/record/mysql_upsert.go:48] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte(',') [/github/workspace/infra/record/mysql_upsert.go:51] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(quoted) [/github/workspace/infra/record/mysql_upsert.go:52] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(" = VALUES(") [/github/workspace/infra/record/mysql_upsert.go:53] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(quoted) [/github/workspace/infra/record/mysql_upsert.go:54] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte(')') [/github/workspace/infra/record/entries.go:872] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmarks.go:1206] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/bookmarks.go:1204] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmarks.go:1202] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(updateColumns.Kind)) [/github/workspace/infra/record/boil_types.go:37] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(cols.Kind)) [/github/workspace/infra/record/tags.go:847] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(updateColumns.Kind)) [/github/workspace/infra/record/tags.go:849] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/tags.go:851] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/tags.go:852] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(insertColumns.Kind)) [/github/workspace/infra/record/tags.go:854] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/tags.go:856] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/tags.go:858] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/tags.go:860] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/tags.go:862] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmark_tag_relations.go:1054] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmark_tag_relations.go:1052] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/bookmark_tag_relations.go:1050] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmark_tag_relations.go:1048] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/bookmark_tag_relations.go:1046] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmark_tag_relations.go:1043] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/bookmark_tag_relations.go:1041] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmark_tag_relations.go:1039] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(updateColumns.Kind)) [/github/workspace/infra/record/users.go:852] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(updateColumns.Kind)) [/github/workspace/infra/record/users.go:854] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/users.go:856] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/users.go:857] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(insertColumns.Kind)) [/github/workspace/infra/record/users.go:859] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/users.go:861] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/users.go:863] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/users.go:865] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/users.go:867] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/boil_types.go:46] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(nz) [/github/workspace/infra/record/boil_types.go:43] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/boil_types.go:39] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(w) [/github/workspace/infra/store/mysql/user_store.go:51] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > tx.Rollback() [/github/workspace/infra/store/mysql/user_store.go:57] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > tx.Rollback() [/github/workspace/infra/store/mysql/user_store.go:90] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > tx.Rollback() [/github/workspace/infra/store/mysql/user_store.go:95] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > tx.Rollback() [/github/workspace/web/user.go:154] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > u.session.Remove(uuID) Summary: Files: 22 Lines: 7019 Nosec: 0 Issues: 104 ``` [Code Reference](https://github.com/securego/gosec#available-rules)
github-actions[bot] commented 4 years ago

⚠ golint Failed

Found 13 lint suggestions; failing.

Show Detail ``` app/usr.go:13:6: exported type UserApp should have comment or be unexported app/usr.go:18:6: exported type UserAppImpl should have comment or be unexported app/usr.go:22:1: exported function NewUserApp should have comment or be unexported app/usr.go:26:1: exported method UserAppImpl.Create should have comment or be unexported app/usr.go:45:1: exported method UserAppImpl.SignIn should have comment or be unexported app/config/config.go:14:2: a blank import should be only in a main or test package, or have a comment justifying it infra/store/user_session_store.go:5:6: exported type UserSessionStore should have comment or be unexported infra/store/kvs/user_session_store.go:17:1: exported function NewRedisStore should have comment or be unexported infra/store/kvs/user_session_store.go:50:21: error strings should not be capitalized or end with punctuation or a newline model/user.go:21:5: error var UserErrNotFound should have name of the form ErrFoo web/perform.go:11:6: exported type Handler should have comment or be unexported web/perform.go:15:6: exported type HandlerImpl should have comment or be unexported web/perform.go:18:1: exported function CreateHandlerImpl should have comment or be unexported ```
github-actions[bot] commented 4 years ago

⚠ gofmt Failed

app/config/config.go ```diff } type appComponentImpl struct { - bookmarkDB *sql.DB + bookmarkDB *sql.DB userSessionRedis *redis.Client } - type config struct { port int dsn string } return &appComponentImpl{ - bookmarkDB: db, - userSessionRedis:client, + bookmarkDB: db, + userSessionRedis: client, }, nil } ```
github-actions[bot] commented 4 years ago

⚠ gosec Failed

Summary:
   Files: 22
   Lines: 7019
   Nosec: 0
  Issues: 104
Show Detail ``` Results: Golang errors in file: [/github/workspace/infra/store/mysql/user_store.go]: > [line 27 : column 14] - Is not declared by package errors > [line 80 : column 14] - Is not declared by package errors [/github/workspace/infra/record/bookmarks.go:1403-1404] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "DELETE FROM `bookmarks` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, bookmarkPrimaryKeyColumns, len(o)) [/github/workspace/infra/record/users.go:1053-1054] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "DELETE FROM `users` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, userPrimaryKeyColumns, len(o)) [/github/workspace/infra/record/users.go:896-900] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "SELECT %s FROM `users` WHERE %s", strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, ret), ","), strmangle.WhereClause("`", "`", 0, nzUniques), ) [/github/workspace/infra/record/users.go:798-800] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `users` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, colNames), strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, userPrimaryKeyColumns, len(o))) [/github/workspace/infra/record/users.go:717-720] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `users` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, wl), strmangle.WhereClause("`", "`", 0, userPrimaryKeyColumns), ) [/github/workspace/infra/record/users.go:624] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("SELECT `%s` FROM `users` WHERE %s", strings.Join(returnColumns, "`,`"), strmangle.WhereClause("`", "`", 0, userPrimaryKeyColumns)) [/github/workspace/infra/record/users.go:616] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("INSERT INTO `users` (`%s`) %%sVALUES (%s)%%s", strings.Join(wl, "`,`"), strmangle.Placeholders(dialect.UseIndexPlaceholders, len(wl), 1, 1)) [/github/workspace/infra/record/users.go:497-501] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmarks` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"user_id"}), strmangle.WhereClause("`", "`", 0, bookmarkPrimaryKeyColumns), ) [/github/workspace/infra/record/tags.go:1103-1104] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "SELECT `tags`.* FROM `tags` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, tagPrimaryKeyColumns, len(*o)) [/github/workspace/infra/record/bookmark_tag_relations.go:642-646] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmark_tag_relations` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"bookmark_id"}), strmangle.WhereClause("`", "`", 0, bookmarkTagRelationPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmark_tag_relations.go:689-693] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmark_tag_relations` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"tag_id"}), strmangle.WhereClause("`", "`", 0, bookmarkTagRelationPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmark_tag_relations.go:804] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("INSERT INTO `bookmark_tag_relations` (`%s`) %%sVALUES (%s)%%s", strings.Join(wl, "`,`"), strmangle.Placeholders(dialect.UseIndexPlaceholders, len(wl), 1, 1)) [/github/workspace/infra/record/bookmark_tag_relations.go:812] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("SELECT `%s` FROM `bookmark_tag_relations` WHERE %s", strings.Join(returnColumns, "`,`"), strmangle.WhereClause("`", "`", 0, bookmarkTagRelationPrimaryKeyColumns)) [/github/workspace/infra/record/bookmark_tag_relations.go:905-908] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `bookmark_tag_relations` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, wl), strmangle.WhereClause("`", "`", 0, bookmarkTagRelationPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmark_tag_relations.go:986-988] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `bookmark_tag_relations` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, colNames), strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, bookmarkTagRelationPrimaryKeyColumns, len(o))) [/github/workspace/infra/record/tags.go:1048-1049] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "DELETE FROM `tags` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, tagPrimaryKeyColumns, len(o)) [/github/workspace/infra/record/tags.go:891-895] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "SELECT %s FROM `tags` WHERE %s", strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, ret), ","), strmangle.WhereClause("`", "`", 0, nzUniques), ) [/github/workspace/infra/record/tags.go:793-795] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `tags` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, colNames), strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, tagPrimaryKeyColumns, len(o))) [/github/workspace/infra/record/tags.go:712-715] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `tags` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, wl), strmangle.WhereClause("`", "`", 0, tagPrimaryKeyColumns), ) [/github/workspace/infra/record/tags.go:619] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("SELECT `%s` FROM `tags` WHERE %s", strings.Join(returnColumns, "`,`"), strmangle.WhereClause("`", "`", 0, tagPrimaryKeyColumns)) [/github/workspace/infra/record/tags.go:611] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("INSERT INTO `tags` (`%s`) %%sVALUES (%s)%%s", strings.Join(wl, "`,`"), strmangle.Placeholders(dialect.UseIndexPlaceholders, len(wl), 1, 1)) [/github/workspace/infra/record/tags.go:492-496] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmark_tag_relations` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"tag_id"}), strmangle.WhereClause("`", "`", 0, bookmarkTagRelationPrimaryKeyColumns), ) [/github/workspace/infra/record/mysql_upsert.go:38-44] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Fprintf( buf, "INSERT INTO %s (%s) VALUES (%s) ON DUPLICATE KEY UPDATE ", tableName, columns, strmangle.Placeholders(dia.UseIndexPlaceholders, len(whitelist), 1, 1), ) [/github/workspace/infra/record/mysql_upsert.go:28-34] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Fprintf( buf, "INSERT IGNORE INTO %s (%s) VALUES (%s)", tableName, columns, strmangle.Placeholders(dia.UseIndexPlaceholders, len(whitelist), 1, 1), ) [/github/workspace/infra/record/bookmark_tag_relations.go:1083-1087] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "SELECT %s FROM `bookmark_tag_relations` WHERE %s", strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, ret), ","), strmangle.WhereClause("`", "`", 0, nzUniques), ) [/github/workspace/infra/record/bookmark_tag_relations.go:1240-1241] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "DELETE FROM `bookmark_tag_relations` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, bookmarkTagRelationPrimaryKeyColumns, len(o)) [/github/workspace/infra/record/entries.go:1117-1118] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "SELECT `entries`.* FROM `entries` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, entryPrimaryKeyColumns, len(*o)) [/github/workspace/infra/record/bookmarks.go:752-756] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmarks` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"user_id"}), strmangle.WhereClause("`", "`", 0, bookmarkPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmarks.go:799-803] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmarks` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"entry_id"}), strmangle.WhereClause("`", "`", 0, bookmarkPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmarks.go:848-852] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmark_tag_relations` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"bookmark_id"}), strmangle.WhereClause("`", "`", 0, bookmarkTagRelationPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmarks.go:967] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("INSERT INTO `bookmarks` (`%s`) %%sVALUES (%s)%%s", strings.Join(wl, "`,`"), strmangle.Placeholders(dialect.UseIndexPlaceholders, len(wl), 1, 1)) [/github/workspace/infra/record/bookmarks.go:975] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("SELECT `%s` FROM `bookmarks` WHERE %s", strings.Join(returnColumns, "`,`"), strmangle.WhereClause("`", "`", 0, bookmarkPrimaryKeyColumns)) [/github/workspace/infra/record/bookmarks.go:1068-1071] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `bookmarks` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, wl), strmangle.WhereClause("`", "`", 0, bookmarkPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmarks.go:1149-1151] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `bookmarks` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, colNames), strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, bookmarkPrimaryKeyColumns, len(o))) [/github/workspace/infra/record/entries.go:1062-1063] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "DELETE FROM `entries` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, entryPrimaryKeyColumns, len(o)) [/github/workspace/infra/record/entries.go:905-909] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "SELECT %s FROM `entries` WHERE %s", strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, ret), ","), strmangle.WhereClause("`", "`", 0, nzUniques), ) [/github/workspace/infra/record/bookmark_tag_relations.go:1295-1296] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "SELECT `bookmark_tag_relations`.* FROM `bookmark_tag_relations` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, bookmarkTagRelationPrimaryKeyColumns, len(*o)) [/github/workspace/infra/record/entries.go:807-809] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `entries` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, colNames), strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, entryPrimaryKeyColumns, len(o))) [/github/workspace/infra/record/entries.go:726-729] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("UPDATE `entries` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, wl), strmangle.WhereClause("`", "`", 0, entryPrimaryKeyColumns), ) [/github/workspace/infra/record/entries.go:633] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("SELECT `%s` FROM `entries` WHERE %s", strings.Join(returnColumns, "`,`"), strmangle.WhereClause("`", "`", 0, entryPrimaryKeyColumns)) [/github/workspace/infra/record/entries.go:625] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf("INSERT INTO `entries` (`%s`) %%sVALUES (%s)%%s", strings.Join(wl, "`,`"), strmangle.Placeholders(dialect.UseIndexPlaceholders, len(wl), 1, 1)) [/github/workspace/infra/record/entries.go:506-510] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "UPDATE `bookmarks` SET %s WHERE %s", strmangle.SetParamNames("`", "`", 0, []string{"entry_id"}), strmangle.WhereClause("`", "`", 0, bookmarkPrimaryKeyColumns), ) [/github/workspace/infra/record/bookmarks.go:1458-1459] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "SELECT `bookmarks`.* FROM `bookmarks` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, bookmarkPrimaryKeyColumns, len(*o)) [/github/workspace/infra/record/bookmarks.go:1246-1250] - G201 (CWE-89): SQL string formatting (Confidence: HIGH, Severity: MEDIUM) > fmt.Sprintf( "SELECT %s FROM `bookmarks` WHERE %s", strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, ret), ","), strmangle.WhereClause("`", "`", 0, nzUniques), ) [/github/workspace/infra/record/users.go:1108-1109] - G202 (CWE-89): SQL string concatenation (Confidence: HIGH, Severity: MEDIUM) > "SELECT `users`.* FROM `users` WHERE " + strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 0, userPrimaryKeyColumns, len(*o)) [/github/workspace/infra/record/bookmarks.go:1217] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmarks.go:1215] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/bookmarks.go:1213] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmarks.go:1211] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/bookmarks.go:1209] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmarks.go:1207] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(insertColumns.Kind)) [/github/workspace/infra/record/entries.go:861] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(updateColumns.Kind)) [/github/workspace/infra/record/bookmarks.go:1206] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/entries.go:865] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/entries.go:866] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(insertColumns.Kind)) [/github/workspace/infra/record/entries.go:868] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/entries.go:870] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/entries.go:872] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/entries.go:874] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/entries.go:876] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmarks.go:1204] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmarks.go:1202] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(updateColumns.Kind)) [/github/workspace/infra/store/mysql/user_store.go:51] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > tx.Rollback() [/github/workspace/infra/record/bookmark_tag_relations.go:1054] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmark_tag_relations.go:1052] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/mysql_upsert.go:48] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte(',') [/github/workspace/infra/record/mysql_upsert.go:51] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(quoted) [/github/workspace/infra/record/mysql_upsert.go:52] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(" = VALUES(") [/github/workspace/infra/record/mysql_upsert.go:53] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(quoted) [/github/workspace/infra/record/mysql_upsert.go:54] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte(')') [/github/workspace/infra/record/bookmark_tag_relations.go:1050] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmark_tag_relations.go:1048] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/bookmark_tag_relations.go:1046] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmark_tag_relations.go:1044] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(insertColumns.Kind)) [/github/workspace/infra/record/bookmark_tag_relations.go:1043] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/tags.go:847] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(updateColumns.Kind)) [/github/workspace/infra/record/tags.go:849] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/tags.go:851] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/tags.go:852] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(insertColumns.Kind)) [/github/workspace/infra/record/tags.go:854] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/tags.go:856] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/tags.go:858] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/tags.go:860] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/tags.go:862] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmark_tag_relations.go:1041] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/bookmark_tag_relations.go:1039] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(updateColumns.Kind)) [/github/workspace/infra/record/boil_types.go:46] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(nz) [/github/workspace/infra/record/boil_types.go:43] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/boil_types.go:39] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(w) [/github/workspace/infra/record/boil_types.go:37] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(cols.Kind)) [/github/workspace/web/user.go:154] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > u.session.Remove(uuID) [/github/workspace/infra/store/mysql/user_store.go:95] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > tx.Rollback() [/github/workspace/infra/record/users.go:852] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(updateColumns.Kind)) [/github/workspace/infra/record/users.go:854] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/users.go:856] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/users.go:857] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(insertColumns.Kind)) [/github/workspace/infra/record/users.go:859] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/users.go:861] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/users.go:863] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/record/users.go:865] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/github/workspace/infra/record/users.go:867] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/github/workspace/infra/store/mysql/user_store.go:90] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > tx.Rollback() [/github/workspace/infra/store/mysql/user_store.go:57] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > tx.Rollback() [/github/workspace/infra/record/entries.go:863] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) Summary: Files: 22 Lines: 7019 Nosec: 0 Issues: 104 ``` [Code Reference](https://github.com/securego/gosec#available-rules)
github-actions[bot] commented 4 years ago

⚠ errcheck Failed

error: failed to check packages: errors while loading package github.com/anatofuz/BookmarkTarou/infra/store/mysql: [/github/workspace/infra/store/mysql/user_store.go:80:14: Is not declared by package errors /github/workspace/infra/store/mysql/user_store.go:27:14: Is not declared by package errors]
github-actions[bot] commented 4 years ago

⚠ staticcheck Failed

-: could not analyze dependency github.com/anatofuz/BookmarkTarou/app/config of github.com/anatofuz/BookmarkTarou (compile)
-: could not analyze dependency github.com/anatofuz/BookmarkTarou/infra/store/mysql of github.com/anatofuz/BookmarkTarou/app/config (compile)
infra/store/kvs/user_session_store.go:50:20: error strings should not end with punctuation or a newline (ST1005)
infra/store/mysql/user_store.go:80:14: Is not declared by package errors (compile)
model/user.go:21:5: error var UserErrNotFound should have name of the form ErrFoo (ST1012)

Checks Document

github-actions[bot] commented 4 years ago

⚠ vet Failed

# github.com/anatofuz/BookmarkTarou/infra/store/mysql
infra/store/mysql/user_store.go:27:7: undefined: errors.Is
infra/store/mysql/user_store.go:80:7: undefined: errors.Is
note: module requires Go 1.13
# github.com/anatofuz/BookmarkTarou/infra/store/kvs
infra/store/kvs/user_session_store.go:26:15: Errorf format %w has unknown verb w
infra/store/kvs/user_session_store.go:29:15: Errorf format %w has unknown verb w
infra/store/kvs/user_session_store.go:37:10: Errorf format %w has unknown verb w
infra/store/kvs/user_session_store.go:41:10: Errorf format %w has unknown verb w
# github.com/anatofuz/BookmarkTarou/app
app/usr.go:35:15: Errorf format %w has unknown verb w
app/usr.go:40:15: Errorf format %w has unknown verb w
app/usr.go:54:15: Errorf format %w has unknown verb w
app/usr.go:58:15: Errorf format %w has unknown verb w
app/usr.go:65:15: Errorf format %w has unknown verb w
# github.com/anatofuz/BookmarkTarou/web
web/user.go:103:10: Errorf format %w has unknown verb w
web/user.go:121:10: Errorf format %w has unknown verb w
web/user.go:131:15: Errorf format %w has unknown verb w
web/user.go:139:15: Errorf format %w has unknown verb w