You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here are some key observations to aid the review process:
⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
🧪 No relevant tests
🔒 Security concerns
Operation Injection: Pixel commands interpolate untrusted values (e.g., builder.name, workspace.appId, blockId) directly into the query strings. Ensure these inputs are sanitized or validated to prevent injection attacks.
In the custom runPixel wrapper, the parameters are swapped (insightId passed as pixel and pixel string as insight ID), which will break the SDK call. Verify and correct the argument order when invoking the imported runPixel.
The runPixel invocation uses .then(...) without a matching .catch(...), so errors could be swallowed. Add error handling to surface failures and stop the loading screen appropriately.
In getClientBlocks, runPixel('GetClientBlocks()').then(...) isn’t awaited before clearing loading state, which can hide the loader prematurely. Consider using await or moving setLoading(false) into a finally block.
Why: The call currently passes the insight ID before the pixel expression, which breaks the SDK call; swapping to (pixel, insightId) restores correct functionality.
High
General
Handle runPixel errors
Add error handling inside the .then callback to surface any runPixel errors via notification and stop further processing if errors occur.
This file contains hidden or 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
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.
Description
Remove runPixelTwo and pull from @semoss/sdk
Changes Made
Removed runPixelTwo and replaced it with runPixel that is pulled from @semoss/sdk