charlescd icon indicating copy to clipboard operation
charlescd copied to clipboard

Secret reference for passwords

Open tiagoangelozup opened this issue 3 years ago • 2 comments

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"

tiagoangelozup avatar Nov 23 '21 19:11 tiagoangelozup

⚠️ 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
  1. Understand the implications of revoking this secret by examining where it is used in your code.

  2. Replace and store your secret safely. Learn here the best practices

  3. Revoke and rotate this secret

  4. 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[bot] avatar Nov 26 '21 18:11 gitguardian[bot]

⚠️ 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
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. 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


🦉 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!

gitguardian[bot] avatar Feb 21 '22 14:02 gitguardian[bot]