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

The upgrade from v6.4.0 to v6.4.1 results in empty table content when used in our product. #285

Closed
attiasas opened this issue Nov 23, 2023 · 10 comments · Fixed by #289
Closed
Labels
bug Something isn't working

Comments

@attiasas
Copy link

Describe the bug

After upgrading to v6.4.1, the tables' content becomes empty when printed specifically on the CircleCI terminal. This issue has been reported within our product that utilizes these tables, as reported to us here: jfrog/jfrog-cli#1858.
I was able to pinpoint this issue to a single change in the versions.

To Reproduce

To reproduce the issue, execute a code on CircleCI with version 6.4.1+ that prints table content using the provided configurations, as showcased in Our code sample or the following code snippet:

┌──────────┬──────────────┬────────────┬────────────┬──────────────┬────────────┬───────────┬──────┬────────────────┐
│ SEVERITY │ CONTEXTUAL   │ DIRECT     │ DIRECT     │ IMPACTED     │ IMPACTED   │ FIXED     │ TYPE │ CVE            │
│          │ ANALYSIS     │ DEPENDENCY │ DEPENDENCY │ DEPENDENCY   │ DEPENDENCY │ VERSIONS  │      │                │
│          │              │            │ VERSION    │ NAME         │ VERSION    │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│ Critical │ Undetermined │ sqlite     │ 3.0.3      │ minimist     │ 1.2.0      │ [0.2.4]   │ npm  │ CVE-2021-44906 │
│          │              │            │            │              │            │ [1.2.6]   │      │                │
│          │              │            │            │              │            │           │      │                │
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│ Critical │ Undetermined │ sqlite     │ 3.0.3      │ ini          │ 1.3.5      │ [1.3.6]   │ npm  │ CVE-2020-7788  │
│          │              │            │            │              │            │           │      │                │
│          │              │            │            │              │            │           │      │                │
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│ Critical │ Undetermined │ sqlite     │ 3.0.3      │ tough-cookie │ 2.4.3      │ [4.1.3]   │ npm  │ CVE-2023-26136 │
│          │              │            │            │              │            │           │      │                │
│          │              │            │            │              │            │           │      │                │
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│ Critical │ Undetermined │ sqlite     │ 3.0.3      │ minimist     │ 0.0.8      │ [0.2.4]   │ npm  │ CVE-2021-44906 │
│          │              │            │            │              │            │ [1.2.6]   │      │                │
│          │              │            │            │              │            │           │      │                │
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│ Critical │ Undetermined │ pug        │ 2.0.4      │ pug-code-gen │ 2.0.2      │ [2.0.3]   │ npm  │ CVE-2021-21353 │
│          │              │            │            │              │            │ [3.0.2]   │      │                │
│          │              │            │            │              │            │           │      │                │
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│ High     │ Undetermined │ sqlite     │ 3.0.3      │ tar          │ 4.4.10     │ [3.2.2]   │ npm  │ CVE-2021-32804 │
│          │              │            │            │              │            │ [4.4.14]  │      │                │
│          │              │            │            │              │            │ [5.0.6]   │      │                │
│          │              │            │            │              │            │ [6.1.1]   │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│ High     │ Undetermined │ sqlite     │ 3.0.3      │ semver       │ 5.7.1      │ [5.7.2]   │ npm  │ CVE-2022-25883 │
│          │              │            │            │              │            │ [6.3.1]   │      │                │
│          │              │            │            │              │            │ [7.5.2]   │      │                │
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│ High     │ Undetermined │ sqlite     │ 3.0.3      │ qs           │ 6.5.2      │ [6.10.3]  │ npm  │ CVE-2022-24999 │
│          │              │            │ 4.16.4     │              │            │ [6.2.4]   │      │                │
│          │              │            │            │              │            │ [6.3.3]   │      │                │
│          │              │ express    │            │              │            │ [6.4.1]   │      │                │
│          │              │            │            │              │            │ [6.5.3]   │      │                │
│          │              │            │            │              │            │ [6.6.1]   │      │                │
│          │              │            │            │              │            │ [6.7.3]   │      │                │
│          │              │            │            │              │            │ [6.8.3]   │      │                │
│          │              │            │            │              │            │ [6.9.7]   │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤

Expected behavior
At version v6.4.0 the content looked like this:

Full Snippet example
13:35:27 [Info] Found 1 SAST vulnerabilities
The full scan results are available here: /var/folders/bl/wbxjgtzx7j5_mjsmfr3ynlc00000gp/T/jfrog.cli.temp.-1700746527-1944972300

Vulnerable Dependencies
┌──────────┬──────────────┬────────────┬────────────┬──────────────┬────────────┬───────────┬──────┬────────────────┐
│ SEVERITY │ CONTEXTUAL   │ DIRECT     │ DIRECT     │ IMPACTED     │ IMPACTED   │ FIXED     │ TYPE │ CVE            │
│          │ ANALYSIS     │ DEPENDENCY │ DEPENDENCY │ DEPENDENCY   │ DEPENDENCY │ VERSIONS  │      │                │
│          │              │            │ VERSION    │ NAME         │ VERSION    │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│ Critical │ Undetermined │ sqlite     │ 3.0.3      │ minimist     │ 1.2.0      │ [0.2.4]   │ npm  │ CVE-2021-44906 │
│          │              │            │            │              │            │ [1.2.6]   │      │                │
│          │              │            │            │              │            │           │      │                │
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│ Critical │ Undetermined │ pug        │ 2.0.4      │ pug          │ 2.0.4      │ [3.0.1]   │ npm  │ CVE-2021-21353 │
│          │              │            │            │              │            │           │      │                │
│          │              │            │            │              │            │           │      │                │
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│ Critical │ Undetermined │ sqlite     │ 3.0.3      │ json-schema  │ 0.2.3      │ [0.4.0]   │ npm  │ CVE-2021-3918  │
│          │              │            │            │              │            │           │      │                │
│          │              │            │            │              │            │           │      │                │
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│ Critical │ Undetermined │ sqlite     │ 3.0.3      │ ini          │ 1.3.5      │ [1.3.6]   │ npm  │ CVE-2020-7788  │
│          │              │            │            │              │            │           │      │                │
│          │              │            │            │              │            │           │      │                │
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│ Critical │ Undetermined │ sqlite     │ 3.0.3      │ tough-cookie │ 2.4.3      │ [4.1.3]   │ npm  │ CVE-2023-26136 │
│          │              │            │            │              │            │           │      │                │
│          │              │            │            │              │            │           │      │                │
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│ Critical │ Undetermined │ sqlite     │ 3.0.3      │ minimist     │ 0.0.8      │ [0.2.4]   │ npm  │ CVE-2021-44906 │
│          │              │            │            │              │            │ [1.2.6]   │      │                │
│          │              │            │            │              │            │           │      │                │
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│ Critical │ Undetermined │ pug        │ 2.0.4      │ pug-code-gen │ 2.0.2      │ [2.0.3]   │ npm  │ CVE-2021-21353 │
│          │              │            │            │              │            │ [3.0.2]   │      │                │
│          │              │            │            │              │            │           │      │                │
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│ High     │ Undetermined │ sqlite     │ 3.0.3      │ tar          │ 4.4.10     │ [3.2.2]   │ npm  │ CVE-2021-32804 │
│          │              │            │            │              │            │ [4.4.14]  │      │                │
│          │              │            │            │              │            │ [5.0.6]   │      │                │
│          │              │            │            │              │            │ [6.1.1]   │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│ High     │ Undetermined │ pug        │ 2.0.4      │ path-parse   │ 1.0.6      │ [1.0.7]   │ npm  │ CVE-2021-23343 │
│          │              │            │            │              │            │           │      │                │
│          │              │            │            │              │            │           │      │                │
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│ High     │ Undetermined │ sqlite     │ 3.0.3      │ tar          │ 4.4.10     │ [4.4.16]  │ npm  │ CVE-2021-37701 │
│          │              │            │            │              │            │ [5.0.8]   │      │                │
│          │              │            │            │              │            │ [6.1.7]   │      │                │
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│ High     │ Undetermined │ pug        │ 2.0.4      │ lodash       │ 4.17.15    │ [4.17.16] │ npm  │                │
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│ High     │ Undetermined │ pug        │ 2.0.4      │ lodash       │ 4.17.15    │ [4.17.21] │ npm  │ CVE-2021-23337 │
│          │              │            │            │              │            │           │      │                │
│          │              │            │            │              │            │           │      │                │
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│ High     │ Undetermined │ sqlite     │ 3.0.3      │ tar          │ 4.4.10     │ [4.4.18]  │ npm  │ CVE-2021-37713 │
│          │              │            │            │              │            │ [5.0.10]  │      │                │
│          │              │            │            │              │            │ [6.1.9]   │      │                │
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│ High     │ Undetermined │ sqlite     │ 3.0.3      │ tar          │ 4.4.10     │ [4.4.18]  │ npm  │ CVE-2021-37712 │
│          │              │            │            │              │            │ [5.0.10]  │      │                │
│          │              │            │            │              │            │ [6.1.9]   │      │                │
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│ High     │ Undetermined │ pug        │ 2.0.4      │ lodash       │ 4.17.15    │ [4.17.19] │ npm  │ CVE-2020-8203  │
│          │              │            │            │              │            │           │      │                │
│          │              │            │            │              │            │           │      │                │
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│ High     │ Undetermined │ sqlite     │ 3.0.3      │ semver       │ 5.7.1      │ [5.7.2]   │ npm  │ CVE-2022-25883 │
│          │              │            │            │              │            │ [6.3.1]   │      │                │
│          │              │            │            │              │            │ [7.5.2]   │      │                │
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│ High     │ Undetermined │ sqlite     │ 3.0.3      │ qs           │ 6.5.2      │ [6.10.3]  │ npm  │ CVE-2022-24999 │
│          │              │            │ 4.16.4     │              │            │ [6.2.4]   │      │                │
│          │              │            │            │              │            │ [6.3.3]   │      │                │
│          │              │ express    │            │              │            │ [6.4.1]   │      │                │
│          │              │            │            │              │            │ [6.5.3]   │      │                │
│          │              │            │            │              │            │ [6.6.1]   │      │                │
│          │              │            │            │              │            │ [6.7.3]   │      │                │
│          │              │            │            │              │            │ [6.8.3]   │      │                │
│          │              │            │            │              │            │ [6.9.7]   │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│ High     │ Undetermined │ sqlite     │ 3.0.3      │ minimatch    │ 3.0.4      │ [3.0.5]   │ npm  │ CVE-2022-3517  │
│          │              │            │            │              │            │           │      │                │
│          │              │            │            │              │            │           │      │                │
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│ High     │ Undetermined │ sqlite     │ 3.0.3      │ tar          │ 4.4.10     │ [3.2.3]   │ npm  │ CVE-2021-32803 │
│          │              │            │            │              │            │ [4.4.15]  │      │                │
│          │              │            │            │              │            │ [5.0.7]   │      │                │
│          │              │            │            │              │            │ [6.1.2]   │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│ High     │ Undetermined │ pug        │ 2.0.4      │ clean-css    │ 4.2.1      │ [5.2.2]   │ npm  │                │
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│ Medium   │ Undetermined │ sqlite     │ 3.0.3      │ minimist     │ 0.0.8      │ [0.2.1]   │ npm  │ CVE-2020-7598  │
│          │              │            │            │              │            │ [1.2.3]   │      │                │
│          │              │            │            │              │            │           │      │                │
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│ Medium   │ Undetermined │ sqlite     │ 3.0.3      │ tar          │ 4.4.10     │ [6.1.4]   │ npm  │                │
│          │              │            │            │              │            │           │      │                │
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│ Medium   │ Undetermined │ sqlite     │ 3.0.3      │ tar          │ 4.4.10     │ [6.1.4]   │ npm  │                │
│          │              │            │            │              │            │           │      │                │
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│ Medium   │ Undetermined │ sqlite     │ 3.0.3      │ request      │ 2.88.0     │           │ npm  │ CVE-2023-28155 │
│          │              │            │            │              │            │           │      │                │
│          │              │            │            │              │            │           │      │                │
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│ Medium   │ Undetermined │ sqlite     │ 3.0.3      │ ajv          │ 6.10.2     │ [6.12.3]  │ npm  │ CVE-2020-15366 │
│          │              │            │            │              │            │           │      │                │
│          │              │            │            │              │            │           │      │                │
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│ Medium   │ Undetermined │ sqlite     │ 3.0.3      │ debug        │ 3.2.6      │ [2.6.9]   │ npm  │ CVE-2017-16137 │
│          │              │            │            │              │            │ [3.1.0]   │      │                │
│          │              │            │            │              │            │ [3.2.7]   │      │                │
│          │              │            │            │              │            │ [4.3.1]   │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│ Medium   │ Undetermined │ sqlite     │ 3.0.3      │ jsbn         │ 0.1.1      │           │ npm  │                │
│          │              │            │            │              │            │           │      │                │
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│ Medium   │ Undetermined │ sqlite     │ 3.0.3      │ minimist     │ 1.2.0      │ [0.2.1]   │ npm  │ CVE-2020-7598  │
│          │              │            │            │              │            │ [1.2.3]   │      │                │
│          │              │            │            │              │            │           │      │                │
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│ Medium   │ Undetermined │ pug        │ 2.0.4      │ lodash       │ 4.17.15    │ [4.17.21] │ npm  │ CVE-2020-28500 │
│          │              │            │            │              │            │           │      │                │
│          │              │            │            │              │            │           │      │                │
│          │              │            │            │              │            │           │      │                │
└──────────┴──────────────┴────────────┴────────────┴──────────────┴────────────┴───────────┴──────┴────────────────┘

