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

Option to skip https certificate verification #920

Merged
merged 1 commit into from
Feb 17, 2023

Conversation

fengshunli
Copy link
Contributor

@fengshunli fengshunli commented Feb 17, 2023

This PR fixes #

Checklist

  • I have signed the CLA
  • I have updated/added any relevant documentation

Description

What's the goal of this PR?

What changes did you make?

What alternative solution should we consider, if any?

Comment on lines 206 to 208
client := &http.Client{Transport: &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
}}
Copy link
Contributor

Choose a reason for hiding this comment

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

@fengshunli this is super dangerous--at most we should make this an option and turn it off by default.

@rbren
Copy link
Contributor

rbren commented Feb 17, 2023

@fengshunli can you fill out the PR template? I'm not sure what you're trying to achieve here.

It might be better to provide a CA using these environment variables

SSL_CERT_FILE=/path/to/x509_encoded_cert_file dep ensure
SSL_CERT_DIR=/path/to/dir/ dep ensure

@fengshunli
Copy link
Contributor Author

Because I am a self-signed certificate, I want to skip the certificate verification when uploading the result through --output-url @rbren

@fengshunli
Copy link
Contributor Author

Do I need to add a global -skip-ssl-validation set to false by default to resubmit @rbren

@rbren
Copy link
Contributor

rbren commented Feb 17, 2023

Yup that's perfect! Thanks

@fengshunli
Copy link
Contributor Author

Yup that's perfect! Thanks

done @rbren

cmd/polaris/audit.go Outdated Show resolved Hide resolved
Signed-off-by: fengshunli <1171313930@qq.com>
@fengshunli
Copy link
Contributor Author

done @rbren

@rbren rbren merged commit 501744a into FairwindsOps:master Feb 17, 2023
@rbren rbren changed the title Skip https certificate verification Option to skip https certificate verification Feb 17, 2023
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.

2 participants