Skip to content

Commit

Permalink
[Release] Golang upgraded to v1.20 and two CVEs addressed.
Browse files Browse the repository at this point in the history
* Golang tooling upgraded to 1.20
* x/net updated to 0.7.0 for the following CVE:
   - CVE-2022-41723
   - CVE-2022-27664
  • Loading branch information
surahman authored Feb 19, 2023
2 parents bb69265 + 7193434 commit 3749619
Show file tree
Hide file tree
Showing 10 changed files with 243 additions and 221 deletions.
23 changes: 15 additions & 8 deletions docs/docs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 14 additions & 6 deletions docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"name": "GPL-3.0",
"url": "https://opensource.org/licenses/GPL-3.0"
},
"version": "1.6.1"
"version": "1.6.2"
},
"host": "localhost:44243",
"basePath": "/api/rest/v1",
Expand Down Expand Up @@ -1012,6 +1012,17 @@
}
}
},
"model_http.Metadata": {
"type": "object",
"properties": {
"num_records": {
"type": "integer"
},
"quiz_id": {
"type": "string"
}
}
},
"model_http.StatsResponse": {
"type": "object",
"properties": {
Expand All @@ -1023,11 +1034,8 @@
}
}
},
"num_records": {
"type": "integer"
},
"quiz_id": {
"type": "string"
"metadata": {
"$ref": "#/definitions/model_http.Metadata"
},
"records": {
"type": "array",
Expand Down
15 changes: 10 additions & 5 deletions docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -171,17 +171,22 @@ definitions:
- threshold
- token
type: object
model_http.Metadata:
properties:
num_records:
type: integer
quiz_id:
type: string
type: object
model_http.StatsResponse:
properties:
links:
properties:
next_page:
type: string
type: object
num_records:
type: integer
quiz_id:
type: string
metadata:
$ref: '#/definitions/model_http.Metadata'
records:
items:
$ref: '#/definitions/model_cassandra.Response'
Expand All @@ -206,7 +211,7 @@ info:
name: GPL-3.0
url: https://opensource.org/licenses/GPL-3.0
title: Multiple Choice Question Platform.
version: 1.6.1
version: 1.6.2
paths:
/health:
get:
Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/surahman/mcq-platform

go 1.18
go 1.20

require (
github.com/99designs/gqlgen v0.17.20
Expand Down Expand Up @@ -72,9 +72,9 @@ require (
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/multierr v1.8.0 // indirect
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
golang.org/x/sys v0.0.0-20220926163933-8cfa568d3c25 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/net v0.7.0 // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/text v0.7.0 // indirect
golang.org/x/tools v0.1.12 // indirect
google.golang.org/protobuf v1.28.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
Expand Down
10 changes: 6 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -431,8 +431,9 @@ golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qx
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
Expand Down Expand Up @@ -501,8 +502,8 @@ golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220926163933-8cfa568d3c25 h1:nwzwVf0l2Y/lkov/+IYgMMbFyI+QypZDds9RxlSmsFQ=
golang.org/x/sys v0.0.0-20220926163933-8cfa568d3c25/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
Expand All @@ -512,8 +513,9 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
Expand Down
16 changes: 8 additions & 8 deletions pkg/http/rest/handlers/healthcheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ import (
)

// Healthcheck checks if the service is healthy.
// @Summary Healthcheck for service liveness.
// @Description This endpoint is exposed to allow load balancers etc. to check the health of the service.
// @Tags health healthcheck liveness
// @Id healthcheck
// @Produce json
// @Success 200 {object} model_http.Success "message: healthy"
// @Failure 503 {object} model_http.Error "error message with any available details"
// @Router /health [get]
// @Summary Healthcheck for service liveness.
// @Description This endpoint is exposed to allow load balancers etc. to check the health of the service.
// @Tags health healthcheck liveness
// @Id healthcheck
// @Produce json
// @Success 200 {object} model_http.Success "message: healthy"
// @Failure 503 {object} model_http.Error "error message with any available details"
// @Router /health [get]
func Healthcheck(logger *logger.Logger, db cassandra.Cassandra, cache redis.Redis) gin.HandlerFunc {
return func(context *gin.Context) {
var err error
Expand Down
Loading

0 comments on commit 3749619

Please sign in to comment.