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

[SM-1174] Use state by default #913

Closed
wants to merge 11 commits into from
Closed

[SM-1174] Use state by default #913

wants to merge 11 commits into from

Conversation

coltonhurst
Copy link
Member

🎟️ Tracking

📔 Objective

📸 Screenshots

⏰ 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

@coltonhurst coltonhurst self-assigned this Jul 18, 2024
Copy link
Contributor

github-actions bot commented Jul 18, 2024

Logo
Checkmarx One – Scan Summary & Detailsfdbc7bc4-2d54-4820-a03b-03d0db2f7360

No New Or Fixed Issues Found

@@ -48,6 +52,36 @@
serialized_state.encrypt_with_key(&access_token.encryption_key)?;
let state_string: String = encrypted_state.to_string();

std::fs::create_dir_all(state_file.parent().unwrap())?;

Check failure

Code scanning / clippy

used unwrap() on an Option value Error

used unwrap() on an Option value
Copy link

codecov bot commented Jul 18, 2024

Codecov Report

Attention: Patch coverage is 0% with 40 lines in your changes missing coverage. Please review.

Project coverage is 57.82%. Comparing base (d4cb453) to head (38c7a07).

Files Patch % Lines
crates/bitwarden-core/src/secrets_manager/state.rs 0.00% 24 Missing ⚠️
crates/bws/src/main.rs 0.00% 11 Missing ⚠️
...ates/bitwarden-core/src/auth/login/access_token.rs 0.00% 5 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff               @@
##           sm/sm-1096     #913      +/-   ##
==============================================
- Coverage       57.93%   57.82%   -0.11%     
==============================================
  Files             193      192       -1     
  Lines           13119    13137      +18     
==============================================
- Hits             7600     7597       -3     
- Misses           5519     5540      +21     

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

@@ -39,6 +39,7 @@ chrono = { version = ">=0.4.26, <0.5", features = [
"std",
], default-features = false }
coset = { version = "0.3.7", optional = true }
dirs = "5.0.1"
Copy link
Member

Choose a reason for hiding this comment

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

Hmm, not a huge fan of adding this dependency to the bitwarden-core crate. It also feels weird for a library to have side effects and write files without being prompted.

Base automatically changed from sm/sm-1096 to main July 25, 2024 15:07
@coltonhurst
Copy link
Member Author

As discussed, for now will only add default state to bws. Will do this in a separate PR.

@coltonhurst coltonhurst deleted the sm/sm-1174 branch July 30, 2024 18:10
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.

2 participants