pokt-network / pocket

Official implementation of the Pocket Network Protocol v1
https://pokt.network
MIT License
61 stars 33 forks source link

chore: introduce `Submodule` interface #855

Closed bryanchriswhite closed 11 months ago

bryanchriswhite commented 1 year ago

Description

Introduces the Submodule interface and applies it to the P2P module's peerstore provider.

Issue

Deliverables 1, 2, 3, & 5:

Type of change

Please mark the relevant option(s):

List of changes

Testing

Required Checklist

If Applicable Checklist

bryanchriswhite commented 1 year ago

Everything looks good to me, I saw the comments about potentially unrelated hunks. Will they remain in this PR or move?

I think I force pushed over the commits that I referenced, my apologies. The changes I was referencing are still in this branch. I was just trying to point out that parts of those changes didn't necessarily fit with the rest.

bryanchriswhite commented 1 year ago

Linking the mindmap from this comment in #844 for additional context.

gitguardian[bot] commented 11 months 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.

🔎 Detected hardcoded secrets in your pull request
| GitGuardian id | Secret | Commit | Filename | | | -------------- | ------------------------- | ---------------- | --------------- | -------------------- | | [5841025](https://dashboard.gitguardian.com/incidents/5841025?occurrence=99443742) | Generic High Entropy Secret | 4b19d8f561ff6bb628748bae16713c3eb8ed1424 | charts/pocket/templates/configmap-genesis.yaml | [View secret](https://github.com/pokt-network/pocket/commit/4b19d8f561ff6bb628748bae16713c3eb8ed1424#diff-33d68fb410c6b83957f59a2c6fcdc96d62a90d236e6a2a65bf24b205baa46f5dR1799) | | [5841025](https://dashboard.gitguardian.com/incidents/5841025?occurrence=99443867) | Generic High Entropy Secret | cf886a7e861cfc5c2ba7a291cb6328b3d4a7640f | charts/pocket/templates/configmap-genesis.yaml | [View secret](https://github.com/pokt-network/pocket/commit/cf886a7e861cfc5c2ba7a291cb6328b3d4a7640f#diff-33d68fb410c6b83957f59a2c6fcdc96d62a90d236e6a2a65bf24b205baa46f5dR1799) |
🛠 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/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.

Our GitHub checks need improvements? Share your feedbacks!

bryanchriswhite commented 11 months ago

LGTM +1 Replacing providers with submodules seems worth an ADR, if you want help writing that up let's take a look at it @bryanchriswhite

@dylanlott it's more like the providers need to become submodules.

bryanchriswhite commented 11 months ago

:rotating_light: Please don't delete this branch! I will do so when all downstream branches have been rebased, thank you! :rotating_light: