Skip to content

change: introduce new implementation of dbcrypt package#267

Merged
badarghal merged 16 commits intomainfrom
AT-2841-new-dbcrypt
Dec 1, 2025
Merged

change: introduce new implementation of dbcrypt package#267
badarghal merged 16 commits intomainfrom
AT-2841-new-dbcrypt

Conversation

@badarghal
Copy link
Copy Markdown

@badarghal badarghal commented Nov 20, 2025

What

It adds a new safer and easier to use implementation of dbcrypt package.

Why

Old implementation was riddled with bugs, security issues, it was hard to use and it was extremely easy to make mistakes and brake the system.

References

Checklist

  • Tests

Integration demonstration

@greenbonebot
Copy link
Copy Markdown
Member

Scanning the following files:

pkg/dbcrypt/cipher.go
pkg/dbcrypt/crypto.go
pkg/dbcrypt/dbcryptv2.go
pkg/dbcrypt/dbcryptv2_test.go
pkg/dbcrypt/value.go

Scan: 'pkg/dbcrypt/cipher.go'

Nothing detected in pkg/dbcrypt/cipher.go
Scan took 0.00 seconds

Scan: 'pkg/dbcrypt/crypto.go'

Nothing detected in pkg/dbcrypt/crypto.go
Scan took 0.00 seconds

Scan: 'pkg/dbcrypt/dbcryptv2.go'

Nothing detected in pkg/dbcrypt/dbcryptv2.go
Scan took 0.00 seconds

Scan: 'pkg/dbcrypt/dbcryptv2_test.go'

Nothing detected in pkg/dbcrypt/dbcryptv2_test.go
Scan took 0.00 seconds

Scan: 'pkg/dbcrypt/value.go'

Nothing detected in pkg/dbcrypt/value.go
Scan took 0.00 seconds

@github-actions
Copy link
Copy Markdown

github-actions bot commented Nov 20, 2025

Conventional Commits Report

Type Number
Changed 13

🚀 Conventional commits found.

@codecov
Copy link
Copy Markdown

codecov bot commented Nov 20, 2025

Codecov Report

❌ Patch coverage is 63.05085% with 109 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.47%. Comparing base (0cf5a5e) to head (992192d).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
pkg/dbcrypt/gorm.go 55.07% 45 Missing and 17 partials ⚠️
pkg/dbcrypt/cipher_spec.go 62.50% 11 Missing and 10 partials ⚠️
pkg/dbcrypt/cipher.go 70.90% 8 Missing and 8 partials ⚠️
pkg/dbcrypt/dbcipher.go 78.26% 5 Missing and 5 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #267      +/-   ##
==========================================
+ Coverage   57.10%   57.47%   +0.36%     
==========================================
  Files          66       68       +2     
  Lines        3562     3781     +219     
==========================================
+ Hits         2034     2173     +139     
- Misses       1378     1430      +52     
- Partials      150      178      +28     
Flag Coverage Δ
opensearch-tests 95.66% <ø> (ø)
postgres-tests 91.96% <ø> (ø)
unit-tests 51.89% <63.05%> (+0.82%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread pkg/dbcrypt/cipher_test.go Outdated
Comment thread pkg/dbcrypt/dbcipher.go Outdated
Comment thread pkg/dbcrypt/dbcipher.go Outdated
Comment thread pkg/dbcrypt/gorm_test.go Outdated
Comment thread pkg/dbcrypt/gorm_test.go Outdated
@badarghal badarghal marked this pull request as ready for review November 25, 2025 09:00
@badarghal badarghal requested review from a team as code owners November 25, 2025 09:00
Comment thread pkg/dbcrypt/README.md Outdated
Comment thread pkg/dbcrypt/cipher.go Outdated
Comment thread pkg/dbcrypt/crypto.go Outdated
Comment thread pkg/dbcrypt/dbcipher.go Outdated
Comment thread pkg/dbcrypt/dbcipher.go Outdated
Comment thread pkg/dbcrypt/cipher.go Outdated
@badarghal badarghal merged commit 9556ab7 into main Dec 1, 2025
12 of 13 checks passed
@badarghal badarghal deleted the AT-2841-new-dbcrypt branch December 1, 2025 09:55
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.

3 participants