dpinney / omf

The Open Modeling Framework for smart grid cost-benefit analysis.
https://omf.coop
GNU General Public License v2.0
112 stars 60 forks source link

Lblakel #398

Closed lblakel closed 1 year ago

lblakel commented 1 year ago

This pull request adds two items to the phaseId tool.

1) Pulls the number of customers from the data file instead of assuming a fixed number of customers. Also adds a data type to the numpy conversion

/omf/omf/solvers/sandia_ami_phase_id/init.py in main_csv Line 1090: Added data type to numpy conversion Line 1092: Changed number of customers from 200 to pull number of customers from the data Line 1092: Added data type to numpy conversion

2) Adds the final cluster labels field to the output csv

/omf/omf/solvers/sandia_ami_phase_id/init.py in CreateFullListCustomerResults_CAEns

in main

Line 1191 & 1193: updated function call to include the final cluster labels field Line 1203: Added final cluster labels field to the csv output

gitguardian[bot] commented 1 year ago

⚠️ GitGuardian has uncovered 15 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.

🔎 Detected hardcoded secrets in your pull request
| GitGuardian id | Secret | Commit | Filename | | | -------------- | ------------------------- | ---------------- | --------------- | -------------------- | | [-](https://dashboard.gitguardian.com/incidents/secrets) | Generic High Entropy Secret | c7a3b3b486530e279a56b0df31fb2dbb2f2b74c6 | omf/solvers/REopt/__init__.py | [View secret](https://github.com/dpinney/omf/commit/c7a3b3b486530e279a56b0df31fb2dbb2f2b74c6#diff-b6b44fefb772ed4b1e0534a143380d80R7) | | [-](https://dashboard.gitguardian.com/incidents/secrets) | Generic High Entropy Secret | c7a3b3b486530e279a56b0df31fb2dbb2f2b74c6 | omf/solvers/REopt/__init__.py | [View secret](https://github.com/dpinney/omf/commit/c7a3b3b486530e279a56b0df31fb2dbb2f2b74c6#diff-b6b44fefb772ed4b1e0534a143380d80L7) | | [-](https://dashboard.gitguardian.com/incidents/secrets) | Generic High Entropy Secret | c7a3b3b486530e279a56b0df31fb2dbb2f2b74c6 | omf/solvers/REopt/__init__.py | [View secret](https://github.com/dpinney/omf/commit/c7a3b3b486530e279a56b0df31fb2dbb2f2b74c6#diff-b6b44fefb772ed4b1e0534a143380d80R8) | | [-](https://dashboard.gitguardian.com/incidents/secrets) | Generic High Entropy Secret | c7a3b3b486530e279a56b0df31fb2dbb2f2b74c6 | omf/solvers/REopt/__init__.py | [View secret](https://github.com/dpinney/omf/commit/c7a3b3b486530e279a56b0df31fb2dbb2f2b74c6#diff-b6b44fefb772ed4b1e0534a143380d80L9) | | [-](https://dashboard.gitguardian.com/incidents/secrets) | Generic High Entropy Secret | c7a3b3b486530e279a56b0df31fb2dbb2f2b74c6 | omf/solvers/REopt/__init__.py | [View secret](https://github.com/dpinney/omf/commit/c7a3b3b486530e279a56b0df31fb2dbb2f2b74c6#diff-b6b44fefb772ed4b1e0534a143380d80L10) | | [-](https://dashboard.gitguardian.com/incidents/secrets) | Generic High Entropy Secret | c7a3b3b486530e279a56b0df31fb2dbb2f2b74c6 | omf/solvers/REopt/__init__.py | [View secret](https://github.com/dpinney/omf/commit/c7a3b3b486530e279a56b0df31fb2dbb2f2b74c6#diff-b6b44fefb772ed4b1e0534a143380d80L11) | | [-](https://dashboard.gitguardian.com/incidents/secrets) | Generic High Entropy Secret | c7a3b3b486530e279a56b0df31fb2dbb2f2b74c6 | omf/solvers/REopt/__init__.py | [View secret](https://github.com/dpinney/omf/commit/c7a3b3b486530e279a56b0df31fb2dbb2f2b74c6#diff-b6b44fefb772ed4b1e0534a143380d80L12) | | [-](https://dashboard.gitguardian.com/incidents/secrets) | Generic High Entropy Secret | c7a3b3b486530e279a56b0df31fb2dbb2f2b74c6 | omf/solvers/REopt/__init__.py | [View secret](https://github.com/dpinney/omf/commit/c7a3b3b486530e279a56b0df31fb2dbb2f2b74c6#diff-b6b44fefb772ed4b1e0534a143380d80R31) | | [-](https://dashboard.gitguardian.com/incidents/secrets) | Generic High Entropy Secret | c7a3b3b486530e279a56b0df31fb2dbb2f2b74c6 | omf/solvers/REopt/post_and_poll.py | [View secret](https://github.com/dpinney/omf/commit/c7a3b3b486530e279a56b0df31fb2dbb2f2b74c6#diff-1f715478059db3a77d2c06d365763360R7) | | [-](https://dashboard.gitguardian.com/incidents/secrets) | Generic High Entropy Secret | c7a3b3b486530e279a56b0df31fb2dbb2f2b74c6 | omf/solvers/REopt/post_and_poll.py | [View secret](https://github.com/dpinney/omf/commit/c7a3b3b486530e279a56b0df31fb2dbb2f2b74c6#diff-1f715478059db3a77d2c06d365763360L7) | | [-](https://dashboard.gitguardian.com/incidents/secrets) | Generic High Entropy Secret | c7a3b3b486530e279a56b0df31fb2dbb2f2b74c6 | omf/solvers/REopt/post_and_poll.py | [View secret](https://github.com/dpinney/omf/commit/c7a3b3b486530e279a56b0df31fb2dbb2f2b74c6#diff-1f715478059db3a77d2c06d365763360R8) | | [-](https://dashboard.gitguardian.com/incidents/secrets) | Generic High Entropy Secret | c7a3b3b486530e279a56b0df31fb2dbb2f2b74c6 | omf/solvers/REopt/post_and_poll.py | [View secret](https://github.com/dpinney/omf/commit/c7a3b3b486530e279a56b0df31fb2dbb2f2b74c6#diff-1f715478059db3a77d2c06d365763360L9) | | [-](https://dashboard.gitguardian.com/incidents/secrets) | Generic High Entropy Secret | c7a3b3b486530e279a56b0df31fb2dbb2f2b74c6 | omf/solvers/REopt/post_and_poll.py | [View secret](https://github.com/dpinney/omf/commit/c7a3b3b486530e279a56b0df31fb2dbb2f2b74c6#diff-1f715478059db3a77d2c06d365763360L10) | | [-](https://dashboard.gitguardian.com/incidents/secrets) | Generic High Entropy Secret | c7a3b3b486530e279a56b0df31fb2dbb2f2b74c6 | omf/solvers/REopt/post_and_poll.py | [View secret](https://github.com/dpinney/omf/commit/c7a3b3b486530e279a56b0df31fb2dbb2f2b74c6#diff-1f715478059db3a77d2c06d365763360L11) | | [-](https://dashboard.gitguardian.com/incidents/secrets) | Generic High Entropy Secret | c7a3b3b486530e279a56b0df31fb2dbb2f2b74c6 | omf/solvers/REopt/post_and_poll.py | [View secret](https://github.com/dpinney/omf/commit/c7a3b3b486530e279a56b0df31fb2dbb2f2b74c6#diff-1f715478059db3a77d2c06d365763360L12) |
🛠 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/detectors/generics/generic_high_entropy_secret#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/internal-repositories-monitoring/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.

Our GitHub checks need improvements? Share your feedbacks!