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

::js problem - How should we handle mapLabel from the instance? #1377

Open
hanbyul-here opened this issue Jan 14, 2025 · 0 comments
Open

::js problem - How should we handle mapLabel from the instance? #1377

hanbyul-here opened this issue Jan 14, 2025 · 0 comments

Comments

@hanbyul-here
Copy link
Collaborator

hanbyul-here commented Jan 14, 2025

Veda content allows the function to be passed as its property with ::js prefix: https://github.com/NASA-IMPACT/veda-ui/blob/main/docs/content/frontmatter/layer.md#function-values . This is mainly used by the mapLabel attribute to create the label dynamically based on the editor’s needs. However, this requires evaluating the function on the fly. Evaluating functions dynamically can pose a security risk. This is particularly dangerous in environments that are less monitored (instances with fewer human resources)

Investigate how MapLabel is currently used in the codebase. Determine whether this function-based approach is actually necessary or if there are alternative ways to achieve the same functionality. Identify and suggest safer alternatives. (ex. Sensible defaults.) or offer some sanitization of functions, at least.

Further - is there any case that uses ::js other than mapLabel?

@hanbyul-here hanbyul-here changed the title How should we handle mapLabel from the instance? ::js problem - How should we handle mapLabel from the instance? Feb 3, 2025
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

No branches or pull requests

1 participant