Secret Detection
┌───────────────────────┐
│ No secrets were found │
└───────────────────────┘

Infrastructure as Code Vulnerabilities
┌──────────────────────────────────────────────────────┐
│ No Infrastructure as Code vulnerabilities were found │
└──────────────────────────────────────────────────────┘

Static Application Security Testing (SAST)
┌──────────┬──────────────────────────┬─────────────┬──────────────────────────┐
│ SEVERITY │ FILE                     │ LINE:COLUMN │ FINDING                  │
├──────────┼──────────────────────────┼─────────────┼──────────────────────────┤
│ Low      │ vuln_node_express/app.js │ 12:11       │ Express not using Helmet │
└──────────┴──────────────────────────┴─────────────┴──────────────────────────┘

image

Screenshots
When updating to version v6.4.1 the content looked like this:

Snippet example
13:37:39 [Info] Found 1 SAST vulnerabilities
The full scan results are available here: /var/folders/bl/wbxjgtzx7j5_mjsmfr3ynlc00000gp/T/jfrog.cli.temp.-1700746659-1069578222

Vulnerable Dependencies
┌──────────┬──────────────┬────────────┬────────────┬──────────────┬────────────┬───────────┬──────┬────────────────┐
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│          │              │            │            │              │            │           │      │                │
├──────────┼──────────────┼────────────┼────────────┼──────────────┼────────────┼───────────┼──────┼────────────────┤
│          │              │            │            │              │            │           │      │                │
└──────────┴──────────────┴────────────┴────────────┴──────────────┴────────────┴───────────┴──────┴────────────────┘

Secret Detection
┌───────────────────────┐
│ No secrets were found │
└───────────────────────┘

Infrastructure as Code Vulnerabilities
┌──────────────────────────────────────────────────────┐
│ No Infrastructure as Code vulnerabilities were found │
└──────────────────────────────────────────────────────┘

Static Application Security Testing (SAST)
┌──────────┬──────────────────────────┬─────────────┬──────────────────────────┐
│          │                          │             │                          │
├──────────┼──────────────────────────┼─────────────┼──────────────────────────┤
│          │                          │             │                          │
└──────────┴──────────────────────────┴─────────────┴──────────────────────────┘

image

Software (please complete the following information):

  • OS: linux/ mac
  • GoLang Version 1.20
@jedib0t
Copy link
Owner

jedib0t commented Nov 27, 2023

Hey @attiasas! Thanks for reporting this. v6.4.1 is more than a year old. Do you see the same issue with the latest release v6.4.9?

@attiasas
Copy link
Author

Yes @jedib0t,
I tried all the versions including the latest. issue exists in all of them starting from version 6.4.1

@jedib0t
Copy link
Owner

jedib0t commented Nov 29, 2023

@attiasas I'm unable to find a link to the CircleCI execution logs. Is this something private? If not, can you share the links? I tried running the PrintTable code locally with tests and I couldn't see the issue.

@attiasas
Copy link
Author

attiasas commented Dec 3, 2023

Hi @jedib0t,

The links to the logs are not public; however, I've attached the full logs, with and without the issue, in the initial comment.

I'm unable to replicate this issue locally as well. It only occurs when executing the code via CircleCI. When you run the PrintTable code locally, you won't encounter this issue.

To reproduce it on CircleCI, you can easily sign up for a free CircleCI account, create a repository, and add a .circleci/config.yml file. Within this file, define the CI to run your PrintTable tests, and it should reproduce the issue.

@sverdlov93
Copy link

any update?

@jedib0t
Copy link
Owner

jedib0t commented Dec 6, 2023

Not yet. I'll take a look this weekend.

@jedib0t
Copy link
Owner

jedib0t commented Jan 4, 2024

Hey @attiasas I finally got around to experimenting with CircleCI today. I haven't figured out how to make my runs public though. However I wasn't able to see any issues with go-pretty over there with all my unit-tests (which tests every type of "merge").

Circle-CI Config:
* https://github.com/jedib0t/go-pretty/blob/circleci-fix/.circleci/config.yml

Step Logs:
* table-demo.txt
* table-test.txt

@jedib0t
Copy link
Owner

jedib0t commented Jan 4, 2024

Nevermind. Was able to reproduce it with your PrintTable code:

https://github.com/jedib0t/go-pretty/blob/circleci-fix/cmd/demo-jfrog-utils/demo.go

image

@jedib0t
Copy link
Owner

jedib0t commented Jan 4, 2024

Hey @attiasas ... managed to find the issue.

  1. https://github.com/jfrog/jfrog-cli-core/blob/master/utils/coreutils/tableutils.go#L242-L266
    • This logic is incorrect and ends up setting the WidthMax value to -3 for all columns in my test table.
  2. https://github.com/jedib0t/go-pretty/blob/main/table/config.go#L73-L81
    • As a result, the logic above in go-pretty was not handling it right

I will update the logic in go-pretty to be able to handle this bad input. You should be able to upgrade to the next version of go-pretty and test it. However, please try to update the tableutils.go to set the width correctly for the future.

I will ping you once a new release is ready.

@jedib0t
Copy link
Owner

jedib0t commented Jan 4, 2024

Hey @attiasas the release https://github.com/jedib0t/go-pretty/releases/tag/v6.5.0 should have a fix for you.

If it does not fix the issue, feel free to reopen this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants