charlescd
charlescd copied to clipboard
Secret reference for passwords
Issue Description
Credentials are exposed in the Helm chart installation.
Solution
By using Kubernetes secrets references.
Results
helm install charlescd ./install/helm-chart --set CharlesApplications.moove.database.passwordSecretName=moove-credentials
The above instruction will result in Pod's spec like
spec:
containers:
- env:
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
key: password
name: moove-credentials
Instead of
spec:
containers:
- env:
- name: DB_PASSWORD
value: "3xp053d_p455w0rd"
⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.
Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.
🔎 Details of the secret
Secret | Commit | Filename | Detected At | |
---|---|---|---|---|
Generic High Entropy Secret | deb9491a4b00b17927bd070e9cc9756a7d1b7b1d | install/helm-chart/values.yaml | 18:00 November 26th, 2021 | View secret |
🛠 How to resolve this
-
Understand the implications of revoking this secret by examining 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 your git history to remove all evidence of the secret leak. Please beware this is not a trivial operation. You might completely break other contributing developers’ workflow and you risk accidentally deleting work in progress.
:bulb: To avoid such incidents in the future, consider following these best practices for managing and storing secrets including API keys and other credentials.
You are seeing this because you or someone else has authorized GitGuardian to scan pull requests
⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.
Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.
🔎 Detected hardcoded secret in your pull request
GitGuardian id | Secret | Commit | Filename | |
---|---|---|---|---|
- | Generic High Entropy Secret | deb9491a4b00b17927bd070e9cc9756a7d1b7b1d | install/helm-chart/values.yaml | 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!