Skip to content

Commit

Permalink
Domain Coverage Report
Browse files Browse the repository at this point in the history
Hotfix for #15

Signed-off-by: Bentley Hensel <bentleyhensel@gmail.com>
  • Loading branch information
TheBoatyMcBoatFace committed Sep 26, 2023
1 parent af444ad commit 39f06d5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/api/database/postgres/queries/axe/coverage.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@ SELECT
COUNT(CASE WHEN u.active_scan_axe THEN 1 END) AS active_axe_urls,
COUNT(CASE WHEN u.is_objective THEN 1 END) AS is_objective_urls,
COUNT(CASE WHEN u.errored THEN 1 END) AS errored_urls,
COUNT(DISTINCT sd.url_id) AS axe_tested_count,
ROUND(
100.0 * COUNT(CASE WHEN u.active_scan_axe THEN 1 END) / NULLIF(COUNT(u.id), 0),
2
) AS domain_coverage_axe
FROM targets.domains d
LEFT JOIN targets.urls u ON d.id = u.domain_id
WHERE d."domain" ILIKE '%s'
LEFT JOIN axe.scan_data sd ON u.id = sd.url_id
WHERE d."domain" LIKE '%s'
GROUP BY d.domain
ORDER BY d.domain;



0 comments on commit 39f06d5

Please sign in to comment.