Skip to content

Commit c2ba05e

Browse files
committed
Merge remote-tracking branch 'origin/main' into fix/incremental-depsdev-ingestion-CM-1281
2 parents 0fdd301 + e534bb0 commit c2ba05e

6 files changed

Lines changed: 13 additions & 3 deletions

services/libs/tinybird/pipes/agentic_ai_projects_list_copy.pipe

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ SQL >
204204
) AS vulnerabilities30d
205205
FROM vulnerabilities v FINAL
206206
JOIN repositories r FINAL ON v.repoUrl = r.url
207-
WHERE v.repoUrl IN (SELECT url FROM ai_repos)
207+
WHERE v.repoUrl IN (SELECT url FROM ai_repos) AND r.archived = false
208208
GROUP BY r.insightsProjectId
209209

210210
NODE final_join

services/libs/tinybird/pipes/insights_projects_populated_copy.pipe

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,9 @@ SQL >
188188
LEFT JOIN
189189
vulnerability_scans vs final
190190
ON vs.repoUrl = insights_projects_populated_copy_flatten_projects.repository
191+
WHERE
192+
insights_projects_populated_copy_flatten_projects.repository
193+
NOT IN (SELECT url FROM repositories FINAL WHERE archived = true)
191194
group by insightsProjectId
192195

193196
NODE insights_projects_populated_copy_results

services/libs/tinybird/pipes/vulnerabilities_by_ecosystem.pipe

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ SQL >
77
round(count(v.id) * 100.0 / greatest(sum(count(v.id)) OVER (), 1), 0) as percentage
88
FROM vulnerabilities as v FINAL
99
WHERE
10-
repoUrl in (select arrayJoin(repositories) from segments_filtered) AND v.status != 'RESOLVED'
10+
repoUrl in (select arrayJoin(repositories) from segments_filtered)
11+
AND v.repoUrl NOT IN (SELECT url FROM repositories FINAL WHERE archived = true)
12+
AND v.status != 'RESOLVED'
1113
{% if defined(repos) %} AND repoUrl IN (SELECT channel FROM repos_to_channels) {% end %}
1214
GROUP BY v.packageEcosystem
1315
ORDER BY count DESC

services/libs/tinybird/pipes/vulnerabilities_by_severity.pipe

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ SQL >
77
round(count(v.id) * 100.0 / greatest(sum(count(v.id)) OVER (), 1), 0) as percentage
88
FROM vulnerabilities as v FINAL
99
WHERE
10-
repoUrl in (select arrayJoin(repositories) from segments_filtered) AND v.status != 'RESOLVED'
10+
repoUrl in (select arrayJoin(repositories) from segments_filtered)
11+
AND v.repoUrl NOT IN (SELECT url FROM repositories FINAL WHERE archived = true)
12+
AND v.status != 'RESOLVED'
1113
{% if defined(repos) %} AND repoUrl IN (SELECT channel FROM repos_to_channels) {% end %}
1214
GROUP BY v.severity
1315
ORDER BY count DESC

services/libs/tinybird/pipes/vulnerabilities_list.pipe

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ SQL >
66
FROM vulnerabilities as v FINAL
77
WHERE
88
repoUrl in (select arrayJoin(repositories) from segments_filtered)
9+
AND v.repoUrl NOT IN (SELECT url FROM repositories FINAL WHERE archived = true)
910
{% if defined(repos) %} AND repoUrl IN (SELECT channel FROM repos_to_channels) {% end %}
1011
{% if defined(ecosystem) %}
1112
AND v.packageEcosystem = {{ String(ecosystem, required=False) }}
@@ -28,6 +29,7 @@ SQL >
2829
FROM vulnerabilities as v FINAL
2930
WHERE
3031
repoUrl in (select arrayJoin(repositories) from segments_filtered)
32+
AND v.repoUrl NOT IN (SELECT url FROM repositories FINAL WHERE archived = true)
3133
{% if defined(repos) %} AND repoUrl IN (SELECT channel FROM repos_to_channels)
3234
{% end %}
3335
{% if defined(ecosystem) %} AND v.packageEcosystem = {{ String(ecosystem, required=False) }}

services/libs/tinybird/pipes/vulnerabilities_summary.pipe

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ SQL >
1010
FROM vulnerabilities as v FINAL
1111
WHERE
1212
repoUrl in (select arrayJoin(repositories) from segments_filtered)
13+
AND v.repoUrl NOT IN (SELECT url FROM repositories FINAL WHERE archived = true)
1314
{% if defined(repos) %} AND repoUrl IN (SELECT channel FROM repos_to_channels) {% end %}

0 commit comments

Comments
 (0)