Decode and encode Token V4 #84

Closed
davidcaseria wants to merge 4 commits from token-v4-refactor into main
davidcaseria commented 2024-04-12 20:06:57 +00:00 (Migrated from github.com)

Refactor of #73 given the crate changes.

Closes #68.

Refactor of #73 given the crate changes. Closes #68.
gitguardian[bot] commented 2024-04-12 20:08:35 +00:00 (Migrated from github.com)

⚠️ 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
- Generic High Entropy Secret 94857ff3fc crates/cdk/src/nuts/nut00.rs View secret
🛠 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 the best practices.
  3. Revoke and rotate this secret.
  4. 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


🦉 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!

#### ⚠️ 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. <details> <summary>🔎 Detected hardcoded secret in your pull request</summary> <br> | GitGuardian id | GitGuardian status | Secret | Commit | Filename | | | -------------- | ------------------ | ------------------------------ | ---------------- | --------------- | -------------------- | | [-](https://dashboard.gitguardian.com/incidents/secrets) | | Generic High Entropy Secret | 94857ff3fcd884a1354818dc0949dc8ae103e321 | crates/cdk/src/nuts/nut00.rs | [View secret](https://github.com/thesimplekid/cashu-crab/commit/94857ff3fcd884a1354818dc0949dc8ae103e321#diff-5275b56568a52cd7eedac15d6e280b9be2f44bd685d82310ae3e38def05a9583L686) | </details> <details> <summary>🛠 Guidelines to remediate hardcoded secrets</summary> <br> 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?utm_source=product&amp;utm_medium=GitHub_checks&amp;utm_campaign=check_run_comment) the best practices. 3. Revoke and [rotate this secret](https://docs.gitguardian.com/secrets-detection/secrets-detection-engine/detectors/generics/generic_high_entropy_secret#revoke-the-secret?utm_source=product&amp;utm_medium=GitHub_checks&amp;utm_campaign=check_run_comment). 4. If possible, [rewrite git history](https://blog.gitguardian.com/rewriting-git-history-cheatsheet?utm_source=product&amp;utm_medium=GitHub_checks&amp;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&amp;utm_medium=GitHub_checks&amp;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&amp;utm_medium=GitHub_checks&amp;utm_campaign=check_run_comment) to catch secret before it leaves your machine and ease remediation. </details> --- <sup>🦉 [GitGuardian](https://dashboard.gitguardian.com/auth/login/?utm_medium=checkruns&amp;utm_source=github&amp;utm_campaign=cr1) 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.<br/><br/>Our GitHub checks need improvements? [Share your feedbacks](https://form.typeform.com/to/KmeAPTMk)!</sup>
thesimplekid (Migrated from github.com) reviewed 2024-04-22 22:00:22 +00:00
@ -50,0 +51,4 @@
pub fn to_bytes(&self) -> Vec<u8> {
// TODO: Remove unwrap when struct holds bytes instead of string
hex::decode(self.to_string()).unwrap()
}
thesimplekid (Migrated from github.com) commented 2024-04-22 22:00:21 +00:00

Id stored as bytes if we merge #95 we can remove the unwrap

`Id` stored as bytes if we merge #95 we can remove the unwrap
thesimplekid commented 2024-06-28 14:58:21 +00:00 (Migrated from github.com)

gonna close this for the rebased one #158

gonna close this for the rebased one #158

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cashubtc/cdk!84
No description provided.