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

Revert "Replace deprecated package" #4533

Merged
merged 1 commit into from Mar 15, 2024

Conversation

amityt
Copy link
Contributor

@amityt amityt commented Mar 15, 2024

Reverts #4475

This PR is reverted since it is breaking the chaos hub experiment page. Experiment list shows 0 experiments:
image (9)

The changes will be fixed in next release by @namkyu1999 🚀

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

This path depends on a
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

This path depends on a
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

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
.
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

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
.
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

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
.
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

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
.
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

This path depends on a
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

This path depends on a
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

This path depends on a
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

This path depends on a
user-provided value
.
This path depends on a
user-provided value
.
This path depends on a
user-provided value
.
@Saranya-jena Saranya-jena merged commit e5b5a61 into master Mar 15, 2024
17 of 18 checks passed
@Saranya-jena Saranya-jena deleted the revert-4475-replace-deprecated-library branch March 15, 2024 07:18
kartikaysaxena pushed a commit to kartikaysaxena/litmus that referenced this pull request Apr 6, 2024
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.

None yet

4 participants