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

Added Dockerfile based on Ubuntu 22.04 #199

Closed
wants to merge 1 commit into from

Conversation

beliaev-maksim
Copy link

@beliaev-maksim beliaev-maksim commented Jun 5, 2023

Hello all,
first of all, thanks for the project!

We would like to use the app in production and we need secured images due to the requirements. I have seen the PR with proposed alternative based on alpine.
Current PR is based on Ubuntu 22.04, which provides secure patches and has less CVEs compared to alpine.
Dockerfile provide 3 stages to minimize the size, here is the final output:

hermes             latest            c2fbac354fb7   30 minutes ago   113MB

Closes #8

example to run:

docker run hermes
Usage: hermes [--version] [--help] <command> [<args>]

Available commands are:
    indexer    Run the indexer
    server     Run the server
    version    Print the version of the binary

Trivy vulnerability scan:

``` hermes (ubuntu 22.04)

Total: 24 (UNKNOWN: 0, LOW: 16, MEDIUM: 8, HIGH: 0, CRITICAL: 0)

┌──────────────┬────────────────┬──────────┬──────────────────────────┬───────────────────┬─────────────────────────────────────────────────────────────┐
│ Library │ Vulnerability │ Severity │ Installed Version │ Fixed Version │ Title │
├──────────────┼────────────────┼──────────┼──────────────────────────┼───────────────────┼─────────────────────────────────────────────────────────────┤
│ bash │ CVE-2022-3715 │ LOW │ 5.1-6ubuntu1 │ │ a heap-buffer-overflow in valid_parameter_transform │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2022-3715
├──────────────┼────────────────┤ ├──────────────────────────┼───────────────────┼─────────────────────────────────────────────────────────────┤
│ coreutils │ CVE-2016-2781 │ │ 8.32-4.1ubuntu1 │ │ coreutils: Non-privileged session can escape to the parent │
│ │ │ │ │ │ session in chroot │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2016-2781
├──────────────┼────────────────┤ ├──────────────────────────┼───────────────────┼─────────────────────────────────────────────────────────────┤
│ gpgv │ CVE-2022-3219 │ │ 2.2.27-3ubuntu2.1 │ │ denial of service issue (resource consumption) using │
│ │ │ │ │ │ compressed packets │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2022-3219
├──────────────┼────────────────┤ ├──────────────────────────┼───────────────────┼─────────────────────────────────────────────────────────────┤
│ libc-bin │ CVE-2016-20013 │ │ 2.35-0ubuntu3.1 │ │ sha256crypt and sha512crypt through 0.6 allow attackers to │
│ │ │ │ │ │ cause a denial of... │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2016-20013
├──────────────┤ │ │ ├───────────────────┤ │
│ libc6 │ │ │ │ │ │
│ │ │ │ │ │ │
│ │ │ │ │ │ │
├──────────────┼────────────────┼──────────┼──────────────────────────┼───────────────────┼─────────────────────────────────────────────────────────────┤
│ libcap2 │ CVE-2023-2603 │ MEDIUM │ 1:2.44-1build3 │ │ Integer Overflow in _libcap_strdup() │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2023-2603
│ ├────────────────┼──────────┤ ├───────────────────┼─────────────────────────────────────────────────────────────┤
│ │ CVE-2023-2602 │ LOW │ │ │ Memory Leak on pthread_create() Error │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2023-2602
├──────────────┼────────────────┼──────────┼──────────────────────────┼───────────────────┼─────────────────────────────────────────────────────────────┤
│ libncurses6 │ CVE-2023-29491 │ MEDIUM │ 6.3-2 │ 6.3-2ubuntu0.1 │ Local users can trigger security-relevant memory corruption │
│ │ │ │ │ │ via malformed data │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2023-29491
│ ├────────────────┼──────────┤ │ ├─────────────────────────────────────────────────────────────┤
│ │ CVE-2022-29458 │ LOW │ │ │ ncurses: segfaulting OOB read │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2022-29458
├──────────────┼────────────────┼──────────┤ │ ├─────────────────────────────────────────────────────────────┤
│ libncursesw6 │ CVE-2023-29491 │ MEDIUM │ │ │ Local users can trigger security-relevant memory corruption │
│ │ │ │ │ │ via malformed data │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2023-29491
│ ├────────────────┼──────────┤ │ ├─────────────────────────────────────────────────────────────┤
│ │ CVE-2022-29458 │ LOW │ │ │ ncurses: segfaulting OOB read │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2022-29458
├──────────────┼────────────────┤ ├──────────────────────────┼───────────────────┼─────────────────────────────────────────────────────────────┤
│ libpcre3 │ CVE-2017-11164 │ │ 2:8.39-13ubuntu0.22.04.1 │ │ pcre: OP_KETRMAX feature in the match function in │
│ │ │ │ │ │ pcre_exec.c │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2017-11164
├──────────────┼────────────────┼──────────┼──────────────────────────┼───────────────────┼─────────────────────────────────────────────────────────────┤
│ libssl3 │ CVE-2023-2650 │ MEDIUM │ 3.0.2-0ubuntu1.9 │ 3.0.2-0ubuntu1.10 │ Possible DoS translating ASN.1 object identifiers │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2023-2650
│ ├────────────────┼──────────┤ │ ├─────────────────────────────────────────────────────────────┤
│ │ CVE-2023-1255 │ LOW │ │ │ Input buffer over-read in AES-XTS implementation on 64 bit │
│ │ │ │ │ │ ARM │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2023-1255
├──────────────┼────────────────┼──────────┼──────────────────────────┼───────────────────┼─────────────────────────────────────────────────────────────┤
│ libtinfo6 │ CVE-2023-29491 │ MEDIUM │ 6.3-2 │ 6.3-2ubuntu0.1 │ Local users can trigger security-relevant memory corruption │
│ │ │ │ │ │ via malformed data │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2023-29491
│ ├────────────────┼──────────┤ │ ├─────────────────────────────────────────────────────────────┤
│ │ CVE-2022-29458 │ LOW │ │ │ ncurses: segfaulting OOB read │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2022-29458
├──────────────┼────────────────┤ ├──────────────────────────┼───────────────────┼─────────────────────────────────────────────────────────────┤
│ libzstd1 │ CVE-2022-4899 │ │ 1.4.8+dfsg-3build1 │ │ buffer overrun in util.c │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2022-4899
├──────────────┼────────────────┤ ├──────────────────────────┼───────────────────┼─────────────────────────────────────────────────────────────┤
│ login │ CVE-2023-29383 │ │ 1:4.8.1-2ubuntu2.1 │ │ Improper input validation in shadow-utils package utility │
│ │ │ │ │ │ chfn │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2023-29383
├──────────────┼────────────────┼──────────┼──────────────────────────┼───────────────────┼─────────────────────────────────────────────────────────────┤
│ ncurses-base │ CVE-2023-29491 │ MEDIUM │ 6.3-2 │ 6.3-2ubuntu0.1 │ Local users can trigger security-relevant memory corruption │
│ │ │ │ │ │ via malformed data │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2023-29491
│ ├────────────────┼──────────┤ │ ├─────────────────────────────────────────────────────────────┤
│ │ CVE-2022-29458 │ LOW │ │ │ ncurses: segfaulting OOB read │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2022-29458
├──────────────┼────────────────┼──────────┤ │ ├─────────────────────────────────────────────────────────────┤
│ ncurses-bin │ CVE-2023-29491 │ MEDIUM │ │ │ Local users can trigger security-relevant memory corruption │
│ │ │ │ │ │ via malformed data │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2023-29491
│ ├────────────────┼──────────┤ │ ├─────────────────────────────────────────────────────────────┤
│ │ CVE-2022-29458 │ LOW │ │ │ ncurses: segfaulting OOB read │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2022-29458
├──────────────┼────────────────┤ ├──────────────────────────┼───────────────────┼─────────────────────────────────────────────────────────────┤
│ passwd │ CVE-2023-29383 │ │ 1:4.8.1-2ubuntu2.1 │ │ Improper input validation in shadow-utils package utility │
│ │ │ │ │ │ chfn │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2023-29383
├──────────────┼────────────────┼──────────┼──────────────────────────┼───────────────────┼─────────────────────────────────────────────────────────────┤
│ perl-base │ CVE-2023-31484 │ MEDIUM │ 5.34.0-3ubuntu1.1 │ │ CPAN.pm before 2.35 does not verify TLS certificates when │
│ │ │ │ │ │ downloading ...... │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2023-31484
└──────────────┴────────────────┴──────────┴──────────────────────────┴───────────────────┴─────────────────────────────────────────────────────────────┘

app/hermes (gobinary)

Total: 2 (UNKNOWN: 0, LOW: 0, MEDIUM: 1, HIGH: 1, CRITICAL: 0)

┌──────────────────┬────────────────┬──────────┬───────────────────┬───────────────┬─────────────────────────────────────────────────────────┐
│ Library │ Vulnerability │ Severity │ Installed Version │ Fixed Version │ Title │
├──────────────────┼────────────────┼──────────┼───────────────────┼───────────────┼─────────────────────────────────────────────────────────┤
│ golang.org/x/net │ CVE-2022-41723 │ HIGH │ v0.3.0 │ 0.7.0 │ avoid quadratic complexity in HPACK decoding │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2022-41723
│ ├────────────────┼──────────┤ ├───────────────┼─────────────────────────────────────────────────────────┤
│ │ CVE-2022-41717 │ MEDIUM │ │ 0.4.0 │ excessive memory growth in a Go server accepting HTTP/2 │
│ │ │ │ │ │ requests │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2022-41717
└──────────────────┴────────────────┴──────────┴───────────────────┴───────────────┴─────────────────────────────────────────────────────────┘

</details>

@beliaev-maksim beliaev-maksim requested a review from a team as a code owner June 5, 2023 15:30
@hashicorp-cla
Copy link

hashicorp-cla commented Jun 5, 2023

CLA assistant check
All committers have signed the CLA.

@beliaev-maksim beliaev-maksim changed the title Added Dockerfile with build and execute stages based on Ubuntu 22.04 … Added Dockerfile based on Ubuntu 22.04 Jun 5, 2023
@beliaev-maksim
Copy link
Author

hi @jeffdaley, @jfreda
is there anything I can do to move this forward ?

@jeffdaley
Copy link
Contributor

Hey @beliaev-maksim

Thanks for the kind words, and for your contribution to the project. We're not currently taking Dockerfile PRs but this is planned work that we will get to soon. We just need a little more time to get some build-related processes configured.

On our end, we'll think about how to make clearer the areas we're handling and those we're looking for contributions on.

@jeffdaley jeffdaley closed this Jun 15, 2023
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.

Add Docker image
3 participants