jfroment / seedbox

A Docker-powered seedbox with persistent data and more cool stuff.
MIT License
331 stars 45 forks source link

Add progress indicator to run-seedbox.sh #66

Open tblaudez opened 14 hours ago

tblaudez commented 14 hours ago

Add a progress indicator to the configuration loop in run-seedbox.sh I added this to avoid frustration when running the script is lengthy (especially when my VPS in under heavy load).

The JSON configuration is put in a variable casted a as Bash array so that we can still loop over it AND retrieve its length. Another variable is added to count the current iteration of the loop.

Using this information, we use printf to add a new output line with constant width that indicates the current progress. This line is being constantly overwritten by each iteration thanks to the carriage return and the constant width. When we are on the last iteration of the loop; we break out of the progress line by adding a sole newline.

Cette fois c'est une vraie PR mdr

gitguardian[bot] commented 14 hours ago

⚠️ 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 | | | -------------- | ------------------ | ------------------------------ | ---------------- | --------------- | -------------------- | | [878723](https://dashboard.gitguardian.com/workspace/127311/incidents/878723?occurrence=87807066) | Triggered | Generic Password | 3bb3662b147c5515d56242c2857dd4157aba49ea | .env.sample | [View secret](https://github.com/jfroment/seedbox/commit/3bb3662b147c5515d56242c2857dd4157aba49ea#diff-088d9f35d23a4347d221d71dd49b02b95001dff4abe637a40fe0bc04d502049cL32) | | [878724](https://dashboard.gitguardian.com/workspace/127311/incidents/878724?occurrence=87807067) | Triggered | Generic Password | 3bb3662b147c5515d56242c2857dd4157aba49ea | .env.sample | [View secret](https://github.com/jfroment/seedbox/commit/3bb3662b147c5515d56242c2857dd4157aba49ea#diff-088d9f35d23a4347d221d71dd49b02b95001dff4abe637a40fe0bc04d502049cL35) |
🛠 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 secrets safely. [Learn here](https://blog.gitguardian.com/secrets-api-management?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment) the best practices. 3. Revoke and [rotate these secrets](https://docs.gitguardian.com/secrets-detection/secrets-detection-engine/detectors/generics/generic_password#revoke-the-secret?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment). 4. If possible, [rewrite git history](https://blog.gitguardian.com/rewriting-git-history-cheatsheet?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment). 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/?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment) for managing and storing secrets including API keys and other credentials - install [secret detection on pre-commit](https://docs.gitguardian.com/ggshield-docs/integrations/git-hooks/pre-commit?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment) 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.

tblaudez commented 14 hours ago

Edit: Changed base from dev to master since I edited from this branch

jfroment commented 10 hours ago

Could you please target dev instead of master so the changes here will be part of next release? I try to keep the master branch tied to releases so newcomers or people who want stability have all tested/validated/documented changes only in master. No problem if the change originates from master as they are no breaking changes.

jfroment commented 10 hours ago

Actually I can target dev myself :)

tblaudez commented 10 hours ago

Sure thing ! I'll keep it in mind for the next PRs and use dev as the source branch.