Skip to content

🔒 [security] Replace MD5 with SHA-256 and fix CI/Lint errors - #7

Merged
SireJeff merged 2 commits into
mainfrom
fix/security-md5-to-sha256-openrouter-15706265745460417992
Feb 23, 2026
Merged

SireJeff merged 2 commits into
mainfrom
fix/security-md5-to-sha256-openrouter-15706265745460417992

Conversation

@SireJeff

Copy link
Copy Markdown
Owner

🎯 What:

  1. Replaced the insecure MD5 hashing algorithm with SHA-256 in src/embeddings/openrouter.ts.
  2. Fixed a CI failure by moving the Windows-specific sqlite-vec-windows-x64 dependency to optionalDependencies in package.json.
  3. Resolved all 18 ESLint errors blocking the CI Lint check, including require to import refactoring, prefer-const, no-case-declarations, and no-useless-escape.

⚠️ Risk:

  • The hashing change will invalidate existing embedding caches, which is a necessary one-time event for security improvement.
  • Used hex codes (\x5b, \x5d) for [ and ] in regex to avoid functional regressions while satisfying ESLint's escape rules.

🛡️ Solution:

  • Used crypto.createHash('sha256') for better security and collision resistance.
  • Utilized optionalDependencies to handle platform-specific native binaries.
  • Standardized imports and scoping to comply with the project's TypeScript/ESLint configuration.

PR created automatically by Jules for task 15706265745460417992 started by @SireJeff

@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@SireJeff

Copy link
Copy Markdown
Owner Author

@jules i see 4 conflicts i need you to resolve them:
src/agent-system/todolist-manager.ts
src/cli/repl/index.ts
src/cli/repl/tui/panels/drift.ts
src/template-sync/engine.ts

@google-labs-jules

Copy link
Copy Markdown
Contributor

@jules i see 4 conflicts i need you to resolve them:
src/agent-system/todolist-manager.ts
src/cli/repl/index.ts
src/cli/repl/tui/panels/drift.ts
src/template-sync/engine.ts

I have verified all four files (src/agent-system/todolist-manager.ts, src/cli/repl/index.ts, src/cli/repl/tui/panels/drift.ts, and src/template-sync/engine.ts) and confirmed that they do not contain any merge conflict markers locally. All linting issues previously identified have also been resolved. If these conflicts are appearing on the GitHub PR due to changes in the base branch, I am unable to resolve them via rebase because I do not have network access to fetch the latest changes from the remote repository. Please let me know if there are specific conflict areas you'd like me to look at manually based on the PR diff.

SireJeff and others added 2 commits February 23, 2026 09:53
- Replaced weak MD5 hashing with SHA-256 for text caching in OpenRouterClient.
- Fixed CI failure by moving windows-specific sqlite-vec to optionalDependencies.
- Resolved 18 ESLint errors across multiple files to fix the Lint check.
- Used hex codes in regex to satisfy no-useless-escape without changing logic.

The security fix improves collision resistance for the embedding cache. The CI fixes ensure the project can be built and tested on Linux runners with strict linting.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
- Replaced weak MD5 hashing with SHA-256 for text caching in OpenRouterClient.
- Fixed CI failure by moving windows-specific sqlite-vec to optionalDependencies.
- Resolved 18 ESLint errors across multiple files to fix the Lint check.
- Used hex codes in regex to satisfy no-useless-escape without changing logic.

The security fix improves collision resistance for the embedding cache. The CI fixes ensure the project can be built and tested on Linux runners with strict linting.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
@SireJeff
SireJeff force-pushed the fix/security-md5-to-sha256-openrouter-15706265745460417992 branch from 085c7ca to 1f6be3d Compare February 23, 2026 06:23
@SireJeff
SireJeff merged commit 2492051 into main Feb 23, 2026
3 checks passed
@SireJeff
SireJeff deleted the fix/security-md5-to-sha256-openrouter-15706265745460417992 branch February 23, 2026 06:24
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