Skip to content
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

Remove external hosted JS for Monaco Editor #364

Open
Tracked by #777
johnaohara opened this issue Feb 6, 2023 · 3 comments
Open
Tracked by #777

Remove external hosted JS for Monaco Editor #364

johnaohara opened this issue Feb 6, 2023 · 3 comments
Assignees
Labels
type/bug Something isn't working

Comments

@johnaohara
Copy link
Member

Describe the bug

Externally hosted JS are key components of UI.

For example, the JSON and code editor is based on Monaco Editor (https://github.com/Microsoft/monaco-editor) but the JS for the editor is linked to a remote host: https://cdn.jsdelivr.net/npm/monaco-editor@0.28.1/min/vs/editor/editor.main.js

All JS should be served from the Horreum webapp and not rely on externally hosted JS for functionality.

Not only is there a security concern, but the Horreum UI will not function as intended in air-gapped envs or when https://cdn.jsdelivr.net fails to serve the required JS files

@johnaohara johnaohara added the type/bug Something isn't working label Feb 6, 2023
@jesperpedersen
Copy link
Collaborator

This is def a problem, but I think it spans using JavaScript packages for the project in general.

We need a way to distribute JavaScript packages that won't reference external sites. Currently, this is maintained by package.json so we need another mechanism to deal with it.

Of course, the Monaco editor could be the proof-of-concept.

@johnaohara
Copy link
Member Author

From an intial scan, it looks like monaco is the only affected library, but we should audit all the deps to identify the ones that load external resources at runtime

@jesperpedersen
Copy link
Collaborator

Yeah, we probably need a support matrix for the Monaco Editor stuff with the React dependencies as well.

We have about 1.5y worth of updates within this area.

@jesperpedersen jesperpedersen changed the title Remove exteranally hosted JS for Monaco Editor Remove external hosted JS for Monaco Editor Feb 13, 2023
@Hyperfoil Hyperfoil deleted a comment from johnaohara Feb 13, 2023
@johnaohara johnaohara mentioned this issue Oct 19, 2023
14 tasks
@johnaohara johnaohara self-assigned this Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants