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

adding high/critical severity vuln checks #123

Merged
merged 5 commits into from
May 13, 2024

Conversation

ssmirr
Copy link
Contributor

@ssmirr ssmirr commented Mar 28, 2024

This Pull request updates the Dockerfile to check dependencies of this source code, and fail to build if high/critical severity vulnerabilities are detected.

Currently this one is detected:

8.938 go.mod (gomod)
8.938 ==============
8.938 Total: 1 (UNKNOWN: 0, HIGH: 1, CRITICAL: 0)
8.938 
8.938 ┌────────────────────────┬─────────────────────┬──────────┬────────┬───────────────────┬────────────────────────┬───────────────────────────────────────────────────┐
8.938 │        Library         │    Vulnerability    │ Severity │ Status │ Installed Version │     Fixed Version      │                       Title                       │
8.938 ├────────────────────────┼─────────────────────┼──────────┼────────┼───────────────────┼────────────────────────┼───────────────────────────────────────────────────┤
8.938 │ google.golang.org/grpc │ GHSA-m425-mq94-257g │ HIGH     │ fixed  │ 1.29.0            │ 1.56.3, 1.57.1, 1.58.3 │ gRPC-Go HTTP/2 Rapid Reset vulnerability          │
8.938 │                        │                     │          │        │                   │                        │ https://github.com/advisories/GHSA-m425-mq94-257g │
8.938 └────────────────────────┴─────────────────────┴──────────┴────────┴───────────────────┴────────────────────────┴───────────────────────────────────────────────────┘
------

This is done with the help of Trivy, an open source scanning tool from Aquasec. Trivy is RedHat certified, and is being used as the default container scanner on GitLab (according to this link)

@codecov-commenter
Copy link

codecov-commenter commented Mar 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.78%. Comparing base (7300295) to head (e57946a).
Report is 3 commits behind head on main.

❗ Current head e57946a differs from pull request most recent head 727fa66. Consider uploading reports for the commit 727fa66 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #123      +/-   ##
==========================================
+ Coverage   68.71%   68.78%   +0.06%     
==========================================
  Files          47       47              
  Lines        4482     4482              
==========================================
+ Hits         3080     3083       +3     
+ Misses       1207     1206       -1     
+ Partials      195      193       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Nicko Guyer <[email protected]>
go.mod Outdated
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace google.golang.org/grpc => google.golang.org/grpc v1.29.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jimthematrix Do you mind taking a look at this one? Our vulnerability tool does not like this version, but it looks like we were very intentionally staying on this version for some reason. Do you know why this was here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pretty sure this is why: https://github.com/hyperledger/fabric-sdk-go/blob/main/go.mod#L30. But I can't remember what the exact error was if we used a later version.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a way to override the failure in the vulnerability tool? This problem is only relevant when using grpc to implement server endpoints. in the case of FabConnect, grpc is only between it and the Fabric endpoint, so the attack vector is not exposed via FabConnect

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

marking approval on PR based on agreement with this assessment from @jimthematrix

@nguyer
Copy link
Contributor

nguyer commented Mar 28, 2024

Strange... make passes just fine locally

@ssmirr
Copy link
Contributor Author

ssmirr commented May 13, 2024

Changes in 7de4ef4 make trivy ignore this specific CVE, as requested in #123 (comment)

@peterbroadhurst peterbroadhurst merged commit 65de030 into hyperledger:main May 13, 2024
3 checks passed
EnriqueL8 pushed a commit to kaleido-io/firefly-fabconnect that referenced this pull request May 14, 2024
adding high/critical severity vuln checks
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.

5 participants