Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add reconnect #362

Merged
merged 2 commits into from
Feb 27, 2025
Merged

Add reconnect #362

merged 2 commits into from
Feb 27, 2025

Conversation

pontusab
Copy link
Contributor

No description provided.

@pontusab pontusab merged commit a60e26f into main Feb 27, 2025
3 checks passed
return createHash("sha256").update(input).digest("hex").slice(0, 12);
export function hashInstitutionId(name: string, country?: string): string {
const input = `${name}-${country}`;
return createHash("md5").update(input).digest("hex").slice(0, 12);

Check failure

Code scanning / CodeQL

Use of a broken or weak cryptographic algorithm High

A broken or weak cryptographic algorithm
depends on
sensitive data from a call to getAccounts
.
A broken or weak cryptographic algorithm
depends on
sensitive data from an access to account
.
A broken or weak cryptographic algorithm
depends on
sensitive data from an access to account
.
A broken or weak cryptographic algorithm
depends on
sensitive data from a call to getAccountDetails
.
A broken or weak cryptographic algorithm
depends on
sensitive data from an access to accountDetails
.

Copilot Autofix AI 4 days ago

To fix the problem, we should replace the MD5 hashing algorithm with a stronger and more secure algorithm, such as SHA-256. This will ensure that the hashed data is more secure and less vulnerable to attacks.

  • Replace the createHash("md5") call with createHash("sha256").
  • Update the slice operation to get a suitable length of the hash if needed.
Suggested changeset 1
apps/engine/src/providers/enablebanking/transform.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/apps/engine/src/providers/enablebanking/transform.ts b/apps/engine/src/providers/enablebanking/transform.ts
--- a/apps/engine/src/providers/enablebanking/transform.ts
+++ b/apps/engine/src/providers/enablebanking/transform.ts
@@ -15,3 +15,3 @@
   const input = `${name}-${country}`;
-  return createHash("md5").update(input).digest("hex").slice(0, 12);
+  return createHash("sha256").update(input).digest("hex").slice(0, 12);
 }
EOF
@@ -15,3 +15,3 @@
const input = `${name}-${country}`;
return createHash("md5").update(input).digest("hex").slice(0, 12);
return createHash("sha256").update(input).digest("hex").slice(0, 12);
}
Copilot is powered by AI and may make mistakes. Always verify output.
Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant