-
Notifications
You must be signed in to change notification settings - Fork 678
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
Revert "Replace deprecated package" #4533
Conversation
This reverts commit da8ae75.
var allChartsDetails []ChaosChart | ||
Charts, err := os.ReadDir(path.Clean(chartsPath)) | ||
Charts, err := ioutil.ReadDir(ChartsPath) |
Check failure
Code scanning / CodeQL
Uncontrolled data used in path expression High
user-provided value
var experiment ChaosChart | ||
experimentFile, err := os.ReadFile(path.Clean(givenPath)) | ||
experimentFile, err := ioutil.ReadFile(path) |
Check failure
Code scanning / CodeQL
Uncontrolled data used in path expression High
user-provided value
hubPath := dirPath + "/" + hubDetails.Name + ".zip" | ||
destDir, err := os.Create(path.Clean(hubPath)) | ||
hubpath := dirPath + "/" + hubDetails.Name + ".zip" | ||
destDir, err := os.Create(hubpath) |
Check failure
Code scanning / CodeQL
Uncontrolled data used in path expression High
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
@@ -198,14 +189,14 @@ | |||
contentLength := download.Header.Get("content-length") | |||
length, err := strconv.Atoi(contentLength) | |||
if length > maxSize { | |||
_ = os.Remove(path.Clean(hubPath)) | |||
_ = os.Remove(hubpath) |
Check failure
Code scanning / CodeQL
Uncontrolled data used in path expression High
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
return fmt.Errorf("err: File size exceeded the threshold %d", length) | ||
} | ||
|
||
//validate the content-type | ||
contentType := download.Header.Get("content-type") | ||
if contentType != "application/zip" { | ||
_ = os.Remove(path.Clean(hubPath)) | ||
_ = os.Remove(hubpath) |
Check failure
Code scanning / CodeQL
Uncontrolled data used in path expression High
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
if err != nil { | ||
csvManifest = "" | ||
} | ||
|
||
csvManifest = string(yamlData) | ||
|
||
yamlData, err = os.ReadFile(path.Clean(experimentsPath + experiment + "/" + "experiment.yaml")) | ||
yamlData, err = ioutil.ReadFile(experimentsPath + experiment + "/" + "experiment.yaml") |
Check failure
Code scanning / CodeQL
Uncontrolled data used in path expression High
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
@@ -112,7 +113,7 @@ | |||
|
|||
gitInfo := map[string]string{"projectID": c.ProjectID, "revision": "1"} | |||
if exists { | |||
data, err := os.ReadFile(path.Clean(projectPath + "/.info")) | |||
data, err := ioutil.ReadFile(projectPath + "/.info") |
Check failure
Code scanning / CodeQL
Uncontrolled data used in path expression High
user-provided value
This path depends on a
user-provided value
@@ -136,7 +137,7 @@ | |||
if err != nil { | |||
return err | |||
} | |||
err = os.WriteFile(path.Clean(projectPath+"/.info"), data, 0644) | |||
err = ioutil.WriteFile(projectPath+"/.info", data, 0644) |
Check failure
Code scanning / CodeQL
Uncontrolled data used in path expression High
user-provided value
This path depends on a
user-provided value
@@ -136,7 +137,7 @@ | |||
if err != nil { | |||
return err | |||
} | |||
err = os.WriteFile(path.Clean(projectPath+"/.info"), data, 0644) | |||
err = ioutil.WriteFile(projectPath+"/.info", data, 0644) |
Check failure
Code scanning / CodeQL
Uncontrolled data used in path expression High
user-provided value
This path depends on a
user-provided value
@@ -271,7 +269,7 @@ | |||
return errors.New("Cannot convert manifest to yaml : " + err.Error()) | |||
} | |||
|
|||
err = os.WriteFile(experimentPath, data, 0644) | |||
err = ioutil.WriteFile(experimentPath, data, 0644) |
Check failure
Code scanning / CodeQL
Uncontrolled data used in path expression High
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
) This reverts commit da8ae75.
Reverts #4475
This PR is reverted since it is breaking the chaos hub experiment page. Experiment list shows 0 experiments:
The changes will be fixed in next release by @namkyu1999 🚀