Conversation
Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
| {% end %} | ||
| {% if defined(ids) %} | ||
| AND id | ||
| IN {{ Array(ids, 'String', description="Filter by project id list", required=False) }} |
There was a problem hiding this comment.
Endpoint returns all data when no parameters provided
Medium Severity
The slug parameter changed from required=True to required=False, and the new slugs/ids parameters are also optional. When none are provided, the WHERE 1=1 clause causes the endpoint to return the entire project_insights_copy_ds table unfiltered. The documentation states "At least one of slug, slugs, or ids should be provided" but this constraint isn't enforced. Other similar endpoints like health_score_overview.pipe use an {% else %} fallback to guarantee a filter is always applied.


Note
Medium Risk
Medium risk because it changes the
project_insights_copy_dsschema and copy pipeline joins, which can impact downstream queries and increase copy-job cost if the new joins/aggregations behave unexpectedly.Overview
Expands the project insights dataset and API output.
project_insights_copy_dsandproject_insights.pipenow include additional project metadata (logoUrl,isLF, contributor/org counts), contributor/org dependency metrics, andachievements(latest leaderboard snapshot aggregated per project).Updates query behavior and ingestion.
project_insights.pipeadds optional multi-project filtering viaslugsandids(and makesslugoptional), whileproject_insights_copy.pipeenriches the daily COPY by left-joining dependency metrics fromhealth_score_copy_dsand aggregating achievements fromleaderboards_copy_ds, defaulting missing values viaCOALESCE.Written by Cursor Bugbot for commit ea522e4. This will update automatically on new commits. Configure here.