Skip to content

Conversation

@travjenkins
Copy link
Member

https://github.com/estuary/flow/security/code-scanning/8

Description:

Escaping the tenant name

Workflow steps:

This will impact how Azure gets setup. This still needs tested

Documentation links affected:

Notes for reviewers:

(anything that might help someone review this PR)

Adding in 'state' to help with CSRF a bit
Some clean up to ensure the params are escaped
Comment on lines +13 to +14
const state = crypto.randomUUID()
sessionStorage.setItem(SETTINGS.storageKey, state);
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the MAJOR update here. We need to store this off and validate it down below.

@github-actions
Copy link

github-actions bot commented Dec 19, 2025

PR Preview Action v1.6.3

🚀 View preview at
https://estuary.github.io/flow/pr-preview/pr-2576/

Built to branch gh-pages at 2025-12-22 16:03 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Comment on lines +16 to +22
const params = new URLSearchParams({
client_id: SETTINGS.appId,
redirect_uri: SETTINGS.redirectUri,
resource_id: SETTINGS.resourceId,
response_type: SETTINGS.responseType,
[SETTINGS.stateKey]: state,
});
Copy link
Member Author

Choose a reason for hiding this comment

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

Setting up the params in this way should handle escaping for us.

Comment on lines 51 to 57
if (authCode === "error") {
return (
<span style={{ color: "red" }}>
We were unable to verify this worked. Please contact support.
</span>
);
}
Copy link
Member Author

Choose a reason for hiding this comment

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

This is where things get weird. Normally in an oAuth situation we might consume this code and do something with it. However, here we are just seeing that things are setup. So I think this is the best we could do here 🤷 .

Like if this happens either their browser messed up or possibly someone messed with their stuff and they just setup something wrong.

Copy link
Member

@mdibaiee mdibaiee left a comment

Choose a reason for hiding this comment

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

LGTM, let me know if you need help testing this

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.

3 participants