Skip to content

Commit

Permalink
SECURITY-3265
Browse files Browse the repository at this point in the history
  • Loading branch information
arturbosch authored and Kevin-CB committed Oct 19, 2023
1 parent db07bfe commit 372cd40
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ protected Object readResolve() {
public Report scan(final Run<?, ?> run, final FilePath workspace, final Charset sourceCodeEncoding,
final LogHandler logger) throws ParsingException, ParsingCanceledException {

final AxivionDashboard dashboard = new RemoteAxivionDashboard(projectUrl, withValidCredentials(), namedFilter);
final UsernamePasswordCredentials httpClientCredentials = withValidCredentials(run.getParent());
final AxivionDashboard dashboard = new RemoteAxivionDashboard(projectUrl, httpClientCredentials, namedFilter);
final AxivionParser.Config config = new Config(projectUrl, expandBaseDir(run, basedir),
ignoreSuppressedOrJustified);
final AxivionParser parser = new AxivionParser(config);
Expand All @@ -207,11 +208,11 @@ public Report scan(final Run<?, ?> run, final FilePath workspace, final Charset
return report;
}

private UsernamePasswordCredentials withValidCredentials() {
private UsernamePasswordCredentials withValidCredentials(final Item context) {
final List<StandardUsernamePasswordCredentials> all =
CredentialsProvider.lookupCredentials(
StandardUsernamePasswordCredentials.class,
(Item) null,
context,
null,
Collections.emptyList());

Expand Down

0 comments on commit 372cd40

Please sign in to comment.