Skip to content

Commit

Permalink
chore(Jenkinsfile): Remove the VULNERABLE_CODE_API_KEY parameter
Browse files Browse the repository at this point in the history
Firstly, VulnerableCode can be used without an API key now [1], and
secondly the code to configure the API key was outdated anyway as it was
not adjusted to [2]. Simply remove the code to address this.

If the need to specify an API key should reoccur, the feature introduced
in 738790c should be used to set it via an environment variable that is
being used in a `config.yml` template.

[1]: aboutcode-org/vulnerablecode#1352
[2]: #7690

Signed-off-by: Sebastian Schuberth <[email protected]>
  • Loading branch information
sschuberth committed Nov 30, 2023
1 parent 4bf0241 commit a464678
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions integrations/jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,6 @@ pipeline {
defaultValue: true
)

string(
name: 'VULNERABLE_CODE_API_KEY',
description: 'Optional API key to enable VulnerableCode (see https://public.vulnerablecode.io/account/request_api_key/).',
defaultValue: ''
)

/*
* ORT evaluator tool parameters.
*/
Expand Down Expand Up @@ -618,12 +612,7 @@ pipeline {
ORT_OPTIONS="$ORT_OPTIONS --stacktrace"
fi
ADVISOR_OPTIONS="-a OSV"
if [ -n "$VULNERABLE_CODE_API_KEY" ]; then
ORT_OPTIONS="$ORT_OPTIONS -P ort.advisor.vulnerableCode.apiKey=$VULNERABLE_CODE_API_KEY"
ADVISOR_OPTIONS="$ADVISOR_OPTIONS,VulnerableCode"
fi
ADVISOR_OPTIONS="-a OSV,VulnerableCode"
/opt/ort/bin/ort $ORT_OPTIONS advise $ADVISOR_OPTIONS -i out/results/current-result.yml -o out/results/advisor
'''.stripIndent().trim()
Expand Down

0 comments on commit a464678

Please sign in to comment.