static boolean isTrusted ( String artifactOriginUrl , TargetRepository targetRepository ) { if ( targetRepository . temporaryRepo ) { return false ; } if ( artifactOriginUrl == null || artifactOriginUrl . isEmpty ( ) ) { return false ; } for ( String trustedRepoUrl : TRUSTED_REPOSITORY_URLS ) { if ( artifactOriginUrl . startsWith ( trustedRepoUrl ) ) { return true ; } } return false ; }
Check if a given artifact originates from a trusted source . Compares the given artifactOriginUrl to the list of trusted repositories .