Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix security updates for twistlock #141

Merged
merged 1 commit into from
Oct 17, 2024

Conversation

wanix
Copy link
Contributor

@wanix wanix commented Oct 16, 2024

Proposing some security fixes and updates:

Dockerfile

  • update golang for the one awaited in go.mod (1.21)
  • update to latest alpine

VERSION

maybe I misunderstand this one but current version is 0.5.6, was 0.4.0, so proposing next version 0.5.7

Go code

I fixed the following errors by updating dependencies:

 +----------------+----------+------+------------------------------+---------+-----------------+------------+------------+------------+----------------------------------------------------+-------------------+
|      CVE       | SEVERITY | CVSS |           PACKAGE            | VERSION |     STATUS      | PUBLISHED  | DISCOVERED | GRACE DAYS |                    DESCRIPTION                     | TRIGGERED FAILURE |
+----------------+----------+------+------------------------------+---------+-----------------+------------+------------+------------+----------------------------------------------------+-------------------+
| CVE-2024-27304 | high     | 0.00 | github.com/jackc/pgproto3/v2 | v2.3.2  | fixed in 2.3.3  | > 7 months | < 1 hour   | -202       | pgx is a PostgreSQL driver and toolkit for Go.     | Yes               |
Error: Scan failed.
|                |          |      |                              |         | > 7 months ago  |            |            |            | SQL injection can occur if an attacker can cause   |                   |
|                |          |      |                              |         |                 |            |            |            | a single query or bind message to exceed 4 GB in   |                   |
|                |          |      |                              |         |                 |            |            |            | size....                                           |                   |
+----------------+----------+------+------------------------------+---------+-----------------+------------+------------+------------+----------------------------------------------------+-------------------+
| CVE-2023-45288 | medium   | 0.00 | golang.org/x/net/http2       | v0.20.0 | fixed in 0.23.0 | > 6 months | < 1 hour   | -164       | An attacker may cause an HTTP/2 endpoint to        | Yes               |
|                |          |      |                              |         | > 6 months ago  |            |            |            | read arbitrary amounts of header data by sending   |                   |
|                |          |      |                              |         |                 |            |            |            | an excessive number of CONTINUATION frames.        |                   |
|                |          |      |                              |         |                 |            |            |            | Maintaining H...                                   |                   |
+----------------+----------+------+------------------------------+---------+-----------------+------------+------------+------------+----------------------------------------------------+-------------------+

Tested by using my generated image (on RDS PostgreSQL): docker.io/wanix/sql_exporter:v0.5.7
(no problem detected by Twistlock with this image also)

@wanix
Copy link
Contributor Author

wanix commented Oct 17, 2024

And why so many files, I did the manual changes on:

  • Dockerfile
  • main.go (cause the NewCollector is not anymore in common.version)
  • go.mod
  • VERSION

Then:

go get
go mod tidy
go mod vendor

@dewey dewey merged commit e69d565 into justwatchcom:master Oct 17, 2024
1 check passed
@dewey
Copy link
Member

dewey commented Oct 17, 2024

Thank you for tackling this, will release a new version. I think this version file was overlooked a bit that's why it's out of sync.

@wanix
Copy link
Contributor Author

wanix commented Oct 17, 2024

thanks

@wanix wanix deleted the twistlock-scans-fixes branch October 17, 2024 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants