vechain / thor

A general purpose blockchain highly compatible with Ethereum's ecosystem
GNU Lesser General Public License v3.0
796 stars 247 forks source link

Add gosec to SAST analysis #755

Closed WaqarAhmedVC closed 4 months ago

WaqarAhmedVC commented 4 months ago

Description

Add gosec to perform Static Application Security Testing (SAST) Analysis.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Test Configuration:

Checklist:

github-advanced-security[bot] commented 4 months ago

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

codecov-commenter commented 4 months ago

Codecov Report

Attention: Patch coverage is 55.55556% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 61.88%. Comparing base (b9047c0) to head (36e44b6).

Files Patch % Lines
cache/rnd_cache.go 50.00% 1 Missing :warning:
cmd/thor/utils.go 0.00% 1 Missing :warning:
comm/peer.go 0.00% 1 Missing :warning:
p2psrv/rpc/rpc.go 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #755 +/- ## ======================================= Coverage 61.88% 61.88% ======================================= Files 202 202 Lines 18696 18696 ======================================= Hits 11570 11570 Misses 6015 6015 Partials 1111 1111 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

darrenvechain commented 4 months ago

@WaqarAhmedVC we can add gosec to the linters in our lint config:

https://github.com/vechain/thor/blob/master/.golangci.yml#L13

image
WaqarAhmedVC commented 4 months ago

@darrenvechain Thanks for pointing out. I was searching for this info but couldn't find it.