use of org.gradle.api.internal.artifacts.verification.verifier.SignatureVerificationFailure in project gradle by gradle.
the class HtmlDependencyVerificationReportRenderer method createFileLink.
private String createFileLink(ModuleComponentArtifactIdentifier key, VerificationFailure vf, String repositoryName) {
String fileLink = "<div uk-tooltip=\"title: From repository '" + repositoryName + "'\">";
fileLink += "<a href=\"" + vf.getFilePath().toURI().toASCIIString() + "\">" + key.getFileName() + "</a>";
if (vf instanceof SignatureVerificationFailure) {
File signatureFile = ((SignatureVerificationFailure) vf).getSignatureFile();
if (signatureFile != null) {
fileLink += " <a href=\"" + signatureFile.toURI().toASCIIString() + "\">(.asc)</a>";
}
}
fileLink += "</div>";
return fileLink;
}
use of org.gradle.api.internal.artifacts.verification.verifier.SignatureVerificationFailure in project gradle by gradle.
the class DependencyVerificationReportWriter method explainSingleFailure.
private void explainSingleFailure(DependencyVerificationReportRenderer renderer, ReportState state, RepositoryAwareVerificationFailure wrapper) {
VerificationFailure failure = wrapper.getFailure();
if (failure instanceof MissingChecksums) {
state.hasMissing();
} else {
if (failure instanceof SignatureVerificationFailure) {
state.failedSignatures();
if (((SignatureVerificationFailure) failure).getErrors().values().stream().map(SignatureVerificationFailure.SignatureError::getKind).noneMatch(kind -> kind == SignatureVerificationFailure.FailureKind.PASSED_NOT_TRUSTED)) {
state.maybeCompromised();
} else {
state.hasUntrustedKeys();
}
} else {
state.maybeCompromised();
}
}
renderer.reportFailure(wrapper);
}
Aggregations