Cray-HPE / sat

System Admin Toolkit
https://cray-hpe.github.io/docs-sat/
MIT License
4 stars 5 forks source link

CRAYSAT-1920: Backport `sat bmccreds` improvements to SAT 2.6/CSM 1.5 #274

Closed annapoorna-s-alt closed 1 week ago

annapoorna-s-alt commented 2 weeks ago

IM: CRAYSAT-1920 Reviewer: Ryan

(cherry picked from commit d428ea727913a12529b893a290613f20ea194000)

Summary and Scope

This backports sat bmccreds improvements to release/3.25 for inclusion in CSM 1.5 and SAT 2.6.

Issues and Related PRs

Resolves CRAYSAT-1920.

Testing

See linked PR.

Risks and Mitigations

See linked PR.

Pull Request Checklist

gitguardian[bot] commented 2 weeks ago

⚠️ 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 | GitGuardian status | Secret | Commit | Filename | | | -------------- | ------------------ | ------------------------------ | ---------------- | --------------- | -------------------- | | [3858100](https://dashboard.gitguardian.com/workspace/258433/incidents/3858100?occurrence=167850859) | Triggered | Generic Password | 1553dbb0fdfaa97686c89938597f224c352fc35e | tests/cli/bmccreds/test_main.py | [View secret](https://github.com/Cray-HPE/sat/commit/1553dbb0fdfaa97686c89938597f224c352fc35e#diff-126f420e32726d4561e640e85ec79bc0719e5a99fc1a754c8286c8d3efaca60bL281) |
🛠 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](https://blog.gitguardian.com/secrets-api-management) the best practices. 3. Revoke and [rotate this secret](https://docs.gitguardian.com/secrets-detection/detectors/specifics/private_key_openssh#revoke-the-secret). 4. If possible, [rewrite git history](https://blog.gitguardian.com/rewriting-git-history-cheatsheet). 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](https://blog.gitguardian.com/secrets-api-management/) for managing and storing secrets including API keys and other credentials - install [secret detection on pre-commit](https://docs.gitguardian.com/internal-repositories-monitoring/integrations/git_hooks/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.