Added Dockerfile based on Ubuntu 22.04 #199
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
Closes #8
example to run:
Trivy vulnerability scan:
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 │
└──────────────────┴────────────────┴──────────┴───────────────────┴───────────────┴─────────────────────────────────────────────────────────┘