Skip to content

Conversation

@CharlesDuboisSAP
Copy link
Contributor

@CharlesDuboisSAP CharlesDuboisSAP commented Oct 2, 2024

Context

AI/ai-sdk-java-backlog#65.

This is the equivalent of blackduck. It scans our dependencies and compares it to the National Vulnerability Database.
This is done on every commit.

Feature scope:

<suppressions xmlns="https://jeremylong.github.io/DependencyCheck/dependency-suppression.1.3.xsd">
<suppress>
<notes><![CDATA[This is a JS dependency.]]></notes>
<cve>CVE-2021-41251</cve>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Major/Question)

How exactly is the JS dependency recognized?
If we are affected by this false-positive(?) then all other users of "owasp" will have a similar experience, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It linked me to a dependency called cloud-sdk-js@core 1.0. I guessed it saw our openAI module use com.sap.ai.sdk:core:0.1.0-SNAPSHOT and thought it was good enough of a match...
I don't think this plugin is great, just better than blackduck hopefully.

@jjtang1985
Copy link
Contributor

This is the equivalent of blackduck

@CharlesDuboisSAP , is this specifically for the vulnerability?
I guess blackduck does more than vulnerability, e.g., license check.

- name: "Build SDK"
run: |
MVN_ARGS="${{ env.MVN_MULTI_THREADED_ARGS }} clean install -DskipTests -DskipFormatting"
mvn $MVN_ARGS
Copy link
Contributor

@newtork newtork Oct 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Explanation)

mvn install is necessary, otherwise the dependency-check will fail on missing core:0.1.0-SNAPSHOT.

env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
#TODO: Blackduck and security rating steps
Copy link
Contributor

@newtork newtork Oct 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Explanation)

With this change, we're not running dependency checks on PR commits.
Instead it's happening on main commits (merges).

mvn $MVN_ARGS
- name: "OWASP Dependency check"
run: mvn org.owasp:dependency-check-maven:10.0.4:check -DnvdApiKey=$NVD_API_KEY -DfailBuildOnCVSS=7 -DskipProvidedScope=true -DsuppressionFile=.pipeline/dependency-check-suppression.xml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Comment)

Be aware, having static plugin version in yaml (instead of pom) increases maintenance.

@CharlesDuboisSAP CharlesDuboisSAP merged commit 11ecf97 into main Oct 7, 2024
@CharlesDuboisSAP CharlesDuboisSAP deleted the owasp branch October 7, 2024 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants