java-sdk icon indicating copy to clipboard operation
java-sdk copied to clipboard

Add dependabot and fix High and Medium vulnerabilities

Open artursouza opened this issue 4 years ago • 3 comments

Expected Behavior

Dependabot scan should report zero High or Medium vulnerabilities in SDK's dependencies.

Actual Behavior

No dependabot scan.

Steps to Reproduce the Problem

Run Dependabot scan

artursouza avatar Oct 06 '20 18:10 artursouza

Potential dependabot.yml file:

version: 2
updates:
  - package-ecosystem: "maven"
    directory: "/"
    schedule:
      interval: "daily"
    open-pull-requests-limit: 5
  - package-ecosystem: "maven"
    directory: "/sdk"
    schedule:
      interval: "daily"
    open-pull-requests-limit: 5
  - package-ecosystem: "maven"
    directory: "/sdk-actors"
    schedule:
      interval: "daily"
    open-pull-requests-limit: 5
  - package-ecosystem: "maven"
    directory: "/sdk-autogen"
    schedule:
      interval: "daily"
    open-pull-requests-limit: 5
  - package-ecosystem: "maven"
    directory: "/sdk-springboot"
    schedule:
      interval: "daily"
    open-pull-requests-limit: 5
  - package-ecosystem: "maven"
    directory: "/sdk-tests"
    schedule:
      interval: "daily"
    open-pull-requests-limit: 5

The dependabot yaml changes will be only applied module by module independently. See here.

Need to specify the directory where pom.xml is located for each module.

This will cause build failures if the target-branch is master and if the updates are merged one by one to master branch.

We might possibly use a separate develop branch with no build actions but as a target-branch for dependabot updates, merge all the corresponding updates to versions in all modules, then manually create a PR from develop to master branch once all the security updates for related dependencies in all modules are done. @artursouza I can probably continue to look at this if that is the way we want to move forward.

mukundansundar avatar Oct 11 '20 07:10 mukundansundar

Let's use the branch idea that you proposed (maybe calling it dependabot) and have a triggered workflow on that branch where DaprBot will automatically create a PR if unit tests passes.

artursouza avatar Oct 12 '20 18:10 artursouza

@mukundansundar can we make this P1 and add it to the Java SDK 1.2 milestone?

berndverst avatar Jun 29 '21 19:06 berndverst