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

⚠ gofmt Failed

app/config/config.go ```diff "os" "strconv" - "golang.org/x/xerrors" "github.com/anatofuz/BookmarkTarou/infra/store" + "golang.org/x/xerrors" ) // AppComponent is a DI container of Bookmark app. func CreateAppComponent(config *Config) (AppComponent, error) { db, err := sqlx.Open("mysql", config.dsn) if err != nil { - return nil, xerrors.Errorf("failed open sqlx : %w",err) + return nil, xerrors.Errorf("failed open sqlx : %w", err) } - return &appComponentImpl{bookmarkDB:db}, nil + return &appComponentImpl{bookmarkDB: db}, nil } func (app *appComponentImpl) UserStore() store.UserStore { ```
infra/store/mysql/user_store.go ```diff import ( "context" - "github.com/jmoiron/sqlx" "github.com/anatofuz/BookmarkTarou/infra/store" "github.com/anatofuz/BookmarkTarou/model" + "github.com/jmoiron/sqlx" ) type userStoreImpl struct { ```
github-actions[bot] commented 4 years ago

⚠ golint Failed

Found 3 lint suggestions; failing.

Show Detail ``` app/config/config.go:23:6: exported type Config should have comment or be unexported app/config/config.go:28:1: exported function CreateDiConfig should have comment or be unexported infra/store/mysql/user_store.go:14:1: exported function NewUserStore should have comment or be unexported ```
github-actions[bot] commented 4 years ago

⚠ gofmt Failed

infra/store/mysql/user_store.go ```diff import ( "context" - "github.com/jmoiron/sqlx" "github.com/anatofuz/BookmarkTarou/infra/store" "github.com/anatofuz/BookmarkTarou/model" + "github.com/jmoiron/sqlx" ) type userStoreImpl struct { ```
github-actions[bot] commented 4 years ago

⚠ golint Failed

Found 3 lint suggestions; failing.

Show Detail ``` app/config/config.go:23:6: exported type Config should have comment or be unexported app/config/config.go:28:1: exported function CreateDiConfig should have comment or be unexported infra/store/mysql/user_store.go:14:1: exported function NewUserStore should have comment or be unexported ```
github-actions[bot] commented 4 years ago

⚠ gofmt Failed

infra/store/mysql/user_store.go ```diff import ( "context" - "github.com/jmoiron/sqlx" "github.com/anatofuz/BookmarkTarou/infra/store" "github.com/anatofuz/BookmarkTarou/model" + "github.com/jmoiron/sqlx" ) type userStoreImpl struct { ```
github-actions[bot] commented 4 years ago

⚠ golint Failed

Found 3 lint suggestions; failing.

Show Detail ``` app/config/config.go:23:6: exported type Config should have comment or be unexported app/config/config.go:28:1: exported function CreateDiConfig should have comment or be unexported infra/store/mysql/user_store.go:14:1: exported function NewUserStore should have comment or be unexported ```
github-actions[bot] commented 4 years ago

⚠ golint Failed

Found 3 lint suggestions; failing.

Show Detail ``` app/config/config.go:23:6: exported type Config should have comment or be unexported app/config/config.go:28:1: exported function CreateDiConfig should have comment or be unexported infra/store/mysql/user_store.go:14:1: exported function NewUserStore should have comment or be unexported ```
github-actions[bot] commented 4 years ago

⚠ gofmt Failed

infra/store/mysql/user_store.go ```diff import ( "context" - "github.com/jmoiron/sqlx" "github.com/anatofuz/BookmarkTarou/infra/store" "github.com/anatofuz/BookmarkTarou/model" + "github.com/jmoiron/sqlx" ) type userStoreImpl struct { ```
github-actions[bot] commented 4 years ago

⚠ golint Failed

Found 3 lint suggestions; failing.

Show Detail ``` app/config/config.go:23:6: exported type Config should have comment or be unexported app/config/config.go:28:1: exported function CreateDiConfig should have comment or be unexported infra/store/mysql/user_store.go:14:1: exported function NewUserStore should have comment or be unexported ```
github-actions[bot] commented 4 years ago

⚠ gofmt Failed

infra/store/mysql/user_store.go ```diff import ( "context" - "github.com/jmoiron/sqlx" "github.com/anatofuz/BookmarkTarou/infra/store" "github.com/anatofuz/BookmarkTarou/model" + "github.com/jmoiron/sqlx" ) type userStoreImpl struct { ```
github-actions[bot] commented 4 years ago

⚠ golint Failed

Found 3 lint suggestions; failing.

Show Detail ``` app/config/config.go:23:6: exported type Config should have comment or be unexported app/config/config.go:28:1: exported function CreateDiConfig should have comment or be unexported infra/store/mysql/user_store.go:14:1: exported function NewUserStore should have comment or be unexported ```
github-actions[bot] commented 4 years ago

⚠ gofmt Failed

infra/store/mysql/user_store.go ```diff import ( "context" - "github.com/jmoiron/sqlx" "github.com/anatofuz/BookmarkTarou/infra/store" "github.com/anatofuz/BookmarkTarou/model" + "github.com/jmoiron/sqlx" ) type userStoreImpl struct { ```
github-actions[bot] commented 4 years ago

⚠ gosec Failed

Summary:
   Files: 16
   Lines: 6552
   Nosec: 0
  Issues: 99
