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

Replace ZeroizingAllocator #38

Merged
merged 2 commits into from
Dec 6, 2024
Merged

Replace ZeroizingAllocator #38

merged 2 commits into from
Dec 6, 2024

Conversation

dani-garcia
Copy link
Member

🎟️ Tracking

📔 Objective

Replace our internal ZeroizingAllocator by the external crate zeroizing-alloc, which has the same functionality but removes some undefined behavior.

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation
    team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed
    issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

Copy link
Contributor

github-actions bot commented Nov 25, 2024

Logo
Checkmarx One – Scan Summary & Details0e35cb0e-473b-4ee5-ab1f-efc5b7906a45

No New Or Fixed Issues Found

@dani-garcia dani-garcia requested a review from Hinton November 25, 2024 11:19
Copy link

codecov bot commented Nov 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.89%. Comparing base (09ad475) to head (8c809de).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #38      +/-   ##
==========================================
+ Coverage   63.44%   63.89%   +0.45%     
==========================================
  Files         187      186       -1     
  Lines       13002    12905      -97     
==========================================
- Hits         8249     8246       -3     
+ Misses       4753     4659      -94     

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

@Hinton Hinton linked an issue Nov 25, 2024 that may be closed by this pull request
Copy link
Member

@Hinton Hinton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From a code perspective this looks good. I will spend some time digging into the produced code in a few environments to confirm it behaves as we expect.

crates/bitwarden-crypto/src/lib.rs Show resolved Hide resolved
Copy link
Member

@Hinton Hinton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested manually on the different environments. As far as I can tell it correctly zeroizes allocated memory.

@dani-garcia dani-garcia merged commit ceba460 into main Dec 6, 2024
40 checks passed
@dani-garcia dani-garcia deleted the ps/replace-zero-alloc branch December 6, 2024 18:22
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.

Allocator wrapper implementation contains undefined behavior
2 participants