-
Notifications
You must be signed in to change notification settings - Fork 19
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
send skipTLSVerify and Insecure in image scanning command #212
Conversation
Signed-off-by: Amir Malka <amirm@armosec.io>
|
GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
---|---|---|---|---|---|
9724889 | Triggered | Generic High Entropy Secret | 2b446e6 | mainhandler/testdata/vulnscan/registry-secret.json | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
Our GitHub checks need improvements? Share your feedbacks!
PR Description updated to latest commit (2b446e6) |
PR Review
✨ Review tool usage guide:Overview:
With a configuration file, use the following template:
See the review usage page for a comprehensive guide on using this tool. |
PR Code Suggestions
✨ Improve tool usage guide:Overview:
With a configuration file, use the following template:
See the improve usage page for a more comprehensive guide on using this tool. |
Signed-off-by: Amir Malka <amirm@armosec.io>
} | ||
for i := range secrets { | ||
registryAuth = append(registryAuth, secrets[i]) | ||
if pod != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this check is needed to make the code testable (since GetImageRegistryCredentials
calls NewKubernetesApi
Summary:
|
Overview
This PR fixes kubescape/kubevuln#209
When scanning individual images the operator did not send the
skipTLSVerify
andhttp
attributes (for insecure registries). These attributes are supported in the registry scan secret(see https://kubescape.io/docs/operator/vulnerabilities/#granting-credentials-directly )
As part of the fix, when parsing the secret, we match the registry name of the scanned image with the registry name in the secret. If such match found, we pass the values to the scan command args.
When scanning image registry, the scan command did include these fields so no change is needed.