Show Detail ``` Results: [/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: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/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: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: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/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/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/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/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/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/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/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/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: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/entries.go:866] - 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/bookmarks.go:1217] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/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: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/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/bookmark_tag_relations.go:1054] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/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: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:1044] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(insertColumns.Kind)) [/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/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: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/bookmark_tag_relations.go:1043] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') Summary: Files: 16 Lines: 6552 Nosec: 0 Issues: 99 ``` [Code Reference](https://github.com/securego/gosec#available-rules)
github-actions[bot] commented 4 years ago

⚠ errcheck Failed

infra/record/bookmark_tag_relations.go:651:15:  fmt.Fprintln(writer, updateQuery)
infra/record/bookmark_tag_relations.go:652:15:  fmt.Fprintln(writer, values)
infra/record/bookmark_tag_relations.go:698:15:  fmt.Fprintln(writer, updateQuery)
infra/record/bookmark_tag_relations.go:699:15:  fmt.Fprintln(writer, values)
infra/record/bookmark_tag_relations.go:823:15:  fmt.Fprintln(writer, cache.query)
infra/record/bookmark_tag_relations.go:824:15:  fmt.Fprintln(writer, vals)
infra/record/bookmark_tag_relations.go:855:15:  fmt.Fprintln(writer, cache.retQuery)
infra/record/bookmark_tag_relations.go:856:15:  fmt.Fprintln(writer, identifierCols...)
infra/record/bookmark_tag_relations.go:919:15:  fmt.Fprintln(writer, cache.query)
infra/record/bookmark_tag_relations.go:920:15:  fmt.Fprintln(writer, values)
infra/record/bookmark_tag_relations.go:992:15:  fmt.Fprintln(writer, sql)
infra/record/bookmark_tag_relations.go:993:15:  fmt.Fprintln(writer, args...)
infra/record/bookmark_tag_relations.go:1110:15: fmt.Fprintln(writer, cache.query)
infra/record/bookmark_tag_relations.go:1111:15: fmt.Fprintln(writer, vals)
infra/record/bookmark_tag_relations.go:1145:15: fmt.Fprintln(writer, cache.retQuery)
infra/record/bookmark_tag_relations.go:1146:15: fmt.Fprintln(writer, nzUniqueCols...)
infra/record/bookmark_tag_relations.go:1179:15: fmt.Fprintln(writer, sql)
infra/record/bookmark_tag_relations.go:1180:15: fmt.Fprintln(writer, args...)
infra/record/bookmark_tag_relations.go:1245:15: fmt.Fprintln(writer, sql)
infra/record/bookmark_tag_relations.go:1246:15: fmt.Fprintln(writer, args)
infra/record/bookmark_tag_relations.go:1317:15: fmt.Fprintln(writer, sql)
infra/record/bookmark_tag_relations.go:1318:15: fmt.Fprintln(writer, iD)
infra/record/bookmarks.go:761:15:   fmt.Fprintln(writer, updateQuery)
infra/record/bookmarks.go:762:15:   fmt.Fprintln(writer, values)
infra/record/bookmarks.go:808:15:   fmt.Fprintln(writer, updateQuery)
infra/record/bookmarks.go:809:15:   fmt.Fprintln(writer, values)
infra/record/bookmarks.go:857:17:   fmt.Fprintln(writer, updateQuery)
infra/record/bookmarks.go:858:17:   fmt.Fprintln(writer, values)
infra/record/bookmarks.go:986:15:   fmt.Fprintln(writer, cache.query)
infra/record/bookmarks.go:987:15:   fmt.Fprintln(writer, vals)
infra/record/bookmarks.go:1018:15:  fmt.Fprintln(writer, cache.retQuery)
infra/record/bookmarks.go:1019:15:  fmt.Fprintln(writer, identifierCols...)
infra/record/bookmarks.go:1082:15:  fmt.Fprintln(writer, cache.query)
infra/record/bookmarks.go:1083:15:  fmt.Fprintln(writer, values)
infra/record/bookmarks.go:1155:15:  fmt.Fprintln(writer, sql)
infra/record/bookmarks.go:1156:15:  fmt.Fprintln(writer, args...)
infra/record/bookmarks.go:1273:15:  fmt.Fprintln(writer, cache.query)
infra/record/bookmarks.go:1274:15:  fmt.Fprintln(writer, vals)
infra/record/bookmarks.go:1308:15:  fmt.Fprintln(writer, cache.retQuery)
infra/record/bookmarks.go:1309:15:  fmt.Fprintln(writer, nzUniqueCols...)
infra/record/bookmarks.go:1342:15:  fmt.Fprintln(writer, sql)
infra/record/bookmarks.go:1343:15:  fmt.Fprintln(writer, args...)
infra/record/bookmarks.go:1408:15:  fmt.Fprintln(writer, sql)
infra/record/bookmarks.go:1409:15:  fmt.Fprintln(writer, args)
infra/record/bookmarks.go:1480:15:  fmt.Fprintln(writer, sql)
infra/record/bookmarks.go:1481:15:  fmt.Fprintln(writer, iD)
infra/record/entries.go:515:17: fmt.Fprintln(writer, updateQuery)
infra/record/entries.go:516:17: fmt.Fprintln(writer, values)
infra/record/entries.go:644:15: fmt.Fprintln(writer, cache.query)
infra/record/entries.go:645:15: fmt.Fprintln(writer, vals)
infra/record/entries.go:676:15: fmt.Fprintln(writer, cache.retQuery)
infra/record/entries.go:677:15: fmt.Fprintln(writer, identifierCols...)
infra/record/entries.go:740:15: fmt.Fprintln(writer, cache.query)
infra/record/entries.go:741:15: fmt.Fprintln(writer, values)
infra/record/entries.go:813:15: fmt.Fprintln(writer, sql)
infra/record/entries.go:814:15: fmt.Fprintln(writer, args...)
infra/record/entries.go:932:15: fmt.Fprintln(writer, cache.query)
infra/record/entries.go:933:15: fmt.Fprintln(writer, vals)
infra/record/entries.go:967:15: fmt.Fprintln(writer, cache.retQuery)
infra/record/entries.go:968:15: fmt.Fprintln(writer, nzUniqueCols...)
infra/record/entries.go:1001:15:    fmt.Fprintln(writer, sql)
infra/record/entries.go:1002:15:    fmt.Fprintln(writer, args...)
infra/record/entries.go:1067:15:    fmt.Fprintln(writer, sql)
infra/record/entries.go:1068:15:    fmt.Fprintln(writer, args)
infra/record/entries.go:1139:15:    fmt.Fprintln(writer, sql)
infra/record/entries.go:1140:15:    fmt.Fprintln(writer, iD)
infra/record/mysql_main_test.go:158:14: fmt.Fprintln(tmp, "[client]")
infra/record/mysql_main_test.go:159:13: fmt.Fprintf(tmp, "host=%s\n", m.host)
infra/record/mysql_main_test.go:160:13: fmt.Fprintf(tmp, "port=%d\n", m.port)
infra/record/mysql_main_test.go:161:13: fmt.Fprintf(tmp, "user=%s\n", m.user)
infra/record/mysql_main_test.go:163:14: fmt.Fprintf(tmp, "password=%s\n", m.pass)
infra/record/mysql_main_test.go:165:13: fmt.Fprintf(tmp, "ssl-mode=%s\n", m.sslMode(m.sslmode))
infra/record/mysql_main_test.go:167:15: fmt.Fprintln(tmp, "protocol=tcp")
infra/record/mysql_main_test.go:170:14: fmt.Fprintln(tmp, "[mysqldump]")
infra/record/mysql_main_test.go:171:13: fmt.Fprintf(tmp, "host=%s\n", m.host)
infra/record/mysql_main_test.go:172:13: fmt.Fprintf(tmp, "port=%d\n", m.port)
infra/record/mysql_main_test.go:173:13: fmt.Fprintf(tmp, "user=%s\n", m.user)
infra/record/mysql_main_test.go:175:14: fmt.Fprintf(tmp, "password=%s\n", m.pass)
infra/record/mysql_main_test.go:177:13: fmt.Fprintf(tmp, "ssl-mode=%s\n", m.sslMode(m.sslmode))
infra/record/mysql_main_test.go:179:15: fmt.Fprintln(tmp, "protocol=tcp")
infra/record/tags.go:501:17:    fmt.Fprintln(writer, updateQuery)
infra/record/tags.go:502:17:    fmt.Fprintln(writer, values)
infra/record/tags.go:630:15:    fmt.Fprintln(writer, cache.query)
infra/record/tags.go:631:15:    fmt.Fprintln(writer, vals)
infra/record/tags.go:662:15:    fmt.Fprintln(writer, cache.retQuery)
infra/record/tags.go:663:15:    fmt.Fprintln(writer, identifierCols...)
infra/record/tags.go:726:15:    fmt.Fprintln(writer, cache.query)
infra/record/tags.go:727:15:    fmt.Fprintln(writer, values)
infra/record/tags.go:799:15:    fmt.Fprintln(writer, sql)
infra/record/tags.go:800:15:    fmt.Fprintln(writer, args...)
infra/record/tags.go:918:15:    fmt.Fprintln(writer, cache.query)
infra/record/tags.go:919:15:    fmt.Fprintln(writer, vals)
infra/record/tags.go:953:15:    fmt.Fprintln(writer, cache.retQuery)
infra/record/tags.go:954:15:    fmt.Fprintln(writer, nzUniqueCols...)
infra/record/tags.go:987:15:    fmt.Fprintln(writer, sql)
infra/record/tags.go:988:15:    fmt.Fprintln(writer, args...)
infra/record/tags.go:1053:15:   fmt.Fprintln(writer, sql)
infra/record/tags.go:1054:15:   fmt.Fprintln(writer, args)
infra/record/tags.go:1125:15:   fmt.Fprintln(writer, sql)
infra/record/tags.go:1126:15:   fmt.Fprintln(writer, iD)
infra/record/users.go:506:17:   fmt.Fprintln(writer, updateQuery)
infra/record/users.go:507:17:   fmt.Fprintln(writer, values)
infra/record/users.go:635:15:   fmt.Fprintln(writer, cache.query)
infra/record/users.go:636:15:   fmt.Fprintln(writer, vals)
infra/record/users.go:667:15:   fmt.Fprintln(writer, cache.retQuery)
infra/record/users.go:668:15:   fmt.Fprintln(writer, identifierCols...)
infra/record/users.go:731:15:   fmt.Fprintln(writer, cache.query)
infra/record/users.go:732:15:   fmt.Fprintln(writer, values)
infra/record/users.go:804:15:   fmt.Fprintln(writer, sql)
infra/record/users.go:805:15:   fmt.Fprintln(writer, args...)
infra/record/users.go:923:15:   fmt.Fprintln(writer, cache.query)
infra/record/users.go:924:15:   fmt.Fprintln(writer, vals)
infra/record/users.go:958:15:   fmt.Fprintln(writer, cache.retQuery)
infra/record/users.go:959:15:   fmt.Fprintln(writer, nzUniqueCols...)
infra/record/users.go:992:15:   fmt.Fprintln(writer, sql)
infra/record/users.go:993:15:   fmt.Fprintln(writer, args...)
infra/record/users.go:1058:15:  fmt.Fprintln(writer, sql)
infra/record/users.go:1059:15:  fmt.Fprintln(writer, args)
infra/record/users.go:1130:15:  fmt.Fprintln(writer, sql)
infra/record/users.go:1131:15:  fmt.Fprintln(writer, iD)
github-actions[bot] commented 4 years ago

⚠ golint Failed

Found 3 lint suggestions; failing.

Show Detail ``` app/config/config.go:23:6: exported type Config should have comment or be unexported app/config/config.go:28:1: exported function CreateDiConfig should have comment or be unexported infra/store/mysql/user_store.go:14:1: exported function NewUserStore should have comment or be unexported ```
github-actions[bot] commented 4 years ago

⚠ gofmt Failed

infra/store/mysql/user_store.go ```diff import ( "context" - "github.com/jmoiron/sqlx" "github.com/anatofuz/BookmarkTarou/infra/store" "github.com/anatofuz/BookmarkTarou/model" + "github.com/jmoiron/sqlx" ) type userStoreImpl struct { ```
github-actions[bot] commented 4 years ago

⚠ gosec Failed

Summary:
   Files: 16
   Lines: 6552
   Nosec: 0
  Issues: 99
Show Detail ``` Results: [/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: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/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: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: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/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/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/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/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/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/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/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/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: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/entries.go:866] - 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/bookmarks.go:1217] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/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: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/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/bookmark_tag_relations.go:1054] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(c) [/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: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:1044] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(insertColumns.Kind)) [/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/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: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/bookmark_tag_relations.go:1043] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') Summary: Files: 16 Lines: 6552 Nosec: 0 Issues: 99 ``` [Code Reference](https://github.com/securego/gosec#available-rules)
github-actions[bot] commented 4 years ago

⚠ errcheck Failed

infra/record/bookmark_tag_relations.go:651:15:  fmt.Fprintln(writer, updateQuery)
infra/record/bookmark_tag_relations.go:652:15:  fmt.Fprintln(writer, values)
infra/record/bookmark_tag_relations.go:698:15:  fmt.Fprintln(writer, updateQuery)
infra/record/bookmark_tag_relations.go:699:15:  fmt.Fprintln(writer, values)
infra/record/bookmark_tag_relations.go:823:15:  fmt.Fprintln(writer, cache.query)
infra/record/bookmark_tag_relations.go:824:15:  fmt.Fprintln(writer, vals)
infra/record/bookmark_tag_relations.go:855:15:  fmt.Fprintln(writer, cache.retQuery)
infra/record/bookmark_tag_relations.go:856:15:  fmt.Fprintln(writer, identifierCols...)
infra/record/bookmark_tag_relations.go:919:15:  fmt.Fprintln(writer, cache.query)
infra/record/bookmark_tag_relations.go:920:15:  fmt.Fprintln(writer, values)
infra/record/bookmark_tag_relations.go:992:15:  fmt.Fprintln(writer, sql)
infra/record/bookmark_tag_relations.go:993:15:  fmt.Fprintln(writer, args...)
infra/record/bookmark_tag_relations.go:1110:15: fmt.Fprintln(writer, cache.query)
infra/record/bookmark_tag_relations.go:1111:15: fmt.Fprintln(writer, vals)
infra/record/bookmark_tag_relations.go:1145:15: fmt.Fprintln(writer, cache.retQuery)
infra/record/bookmark_tag_relations.go:1146:15: fmt.Fprintln(writer, nzUniqueCols...)
infra/record/bookmark_tag_relations.go:1179:15: fmt.Fprintln(writer, sql)
infra/record/bookmark_tag_relations.go:1180:15: fmt.Fprintln(writer, args...)
infra/record/bookmark_tag_relations.go:1245:15: fmt.Fprintln(writer, sql)
infra/record/bookmark_tag_relations.go:1246:15: fmt.Fprintln(writer, args)
infra/record/bookmark_tag_relations.go:1317:15: fmt.Fprintln(writer, sql)
infra/record/bookmark_tag_relations.go:1318:15: fmt.Fprintln(writer, iD)
infra/record/bookmarks.go:761:15:   fmt.Fprintln(writer, updateQuery)
infra/record/bookmarks.go:762:15:   fmt.Fprintln(writer, values)
infra/record/bookmarks.go:808:15:   fmt.Fprintln(writer, updateQuery)
infra/record/bookmarks.go:809:15:   fmt.Fprintln(writer, values)
infra/record/bookmarks.go:857:17:   fmt.Fprintln(writer, updateQuery)
infra/record/bookmarks.go:858:17:   fmt.Fprintln(writer, values)
infra/record/bookmarks.go:986:15:   fmt.Fprintln(writer, cache.query)
infra/record/bookmarks.go:987:15:   fmt.Fprintln(writer, vals)
infra/record/bookmarks.go:1018:15:  fmt.Fprintln(writer, cache.retQuery)
infra/record/bookmarks.go:1019:15:  fmt.Fprintln(writer, identifierCols...)
infra/record/bookmarks.go:1082:15:  fmt.Fprintln(writer, cache.query)
infra/record/bookmarks.go:1083:15:  fmt.Fprintln(writer, values)
infra/record/bookmarks.go:1155:15:  fmt.Fprintln(writer, sql)
infra/record/bookmarks.go:1156:15:  fmt.Fprintln(writer, args...)
infra/record/bookmarks.go:1273:15:  fmt.Fprintln(writer, cache.query)
infra/record/bookmarks.go:1274:15:  fmt.Fprintln(writer, vals)
infra/record/bookmarks.go:1308:15:  fmt.Fprintln(writer, cache.retQuery)
infra/record/bookmarks.go:1309:15:  fmt.Fprintln(writer, nzUniqueCols...)
infra/record/bookmarks.go:1342:15:  fmt.Fprintln(writer, sql)
infra/record/bookmarks.go:1343:15:  fmt.Fprintln(writer, args...)
infra/record/bookmarks.go:1408:15:  fmt.Fprintln(writer, sql)
infra/record/bookmarks.go:1409:15:  fmt.Fprintln(writer, args)
infra/record/bookmarks.go:1480:15:  fmt.Fprintln(writer, sql)
infra/record/bookmarks.go:1481:15:  fmt.Fprintln(writer, iD)
infra/record/entries.go:515:17: fmt.Fprintln(writer, updateQuery)
infra/record/entries.go:516:17: fmt.Fprintln(writer, values)
infra/record/entries.go:644:15: fmt.Fprintln(writer, cache.query)
infra/record/entries.go:645:15: fmt.Fprintln(writer, vals)
infra/record/entries.go:676:15: fmt.Fprintln(writer, cache.retQuery)
infra/record/entries.go:677:15: fmt.Fprintln(writer, identifierCols...)
infra/record/entries.go:740:15: fmt.Fprintln(writer, cache.query)
infra/record/entries.go:741:15: fmt.Fprintln(writer, values)
infra/record/entries.go:813:15: fmt.Fprintln(writer, sql)
infra/record/entries.go:814:15: fmt.Fprintln(writer, args...)
infra/record/entries.go:932:15: fmt.Fprintln(writer, cache.query)
infra/record/entries.go:933:15: fmt.Fprintln(writer, vals)
infra/record/entries.go:967:15: fmt.Fprintln(writer, cache.retQuery)
infra/record/entries.go:968:15: fmt.Fprintln(writer, nzUniqueCols...)
infra/record/entries.go:1001:15:    fmt.Fprintln(writer, sql)
infra/record/entries.go:1002:15:    fmt.Fprintln(writer, args...)
infra/record/entries.go:1067:15:    fmt.Fprintln(writer, sql)
infra/record/entries.go:1068:15:    fmt.Fprintln(writer, args)
infra/record/entries.go:1139:15:    fmt.Fprintln(writer, sql)
infra/record/entries.go:1140:15:    fmt.Fprintln(writer, iD)
infra/record/mysql_main_test.go:158:14: fmt.Fprintln(tmp, "[client]")
infra/record/mysql_main_test.go:159:13: fmt.Fprintf(tmp, "host=%s\n", m.host)
infra/record/mysql_main_test.go:160:13: fmt.Fprintf(tmp, "port=%d\n", m.port)
infra/record/mysql_main_test.go:161:13: fmt.Fprintf(tmp, "user=%s\n", m.user)
infra/record/mysql_main_test.go:163:14: fmt.Fprintf(tmp, "password=%s\n", m.pass)
infra/record/mysql_main_test.go:165:13: fmt.Fprintf(tmp, "ssl-mode=%s\n", m.sslMode(m.sslmode))
infra/record/mysql_main_test.go:167:15: fmt.Fprintln(tmp, "protocol=tcp")
infra/record/mysql_main_test.go:170:14: fmt.Fprintln(tmp, "[mysqldump]")
infra/record/mysql_main_test.go:171:13: fmt.Fprintf(tmp, "host=%s\n", m.host)
infra/record/mysql_main_test.go:172:13: fmt.Fprintf(tmp, "port=%d\n", m.port)
infra/record/mysql_main_test.go:173:13: fmt.Fprintf(tmp, "user=%s\n", m.user)
infra/record/mysql_main_test.go:175:14: fmt.Fprintf(tmp, "password=%s\n", m.pass)
infra/record/mysql_main_test.go:177:13: fmt.Fprintf(tmp, "ssl-mode=%s\n", m.sslMode(m.sslmode))
infra/record/mysql_main_test.go:179:15: fmt.Fprintln(tmp, "protocol=tcp")
infra/record/tags.go:501:17:    fmt.Fprintln(writer, updateQuery)
infra/record/tags.go:502:17:    fmt.Fprintln(writer, values)
infra/record/tags.go:630:15:    fmt.Fprintln(writer, cache.query)
infra/record/tags.go:631:15:    fmt.Fprintln(writer, vals)
infra/record/tags.go:662:15:    fmt.Fprintln(writer, cache.retQuery)
infra/record/tags.go:663:15:    fmt.Fprintln(writer, identifierCols...)
infra/record/tags.go:726:15:    fmt.Fprintln(writer, cache.query)
infra/record/tags.go:727:15:    fmt.Fprintln(writer, values)
infra/record/tags.go:799:15:    fmt.Fprintln(writer, sql)
infra/record/tags.go:800:15:    fmt.Fprintln(writer, args...)
infra/record/tags.go:918:15:    fmt.Fprintln(writer, cache.query)
infra/record/tags.go:919:15:    fmt.Fprintln(writer, vals)
infra/record/tags.go:953:15:    fmt.Fprintln(writer, cache.retQuery)
infra/record/tags.go:954:15:    fmt.Fprintln(writer, nzUniqueCols...)
infra/record/tags.go:987:15:    fmt.Fprintln(writer, sql)
infra/record/tags.go:988:15:    fmt.Fprintln(writer, args...)
infra/record/tags.go:1053:15:   fmt.Fprintln(writer, sql)
infra/record/tags.go:1054:15:   fmt.Fprintln(writer, args)
infra/record/tags.go:1125:15:   fmt.Fprintln(writer, sql)
infra/record/tags.go:1126:15:   fmt.Fprintln(writer, iD)
infra/record/users.go:506:17:   fmt.Fprintln(writer, updateQuery)
infra/record/users.go:507:17:   fmt.Fprintln(writer, values)
infra/record/users.go:635:15:   fmt.Fprintln(writer, cache.query)
infra/record/users.go:636:15:   fmt.Fprintln(writer, vals)
infra/record/users.go:667:15:   fmt.Fprintln(writer, cache.retQuery)
infra/record/users.go:668:15:   fmt.Fprintln(writer, identifierCols...)
infra/record/users.go:731:15:   fmt.Fprintln(writer, cache.query)
infra/record/users.go:732:15:   fmt.Fprintln(writer, values)
infra/record/users.go:804:15:   fmt.Fprintln(writer, sql)
infra/record/users.go:805:15:   fmt.Fprintln(writer, args...)
infra/record/users.go:923:15:   fmt.Fprintln(writer, cache.query)
infra/record/users.go:924:15:   fmt.Fprintln(writer, vals)
infra/record/users.go:958:15:   fmt.Fprintln(writer, cache.retQuery)
infra/record/users.go:959:15:   fmt.Fprintln(writer, nzUniqueCols...)
infra/record/users.go:992:15:   fmt.Fprintln(writer, sql)
infra/record/users.go:993:15:   fmt.Fprintln(writer, args...)
infra/record/users.go:1058:15:  fmt.Fprintln(writer, sql)
infra/record/users.go:1059:15:  fmt.Fprintln(writer, args)
infra/record/users.go:1130:15:  fmt.Fprintln(writer, sql)
infra/record/users.go:1131:15:  fmt.Fprintln(writer, iD)
github-actions[bot] commented 4 years ago

⚠ gosec Failed

Summary:
   Files: 16
   Lines: 6616
   Nosec: 0
  Issues: 105
Show Detail ``` Results: Golang errors in file: [/github/workspace/app/config/config.go]: > [line 62 : column 28] - cannot use app.bookmarkDB (variable of type *sqlx.DB) as *sql.DB value in argument to mysql.NewUserStore Golang errors in file: [/github/workspace/infra/store/mysql/user_store.go]: > [line 28 : column 14] - Is not declared by package errors > [line 71 : 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:42] - 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:43] - G103 (CWE-242): Use of unsafe calls should be audited (Confidence: HIGH, Severity: LOW) > unsafe.Pointer(&password) [/github/workspace/infra/store/mysql/user_store.go:52] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > tx.Rollback() [/github/workspace/infra/store/mysql/user_store.go:58] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > tx.Rollback() [/github/workspace/infra/store/mysql/user_store.go:81] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > tx.Rollback() [/github/workspace/infra/store/mysql/user_store.go:86] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > tx.Rollback() Summary: Files: 16 Lines: 6616 Nosec: 0 Issues: 105 ``` [Code Reference](https://github.com/securego/gosec#available-rules)
github-actions[bot] commented 4 years ago

⚠ golint Failed

Found 3 lint suggestions; failing.

Show Detail ``` app/config/config.go:23:6: exported type Config should have comment or be unexported app/config/config.go:28:1: exported function CreateDiConfig should have comment or be unexported model/user.go:15:5: error var UserErrNotFound should have name of the form ErrFoo ```
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:71:14: Is not declared by package errors /github/workspace/infra/store/mysql/user_store.go:28: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:28:7: undefined: errors.Is
infra/store/mysql/user_store.go:71:7: undefined: errors.Is
note: module requires Go 1.13
github-actions[bot] commented 4 years ago

⚠ staticcheck Failed

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

Checks Document

github-actions[bot] commented 4 years ago

⚠ golint Failed

Found 4 lint suggestions; failing.

Show Detail ``` app/run.go:11:1: exported function Run should have comment or be unexported app/config/config.go:12:2: a blank import should be only in a main or test package, or have a comment justifying it model/user.go:15:5: error var UserErrNotFound should have name of the form ErrFoo web/top.go:8:1: exported function TopRender 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:71:14: Is not declared by package errors /github/workspace/infra/store/mysql/user_store.go:28: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:28:7: undefined: errors.Is
infra/store/mysql/user_store.go:71:7: undefined: errors.Is
note: module requires Go 1.13
github-actions[bot] commented 4 years ago

⚠ gosec Failed

Summary:
   Files: 18
   Lines: 6671
   Nosec: 0
  Issues: 106
Show Detail ``` Results: Golang errors in file: [/github/workspace/infra/store/mysql/user_store.go]: > [line 28 : column 14] - Is not declared by package errors > [line 71 : column 14] - Is not declared by package errors [/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/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/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/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: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: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/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/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/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/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/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/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/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/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/bookmark_tag_relations.go:1043] - 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: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:1215] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteByte('.') [/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: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/bookmarks.go:1206] - 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/entries.go:872] - 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/app/run.go:19] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > e.Start(":8000") [/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/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: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:1044] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > buf.WriteString(strconv.Itoa(insertColumns.Kind)) [/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/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: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:42] - 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:43] - G103 (CWE-242): Use of unsafe calls should be audited (Confidence: HIGH, Severity: LOW) > unsafe.Pointer(&password) [/github/workspace/infra/store/mysql/user_store.go:52] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > tx.Rollback() [/github/workspace/infra/store/mysql/user_store.go:58] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > tx.Rollback() [/github/workspace/infra/store/mysql/user_store.go:81] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > tx.Rollback() [/github/workspace/infra/store/mysql/user_store.go:86] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > tx.Rollback() Summary: Files: 18 Lines: 6671 Nosec: 0 Issues: 106 ``` [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 (compile)
-: could not analyze dependency github.com/anatofuz/BookmarkTarou/app/config of github.com/anatofuz/BookmarkTarou/app (compile)
-: could not analyze dependency github.com/anatofuz/BookmarkTarou/infra/store/mysql of github.com/anatofuz/BookmarkTarou/app/config (compile)
infra/store/mysql/user_store.go:71:14: Is not declared by package errors (compile)
model/user.go:15:5: error var UserErrNotFound should have name of the form ErrFoo (ST1012)

Checks Document

github-actions[bot] commented 4 years ago

⚠ golint Failed

Found 8 lint suggestions; failing.

Show Detail ``` app/run.go:11:1: exported function Run should have comment or be unexported app/config/config.go:12:2: a blank import should be only in a main or test package, or have a comment justifying it model/user.go:15:5: error var UserErrNotFound should have name of the form ErrFoo web/perform.go:8:6: exported type WebHandler should have comment or be unexported web/perform.go:8:6: type name will be used as web.WebHandler by other packages, and that stutters; consider calling this Handler web/perform.go:12:6: exported type WebHandlerImpl should have comment or be unexported web/perform.go:12:6: type name will be used as web.WebHandlerImpl by other packages, and that stutters; consider calling this HandlerImpl web/perform.go:15:1: exported function CreateWebHandlerImpl should have comment or be unexported ```
github-actions[bot] commented 4 years ago

⚠ gosec Failed

Summary:
   Files: 19
   Lines: 6707
   Nosec: 0
  Issues: 105
Show Detail ``` Results: Golang errors in file: [/github/workspace/infra/store/mysql/user_store.go]: > [line 28 : column 14] - Is not declared by package errors > [line 71 : 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:42] - 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:43] - G103 (CWE-242): Use of unsafe calls should be audited (Confidence: HIGH, Severity: LOW) > unsafe.Pointer(&password) [/github/workspace/infra/store/mysql/user_store.go:52] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > tx.Rollback() [/github/workspace/infra/store/mysql/user_store.go:58] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > tx.Rollback() [/github/workspace/infra/store/mysql/user_store.go:81] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > tx.Rollback() [/github/workspace/infra/store/mysql/user_store.go:86] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > tx.Rollback() Summary: Files: 19 Lines: 6707 Nosec: 0 Issues: 105 ``` [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:28:7: undefined: errors.Is
infra/store/mysql/user_store.go:71:7: undefined: errors.Is
note: module requires Go 1.13
github-actions[bot] commented 4 years ago

⚠ staticcheck Failed

-: could not analyze dependency github.com/anatofuz/BookmarkTarou/app of github.com/anatofuz/BookmarkTarou (compile)
-: could not analyze dependency github.com/anatofuz/BookmarkTarou/app/config of github.com/anatofuz/BookmarkTarou/app (compile)
-: could not analyze dependency github.com/anatofuz/BookmarkTarou/infra/store/mysql of github.com/anatofuz/BookmarkTarou/app/config (compile)
infra/store/mysql/user_store.go:71:14: Is not declared by package errors (compile)
model/user.go:15:5: error var UserErrNotFound should have name of the form ErrFoo (ST1012)
web/user.go:26:23: func (*userHandler).signup is unused (U1000)

Checks Document

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:71:14: Is not declared by package errors /github/workspace/infra/store/mysql/user_store.go:28:14: Is not declared by package errors]
github-actions[bot] commented 4 years ago

⚠ vet Failed

import cycle not allowed
package github.com/anatofuz/BookmarkTarou
    imports github.com/anatofuz/BookmarkTarou/app
    imports github.com/anatofuz/BookmarkTarou/web
    imports github.com/anatofuz/BookmarkTarou/app
can't load package: import cycle not allowed
package github.com/anatofuz/BookmarkTarou
    imports github.com/anatofuz/BookmarkTarou/app
    imports github.com/anatofuz/BookmarkTarou/web
    imports github.com/anatofuz/BookmarkTarou/app
github-actions[bot] commented 4 years ago

⚠ golint Failed

Found 6 lint suggestions; failing.

Show Detail ``` app/run.go:11:1: exported function Run should have comment or be unexported app/config/config.go:12:2: a blank import should be only in a main or test package, or have a comment justifying it model/user.go:15: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: 19
   Lines: 6722
   Nosec: 0
  Issues: 104
