-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Repro test for CODEOWNERS leading slashes in pattern & path #102905
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
Repro test for CODEOWNERS leading slashes in pattern & path #102905
Conversation
❌ 1 Tests Failed:
View the top 1 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
| {"abs_path": "libs/web/views/index/home.tsx"}, | ||
| ], | ||
| True, | ||
| ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Root Anchoring Logic Inconsistency
The test expects an anchored pattern /libs/web/views/index/** (with leading slash) to match a path without a leading slash libs/web/views/index/home.tsx. This contradicts standard CODEOWNERS semantics where a leading slash anchors the pattern to the repository root, meaning it should only match paths that also start from the root. This creates an asymmetry with the first test case where a pattern without a leading slash doesn't match a path with one, suggesting the expected value should be False instead of True.
|
Semgrep found 1 Risk: Affected versions of Django are vulnerable to Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'). SQL injection in Django's ORM column aliases: when using QuerySet.annotate(), QuerySet.alias(), QuerySet.aggregate(), or QuerySet.extra() with dictionary expansion (**kwargs), the dictionary keys are used unescaped as SQL column aliases. On MySQL and MariaDB backends, an attacker who can influence those keys (for example, by passing a crafted dict of annotations) can inject arbitrary SQL into the generated query. Manual Review Advice: A vulnerability from this advisory is reachable if you are using Django with MySQL or MariaDB Fix: Upgrade this library to at least version 5.2.7 at sentry/uv.lock:305. Reference(s): GHSA-hpr9-3m2g-3j9p, CVE-2025-59681 |
Adds a test to codify the matching behavior for CODEOWNERS rules when leading slashes are involved between the rule pattern & stack trace path. https://sentry.slack.com/archives/C04KZQBNQ2U/p1762380421731289
Adds a test to codify the matching behavior for CODEOWNERS rules when leading slashes are involved between the rule pattern & stack trace path. https://sentry.slack.com/archives/C04KZQBNQ2U/p1762380421731289
Adds a test to codify the matching behavior for CODEOWNERS rules when leading slashes are involved between the rule pattern & stack trace path.
https://sentry.slack.com/archives/C04KZQBNQ2U/p1762380421731289