-
Notifications
You must be signed in to change notification settings - Fork 16
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
fix(security): expose certified flag for ICP to XDR conversion rate #830
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size-limit report 📦
|
yhabib
changed the title
Secfind 421/certified call
fix(security): use update call for ICP to XDR conversion rate
Jan 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks. Can you add an entry in the CHANGELOG.md
?
I'll approve afterwards, I would need to re-approve after your commit anyway ;)
yhabib
changed the title
fix(security): use update call for ICP to XDR conversion rate
fix(security): expose certified flag for ICP to XDR conversion rate
Jan 29, 2025
peterpeterparker
approved these changes
Jan 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thx!
yhabib
force-pushed
the
secfind-421/certified-call
branch
from
January 29, 2025 16:58
9ccfff6
to
f88dbc3
Compare
This was referenced Jan 29, 2025
github-merge-queue bot
pushed a commit
to dfinity/nns-dapp
that referenced
this pull request
Jan 30, 2025
# Motivation We want to pull in the latest changes to make the get the the ICP to XDR conversion rate certified. Related ic-js pr: dfinity/ic-js#830 # Changes - Run `npm run upgrade:next` - Add new fields to the mock - the reason why the CI action upgrade is failing. # Tests - Should pass as before # Todos - [ ] Add entry to changelog (if necessary). Not necessary
github-merge-queue bot
pushed a commit
to dfinity/nns-dapp
that referenced
this pull request
Jan 30, 2025
) # Motivation It has been flagged as a security concern not to use a certified query when reading the ICP to XDR conversion rate. This is a follow up of dfinity/ic-js#830 to make the call as a certified one. [SECFIND-421](https://dfinity.atlassian.net/browse/SECFIND-421) # Changes - Pass the `certified` flag to `getIcpToCyclesConversionRate` to make it an update call # Tests - Updated unit test to check that the flag is provided # Todos - [ ] Add entry to changelog (if necessary). Not necessary [SECFIND-421]: https://dfinity.atlassian.net/browse/SECFIND-421?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
It has been flagged as a security concern not to use a certified query when reading the ICP to XDR conversion rate.
One option is to implement certificate validation, but its complexity seems beyond the scope of the security ticket. Therefore, I am exposing a new parameter to make the call an update call instead of a query call.
SECFIND-421
Changes
certified
parameter forgetIcpToCyclesConversionRate
to use thecertifiedService
Tests
service
is call whencertified: false
certifiedService
is call whencertified: true
Todos