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

Trackingscripts: Check for urls #236

Merged
merged 2 commits into from
Jul 22, 2024
Merged

Conversation

academo
Copy link
Member

@academo academo commented Jul 22, 2024

Improve the logic for the tracking scripts to check only inside urls and not all the code to prevent false positives.

@academo academo self-assigned this Jul 22, 2024
@academo academo requested review from a team as code owners July 22, 2024 09:14
@academo academo requested review from jackw, wbrowne, andresmgot and xnyo and removed request for a team July 22, 2024 09:14
Copy link
Contributor

@leventebalogh leventebalogh left a comment

Choose a reason for hiding this comment

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

🚀

t,
interceptor.Diagnostics[0].Detail,
"Tracking scripts are not allowed in Grafana plugins (e.g. google analytics). Please remove any usage of tracking code. Found: https://www.google-analytics.com/analytics.js",
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Would be nice to add a test case that checks for this improvement (e.g. that grafana-asserts-app.rules:read doesn't trigger "pp.ru").

@academo academo merged commit f03c5c1 into main Jul 22, 2024
3 checks passed
@academo academo deleted the academo/improve-tracking-scripts-logic branch July 22, 2024 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

3 participants