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

Sandbox loader: Check if it's a grafana org plugin #97035

Closed
wants to merge 1 commit into from

Conversation

andresmgot
Copy link
Contributor

What is this feature?

Extend the check to no try to sandbox plugins with grafana as its org.

@andresmgot andresmgot added no-backport Skip backport of PR no-changelog Skip including change in changelog/release notes labels Nov 26, 2024
@andresmgot andresmgot requested a review from a team as a code owner November 26, 2024 12:12
@github-actions github-actions bot added this to the 11.4.x milestone Nov 26, 2024
@andresmgot andresmgot self-assigned this Nov 26, 2024
if (
pluginMeta.signatureType === PluginSignatureType.grafana ||
pluginMeta.signature === 'internal' ||
pluginId.startsWith('grafana-')
Copy link
Contributor

Choose a reason for hiding this comment

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

curious, do we have cases where signatureType is different for grafana- plugins?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not in the catalog (AFAIK) but it could be unsigned when developing

Copy link
Member

Choose a reason for hiding this comment

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

I am not convinced with this check. A malicious plugin can potentially escape the sandbox by changing its plugin-id to something starting with grafana-

Copy link
Contributor Author

Choose a reason for hiding this comment

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

plugins cannot change their id 😓 so only unsigned plugins would be able to start with grafana-. In any case, there is no clear use case for this (only for dev), so happy to not include it.

@andresmgot andresmgot closed this Nov 27, 2024
@github-actions github-actions bot removed this from the 11.4.x milestone Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/frontend no-backport Skip backport of PR no-changelog Skip including change in changelog/release notes
Projects
Status: 🚀 Shipped
Development

Successfully merging this pull request may close these issues.

3 participants