-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Potential fix for code scanning alert no. 12: DOM text reinterpreted as HTML #272
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
Closed
Conversation
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
Bumps [astro](https://github.com/withastro/astro/tree/HEAD/packages/astro) from 4.15.4 to 4.15.8. - [Release notes](https://github.com/withastro/astro/releases) - [Changelog](https://github.com/withastro/astro/blob/main/packages/astro/CHANGELOG.md) - [Commits](https://github.com/withastro/astro/commits/[email protected]/packages/astro) --- updated-dependencies: - dependency-name: astro dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [tsx](https://github.com/privatenumber/tsx) from 4.19.0 to 4.19.1. - [Release notes](https://github.com/privatenumber/tsx/releases) - [Changelog](https://github.com/privatenumber/tsx/blob/master/release.config.cjs) - [Commits](privatenumber/tsx@v4.19.0...v4.19.1) --- updated-dependencies: - dependency-name: tsx dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
…sx-4.19.1 chore(deps): bump tsx from 4.19.0 to 4.19.1
…astro-4.15.8 chore(deps): bump astro from 4.15.4 to 4.15.8
Bumps [lucide-astro](https://github.com/dzeiocom/lucide-astro) from 0.439.0 to 0.445.0. - [Release notes](https://github.com/dzeiocom/lucide-astro/releases) - [Commits](https://github.com/dzeiocom/lucide-astro/commits) --- updated-dependencies: - dependency-name: lucide-astro dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
…lucide-astro-0.445.0 chore(deps): bump lucide-astro from 0.439.0 to 0.445.0
…fastify/middie-9.0.2 chore(deps): bump @fastify/middie from 8.3.1 to 9.0.2
Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss) from 3.4.12 to 3.4.13. - [Release notes](https://github.com/tailwindlabs/tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/v3.4.13/CHANGELOG.md) - [Commits](tailwindlabs/tailwindcss@v3.4.12...v3.4.13) --- updated-dependencies: - dependency-name: tailwindcss dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [@mercuryworkshop/wisp-js](https://github.com/MercuryWorkshop/wisp-client-js) from 0.1.1 to 0.3.2. - [Commits](https://github.com/MercuryWorkshop/wisp-client-js/commits) --- updated-dependencies: - dependency-name: "@mercuryworkshop/wisp-js" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [@biomejs/biome](https://github.com/biomejs/biome/tree/HEAD/packages/@biomejs/biome) from 1.9.0 to 1.9.3. - [Release notes](https://github.com/biomejs/biome/releases) - [Changelog](https://github.com/biomejs/biome/blob/main/CHANGELOG.md) - [Commits](https://github.com/biomejs/biome/commits/cli/v1.9.3/packages/@biomejs/biome) --- updated-dependencies: - dependency-name: "@biomejs/biome" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
…biomejs/biome-1.9.3 chore(deps-dev): bump @biomejs/biome from 1.9.0 to 1.9.3
…tailwindcss-3.4.13 chore(deps): bump tailwindcss from 3.4.12 to 3.4.13
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.5.4 to 22.7.4. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
…types/node-22.7.4 chore(deps-dev): bump @types/node from 22.5.4 to 22.7.4
Bumps the npm_and_yarn group with 3 updates: [dset](https://github.com/lukeed/dset), [find-my-way](https://github.com/delvedor/find-my-way) and [rollup](https://github.com/rollup/rollup). Updates `dset` from 3.1.3 to 3.1.4 - [Release notes](https://github.com/lukeed/dset/releases) - [Commits](lukeed/dset@v3.1.3...v3.1.4) Updates `find-my-way` from 8.2.0 to 8.2.2 - [Release notes](https://github.com/delvedor/find-my-way/releases) - [Commits](delvedor/find-my-way@v8.2.0...v8.2.2) Updates `rollup` from 4.21.0 to 4.24.0 - [Release notes](https://github.com/rollup/rollup/releases) - [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md) - [Commits](rollup/rollup@v4.21.0...v4.24.0) --- updated-dependencies: - dependency-name: dset dependency-type: indirect dependency-group: npm_and_yarn - dependency-name: find-my-way dependency-type: indirect dependency-group: npm_and_yarn - dependency-name: rollup dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <[email protected]>
…npm_and_yarn-d0b9176546 chore(deps): bump the npm_and_yarn group with 3 updates
…mercuryworkshop/wisp-js-0.3.2 chore(deps): bump @mercuryworkshop/wisp-js from 0.1.1 to 0.3.2
Bumps [astro](https://github.com/withastro/astro/tree/HEAD/packages/astro) from 4.15.8 to 4.15.11. - [Release notes](https://github.com/withastro/astro/releases) - [Changelog](https://github.com/withastro/astro/blob/main/packages/astro/CHANGELOG.md) - [Commits](https://github.com/withastro/astro/commits/[email protected]/packages/astro) --- updated-dependencies: - dependency-name: astro dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
…astro-4.15.11 chore(deps): bump astro from 4.15.8 to 4.15.11
Bumps [lucide-astro](https://github.com/dzeiocom/lucide-astro) from 0.445.0 to 0.447.0. - [Release notes](https://github.com/dzeiocom/lucide-astro/releases) - [Commits](https://github.com/dzeiocom/lucide-astro/commits) --- updated-dependencies: - dependency-name: lucide-astro dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
…lucide-astro-0.447.0 chore(deps): bump lucide-astro from 0.445.0 to 0.447.0
Bumps @mercuryworkshop/epoxy-transport from 2.1.11 to 2.1.13. --- updated-dependencies: - dependency-name: "@mercuryworkshop/epoxy-transport" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
…mercuryworkshop/epoxy-transport-2.1.13 chore(deps): bump @mercuryworkshop/epoxy-transport from 2.1.11 to 2.1.13
Bumps [lucide-astro](https://github.com/dzeiocom/lucide-astro) from 0.447.0 to 0.453.0. - [Release notes](https://github.com/dzeiocom/lucide-astro/releases) - [Commits](https://github.com/dzeiocom/lucide-astro/commits) --- updated-dependencies: - dependency-name: lucide-astro dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
…dates Bumps the npm_and_yarn group with 3 updates in the / directory: [astro](https://github.com/withastro/astro/tree/HEAD/packages/astro), [glob](https://github.com/isaacs/node-glob) and [mdast-util-to-hast](https://github.com/syntax-tree/mdast-util-to-hast). Updates `astro` from 5.15.2 to 5.16.5 - [Release notes](https://github.com/withastro/astro/releases) - [Changelog](https://github.com/withastro/astro/blob/main/packages/astro/CHANGELOG.md) - [Commits](https://github.com/withastro/astro/commits/[email protected]/packages/astro) Updates `glob` from 10.4.5 to 10.5.0 - [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md) - [Commits](isaacs/node-glob@v10.4.5...v10.5.0) Updates `glob` from 11.0.0 to 11.1.0 - [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md) - [Commits](isaacs/node-glob@v10.4.5...v10.5.0) Updates `mdast-util-to-hast` from 13.2.0 to 13.2.1 - [Release notes](https://github.com/syntax-tree/mdast-util-to-hast/releases) - [Commits](syntax-tree/mdast-util-to-hast@13.2.0...13.2.1) --- updated-dependencies: - dependency-name: astro dependency-version: 5.16.5 dependency-type: direct:production dependency-group: npm_and_yarn - dependency-name: glob dependency-version: 10.5.0 dependency-type: indirect dependency-group: npm_and_yarn - dependency-name: glob dependency-version: 11.1.0 dependency-type: indirect dependency-group: npm_and_yarn - dependency-name: mdast-util-to-hast dependency-version: 13.2.1 dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <[email protected]>
…npm_and_yarn-c730bd8c16 chore(deps): bump the npm_and_yarn group across 1 directory with 3 updates
…as HTML Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
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.
Potential fix for https://github.com/UseInterstellar/Interstellar-Astro/security/code-scanning/12
To fully address this vulnerability, the user-supplied URL (flowing from search input and settings) must be validated and sanitized such that only safe schemes like
https://orhttp://are allowed before being rendered as an iframesrc. There are two robust ways to do this:Validate user input as soon as it's received and before storing it into storage.
Before assigning to the iframe's
srcprop, ensure it's a valid HTTP(S) URL.The best place is before passing to
encodeProxyUrlin Browser.tsx (i.e., sanitize everytab.urlbefore passing to that function), so that even data from bookmarks or other flows cannot inject a malicious URL into the iframe. This check will ensure only valid HTTP(S) URLs (orabout:blank) are used.Implementation steps:
sanitizeUrlfunction (insrc/lib/tabs.ts), ensuring the input is "about:blank" or a safe HTTP(S) URL, or else default to "about:blank".sanitizeUrlin Browser.tsx, wrapping thetab.urlvalue on line 453 before passing it toencodeProxyUrl.URLconstructor for parsing, or a regex matching HTTP(S) URLs.Suggested fixes powered by Copilot Autofix. Review carefully before merging.