Skip to content

Commit

Permalink
Merge pull request #1 from olamy/JENKINS-73506-patch-1
Browse files Browse the repository at this point in the history
reject wrong setup for mbp scan and reject saving data
  • Loading branch information
PereBueno authored Aug 1, 2024
2 parents ddf0e2b + 2f9287f commit 365b702
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/jenkins/plugins/git/AbstractGitSCMSource.java
Original file line number Diff line number Diff line change
Expand Up @@ -1144,6 +1144,11 @@ protected Set<String> retrieveRevisions(@NonNull final TaskListener listener, @C
protected List<Action> retrieveActions(@CheckForNull SCMSourceEvent event, @NonNull TaskListener listener)
throws IOException, InterruptedException {
final GitSCMTelescope telescope = GitSCMTelescope.of(this);
if (!isFIPSCompliantTLS(this.getCredentialsId(), this.getRemote())) {
listener.fatalError(Messages.git_fips_url_notsecured());
LOGGER.log(Level.SEVERE, Messages.git_fips_url_notsecured());
throw new IllegalArgumentException(Messages.git_fips_url_notsecured());
}
if (telescope != null) {
final String remote = getRemote();
final StandardUsernameCredentials credentials = getCredentials();
Expand Down
1 change: 1 addition & 0 deletions src/main/java/jenkins/plugins/git/GitSCMSource.java
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ public GitSCMSource(String remote) {
public void setCredentialsId(@CheckForNull String credentialsId) {
if (!isFIPSCompliantTLS(credentialsId, this.remote)) {
LOGGER.log(Level.SEVERE, Messages.git_fips_url_notsecured());
throw new IllegalArgumentException(Messages.git_fips_url_notsecured());
}
this.credentialsId = credentialsId;
}
Expand Down

0 comments on commit 365b702

Please sign in to comment.