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

[SECURITY] security checker. #4

Open
raminfp opened this issue Jul 19, 2022 · 0 comments
Open

[SECURITY] security checker. #4

raminfp opened this issue Jul 19, 2022 · 0 comments
Assignees
Labels

Comments

@raminfp
Copy link
Member

raminfp commented Jul 19, 2022

I check security issue, we should fix.

G404 (CWE-338): Use of weak random number generator (math/rand instead of crypto/rand) (Confidence: MEDIUM, Severity: HIGH)
    32:         for i := range b {
  > 33:                 b[i] = letters[rand.Intn(len(letters))]
    34:         }



[/root/fuzzing/golangs/bin/ravro_dcrp/pdf.go:52] - G301 (CWE-276): Expect directory permissions to be 0750 or less (Confidence: HIGH, Severity: MEDIUM)
    51:         if _, err := os.Stat(tmpPath); os.IsNotExist(err) {
  > 52:                 errDir := os.Mkdir(tmpPath, 0777)
    53:                 if errDir != nil {



[/root/fuzzing/golangs/bin/ravro_dcrp/fs.go:61] - G301 (CWE-276): Expect directory permissions to be 0750 or less (Confidence: HIGH, Severity: MEDIUM)
    60: func ensureDir(dirName string) error {
  > 61:         err := os.Mkdir(dirName, 0775)
    62:



[/root/fuzzing/golangs/bin/ravro_dcrp/pdf.go:57] - G306 (CWE-276): Expect WriteFile permissions to be 0600 or less (Confidence: HIGH, Severity: MEDIUM)
    56:         }
  > 57:         err1 := ioutil.WriteFile(tmpPath+strconv.FormatInt(int64(t), 10)+".html", []byte(r.body), 0644)
    58:         if err1 != nil {



[/root/fuzzing/golangs/bin/ravro_dcrp/html.go:10] - G306 (CWE-276): Expect WriteFile permissions to be 0600 or less (Confidence: HIGH, Severity: MEDIUM)

Thanks.

@raminfp raminfp self-assigned this Jul 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant