Search in sources :

Example 1 with VerificationFailure

use of org.gradle.api.internal.artifacts.verification.verifier.VerificationFailure in project gradle by gradle.

the class HtmlDependencyVerificationReportRenderer method formatError.

private void formatError(RepositoryAwareVerificationFailure failure) {
    VerificationFailure vf = failure.getFailure();
    reportSignatureProblems(vf);
    reportChecksumProblems(vf);
    reportOtherProblems(vf);
}
Also used : ChecksumVerificationFailure(org.gradle.api.internal.artifacts.verification.verifier.ChecksumVerificationFailure) SignatureVerificationFailure(org.gradle.api.internal.artifacts.verification.verifier.SignatureVerificationFailure) VerificationFailure(org.gradle.api.internal.artifacts.verification.verifier.VerificationFailure) RepositoryAwareVerificationFailure(org.gradle.api.internal.artifacts.ivyservice.ivyresolve.verification.RepositoryAwareVerificationFailure)

Example 2 with VerificationFailure

use of org.gradle.api.internal.artifacts.verification.verifier.VerificationFailure 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);
}
Also used : SignatureVerificationFailure(org.gradle.api.internal.artifacts.verification.verifier.SignatureVerificationFailure) MissingChecksums(org.gradle.api.internal.artifacts.verification.verifier.MissingChecksums) SignatureVerificationFailure(org.gradle.api.internal.artifacts.verification.verifier.SignatureVerificationFailure) VerificationFailure(org.gradle.api.internal.artifacts.verification.verifier.VerificationFailure) RepositoryAwareVerificationFailure(org.gradle.api.internal.artifacts.ivyservice.ivyresolve.verification.RepositoryAwareVerificationFailure)

Aggregations

RepositoryAwareVerificationFailure (org.gradle.api.internal.artifacts.ivyservice.ivyresolve.verification.RepositoryAwareVerificationFailure)2 SignatureVerificationFailure (org.gradle.api.internal.artifacts.verification.verifier.SignatureVerificationFailure)2 VerificationFailure (org.gradle.api.internal.artifacts.verification.verifier.VerificationFailure)2 ChecksumVerificationFailure (org.gradle.api.internal.artifacts.verification.verifier.ChecksumVerificationFailure)1 MissingChecksums (org.gradle.api.internal.artifacts.verification.verifier.MissingChecksums)1