QSP-6: Enforces crypto-secure PRNGs (#6401)

* adds cryptorand analyzer

* better naming

* rely on suffix

* sync/pending_* use crypto/rand

* define shared/rand

* updates fetcher

* fixes rand issue in sync package

* gofmt

* shared/rand: more docs + add exclusion nogo_config.json

* updates validator/assignments

* updates comment

* fixes remaning cases

* re-arranges comments

* fixes tests

* renames in shared/rand API

* adds simple no-panic test

* gazelle

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
Victor Farazdagi
2020-06-26 17:58:47 +03:00
committed by GitHub
parent 73f3a653bf
commit 78465e2549
28 changed files with 360 additions and 92 deletions

View File

@@ -34,7 +34,7 @@
"exclude_files": {
"external/.*": "Third party code"
}
},
},
"copylocks": {
"exclude_files": {
"external/.*": "Third party code"
@@ -44,7 +44,7 @@
"exclude_files": {
"external/.*": "Third party code"
}
},
},
"cgocall": {
"exclude_files": {
"external/.*": "Third party code"
@@ -70,8 +70,8 @@
},
"roughtime": {
"only_files": {
"beacon-chain/.*": "",
"shared/.*": "",
"beacon-chain/.*": "",
"shared/.*": "",
"validator/.*": ""
},
"exclude_files": {
@@ -96,7 +96,19 @@
},
"featureconfig": {
"only_files": {
".*_test\\.go": "Only tests"
".*_test\\.go": "Only tests"
}
},
"cryptorand": {
"only_files": {
"beacon-chain/.*": "",
"shared/.*": "",
"validator/.*": ""
},
"exclude_files": {
".*/.*_test\\.go": "Tests are OK to use weak crypto",
"shared/rand/rand\\.go": "Abstracts CSPRNGs for common use",
"shared/aggregation/testing/bitlistutils.go": "Test-only package"
}
}
}