-
Notifications
You must be signed in to change notification settings - Fork 510
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
[draft] Scheduling #9076
[draft] Scheduling #9076
Conversation
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
✅ Deploy Preview for care-ohc ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
👋 Hi, @rithviknishad, This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there. |
|
Yes, we can do that. |
CARE Run #3915
Run Properties:
|
Project |
CARE
|
Branch Review |
rithviknishad/feat/scheduling
|
Run status |
Passed #3915
|
Run duration | 04m 57s |
Commit |
bf8e2f0e39: [draft] Scheduling
|
Committer | Rithvik Nishad |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
0
|
Pending |
0
|
Skipped |
0
|
Passing |
126
|
View all changes introduced in this branch ↗︎ |
👋 Hi, @rithviknishad, This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there. |
👋 Hi, @rithviknishad, This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there. |
navigate( | ||
`/facility/${facilityId}/appointments/${staffUsername}/book-appointment`, | ||
); | ||
localStorage.setItem("phoneNumber", phoneNumber); |
Check failure
Code scanning / CodeQL
Clear text storage of sensitive information
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix AI 20 days ago
To fix the problem, we need to ensure that the phone number is encrypted before being stored in localStorage
. We can use the crypto
module from Node.js to encrypt the phone number. The encrypted phone number can then be safely stored in localStorage
. When retrieving the phone number, we will need to decrypt it.
- Import the
crypto
module. - Create functions to encrypt and decrypt the phone number.
- Encrypt the phone number before storing it in
localStorage
. - Decrypt the phone number when retrieving it from
localStorage
.
-
Copy modified line R3 -
Copy modified lines R84-R85 -
Copy modified lines R91-R92 -
Copy modified line R194
@@ -2,2 +2,3 @@ | ||
import { useState } from "react"; | ||
import crypto from "crypto"; | ||
|
||
@@ -82,3 +83,4 @@ | ||
); | ||
localStorage.setItem("phoneNumber", phoneNumber); | ||
const encryptedPhoneNumber = encrypt(phoneNumber); | ||
localStorage.setItem("phoneNumber", encryptedPhoneNumber); | ||
} | ||
@@ -88,3 +90,4 @@ | ||
); | ||
localStorage.setItem("phoneNumber", phoneNumber); | ||
const encryptedPhoneNumber = encrypt(phoneNumber); | ||
localStorage.setItem("phoneNumber", encryptedPhoneNumber); | ||
}; | ||
@@ -190 +193,2 @@ | ||
} | ||
|
navigate( | ||
`/facility/${facilityId}/appointments/${staffUsername}/book-appointment`, | ||
); | ||
localStorage.setItem("phoneNumber", phoneNumber); |
Check failure
Code scanning / CodeQL
Clear text storage of sensitive information
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix AI 20 days ago
To fix the problem, we need to ensure that the phone number is encrypted before being stored in localStorage
. We can use the crypto
module from Node.js to encrypt the phone number. The encryption key should be securely managed and not hardcoded in the code.
- Import the
crypto
module. - Create an encryption function that uses a secure algorithm to encrypt the phone number.
- Use this function to encrypt the phone number before storing it in
localStorage
.
-
Copy modified line R3 -
Copy modified lines R29-R34 -
Copy modified line R90 -
Copy modified line R96
@@ -2,2 +2,3 @@ | ||
import { useState } from "react"; | ||
import crypto from "crypto"; | ||
|
||
@@ -27,2 +28,8 @@ | ||
const { goBack } = useAppHistory(); | ||
const encryptionKey = "your-secure-key"; // Replace with a secure key management solution | ||
|
||
const encrypt = (text: string) => { | ||
const cipher = crypto.createCipher("aes-256-ctr", encryptionKey); | ||
return cipher.update(text, "utf8", "hex") + cipher.final("hex"); | ||
}; | ||
const [phoneNumber, setPhoneNumber] = useState("+91"); | ||
@@ -82,3 +89,3 @@ | ||
); | ||
localStorage.setItem("phoneNumber", phoneNumber); | ||
localStorage.setItem("phoneNumber", encrypt(phoneNumber)); | ||
} | ||
@@ -88,3 +95,3 @@ | ||
); | ||
localStorage.setItem("phoneNumber", phoneNumber); | ||
localStorage.setItem("phoneNumber", encrypt(phoneNumber)); | ||
}; |
👋 Hi, @rithviknishad, This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there. |
Closing as merged to #9262 |
Required Backend Changes
Docs
Screenshots / Demo Video
(will update once ready)
Merge Checklist