Show Detail ``` Results: Golang errors in file: [/github/workspace/infra/store/mysql/user_store.go]: > [line 28 : column 14] - Is not declared by package errors > [line 71 : column 14] - Is not declared by package errors Golang errors in file: [/github/workspace/web/user.go]: > [line 13 : column 10] - UserApp not declared by package app > [line 18 : column 12] - NewUserApp not declared by package app [/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:42] - 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:52] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > tx.Rollback() [/github/workspace/infra/store/mysql/user_store.go:58] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > tx.Rollback() [/github/workspace/infra/store/mysql/user_store.go:81] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > tx.Rollback() [/github/workspace/infra/store/mysql/user_store.go:86] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW) > tx.Rollback() Summary: Files: 19 Lines: 6722 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 (compile)
-: could not analyze dependency github.com/anatofuz/BookmarkTarou/app of github.com/anatofuz/BookmarkTarou/web (compile)
-: could not analyze dependency github.com/anatofuz/BookmarkTarou/infra/store/mysql of github.com/anatofuz/BookmarkTarou/app/config (compile)
infra/store/mysql/user_store.go:71:14: Is not declared by package errors (compile)
model/user.go:15:5: error var UserErrNotFound should have name of the form ErrFoo (ST1012)
main.go:7:2: import cycle not allowed: import stack: [github.com/anatofuz/BookmarkTarou github.com/anatofuz/BookmarkTarou/app github.com/anatofuz/BookmarkTarou/web github.com/anatofuz/BookmarkTarou/app] (compile)

Checks Document

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:71:14: Is not declared by package errors /github/workspace/infra/store/mysql/user_store.go:28:14: Is not declared by package errors]
github-actions[bot] commented 4 years ago

⚠ golint Failed

Found 6 lint suggestions; failing.

Show Detail ``` app/run.go:11:1: exported function Run should have comment or be unexported app/config/config.go:12:2: a blank import should be only in a main or test package, or have a comment justifying it 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

import cycle not allowed
package github.com/anatofuz/BookmarkTarou
    imports github.com/anatofuz/BookmarkTarou/app
    imports github.com/anatofuz/BookmarkTarou/web
    imports github.com/anatofuz/BookmarkTarou/app
can't load package: import cycle not allowed
package github.com/anatofuz/BookmarkTarou
    imports github.com/anatofuz/BookmarkTarou/app
    imports github.com/anatofuz/BookmarkTarou/web
    imports github.com/anatofuz/BookmarkTarou/app
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 (compile)
-: could not analyze dependency github.com/anatofuz/BookmarkTarou/app of github.com/anatofuz/BookmarkTarou/web (compile)
-: could not analyze dependency github.com/anatofuz/BookmarkTarou/infra/store/mysql of github.com/anatofuz/BookmarkTarou/app/config (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)
main.go:7:2: import cycle not allowed: import stack: [github.com/anatofuz/BookmarkTarou github.com/anatofuz/BookmarkTarou/app github.com/anatofuz/BookmarkTarou/web github.com/anatofuz/BookmarkTarou/app] (compile)

Checks Document

github-actions[bot] commented 4 years ago

⚠ gosec Failed

Summary:
   Files: 19
   Lines: 6740
   Nosec: 0
  Issues: 104
Show Detail ``` Results: 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 Golang errors in file: [/github/workspace/web/user.go]: > [line 13 : column 10] - UserApp not declared by package app > [line 18 : column 12] - NewUserApp not declared by package app [/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: 19 Lines: 6740 Nosec: 0 Issues: 104 ``` [Code Reference](https://github.com/securego/gosec#available-rules)
github-actions[bot] commented 4 years ago

⚠ golint Failed

Found 10 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:23:1: exported function NewUserApp should have comment or be unexported app/usr.go:27:1: exported method UserAppImpl.Create should have comment or be unexported app/usr.go:46:1: exported method UserAppImpl.SignUp should have comment or be unexported app/config/config.go:12:2: a blank import should be only in a main or test package, or have a comment justifying it 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/usr.go ```diff userStore store.UserStore } - func NewUserApp(userStore store.UserStore) UserApp { return &UserAppImpl{userStore: userStore} } ```
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 10 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:23:1: exported function NewUserApp should have comment or be unexported app/usr.go:27:1: exported method UserAppImpl.Create should have comment or be unexported app/usr.go:46:1: exported method UserAppImpl.SignUp should have comment or be unexported app/config/config.go:12:2: a blank import should be only in a main or test package, or have a comment justifying it 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/usr.go ```diff userStore store.UserStore } - func NewUserApp(userStore store.UserStore) UserApp { return &UserAppImpl{userStore: userStore} } ```
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

⚠ 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:60:6: undefined: errors.Is
note: module requires Go 1.13
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