feat: cli env upload
Closes #1612 @maidul98
@akhilmhdh wrt the commented out block in secret-service.ts, using the cli secrets set command, where in this case the secret key already exists, instead of updating the existing secret with the new value it always gave this response
error: CallUpdateSecretsV3: Unsuccessful response. Please make sure your secret path, workspace and environment name are all correct [response={"statusCode":400,"message":"Secret already exist","error":"BadRequest"}]
Unable to process secret update request
Commenting out that block resolves it. Is it by design or its a bug?
Hey @quinton11 Its a valid block and it should not be commented out. Its a check to ensure the new key submitted doesn't exist
@akhilmhdh pushed an update undoing the comment
⚠️ GitGuardian has uncovered 2 secrets 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.
Since your pull request originates from a forked repository, GitGuardian is not able to associate the secrets uncovered with secret incidents on your GitGuardian dashboard. Skipping this check run and merging your pull request will create secret incidents on your GitGuardian dashboard.
🔎 Detected hardcoded secrets in your pull request
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 9605380 | Triggered | Generic Private Key | 5c495cf313db07430387a3bf56b8d477801c3f02 | backend/e2e-test/routes/v3/secrets-v2.spec.ts | View secret |
| 9605380 | Triggered | Generic Private Key | 5c495cf313db07430387a3bf56b8d477801c3f02 | backend/e2e-test/routes/v3/secrets-v2.spec.ts | 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 secrets safely. Learn here the best practices.
- Revoke and rotate these secrets.
- 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.