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

Fix codeql issue #5438

Merged
merged 3 commits into from Oct 17, 2022
Merged

Fix codeql issue #5438

merged 3 commits into from Oct 17, 2022

Conversation

antgamdia
Copy link
Contributor

Description of the change

This PR aims at solving the issue reported by CodeQl (see https://github.com/vmware-tanzu/kubeapps/security/code-scanning/29).

Benefits

No more CodeQL open issues

Possible drawbacks

N/A

Applicable issues

Additional information

Run prettier as well.

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
@netlify
Copy link

netlify bot commented Oct 6, 2022

Deploy Preview for kubeapps-dev canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit ff0b7da
🔍 Latest deploy log https://app.netlify.com/sites/kubeapps-dev/deploys/633ebd2318cf0b00085a27f1

Comment on lines 293 to 296
// https://codeql.github.com/codeql-query-help/go/go-log-injection/
escapedUrl := strings.Replace(fmt.Sprintf("%s", resp.Request.URL), "\n", "", -1)
escapedUrl = strings.Replace(escapedUrl, "\r", "", -1)
return fmt.Errorf("%s %q: unexpected status code %d: %s", resp.Request.Method, escapedUrl, resp.StatusCode, errmsg)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the actual change, the rest is just prettier

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
Copy link
Collaborator

@castelblanque castelblanque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@antgamdia antgamdia merged commit e953c89 into vmware-tanzu:main Oct 17, 2022
@antgamdia antgamdia deleted the fix-codeql-issue branch October 17, 2022 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants