in beam-collector/src/main/java/com/google/collector/clustering/ExtractClusterKey.java [60:69]
private String buildClusterKeyForCsp(CspReport cspReport) {
// inline and eval are grouped by script sample, otherwise group by blocked URI
if (cspReport.getBlockedUri().equals("inline") || cspReport.getBlockedUri().equals("eval")) {
String scriptSample = cspReport.getScriptSample();
return scriptSample.isBlank() || scriptSample.isEmpty() ? cspReport.getDocumentUri() : scriptSample;
}
// if there is not blocked-uri,
return cspReport.getBlockedUri();
}