Skip to content

Add OWASP Dependency Checker to the GH CI workflows - #13972

Merged
eolivelli merged 2 commits into
apache:masterfrom
dlg99:owasp-gh-ci
Feb 1, 2022
Merged

Add OWASP Dependency Checker to the GH CI workflows#13972
eolivelli merged 2 commits into
apache:masterfrom
dlg99:owasp-gh-ci

Conversation

@dlg99

@dlg99 dlg99 commented Jan 27, 2022

Copy link
Copy Markdown
Contributor

Motivation

Detect CVEs early and make them visible to the committers

Modifications

Added GH workflow that will fail if new CVE with level > 7 detected. The plan is to not treat it as blocking merge.
Currently some projects that will not pass the check and aren't included into the suppressions for variety of reasons are excluded.

Verifying this change

  • Make sure that the change passes the CI checks.

This change is a trivial rework / code cleanup without any test coverage.

Does this pull request potentially affect one of the following parts:

If yes was chosen, please highlight the changes

  • Dependencies (does it add or upgrade a dependency): (yes / no)
  • The public API: (yes / no)
  • The schema: (yes / no / don't know)
  • The default values of configurations: (yes / no)
  • The wire protocol: (yes / no)
  • The rest endpoints: (yes / no)
  • The admin cli options: (yes / no)
  • Anything that affects deployment: (yes / no / don't know)

Documentation

Check the box below or label this PR directly (if you have committer privilege).

Need to update docs?

  • doc-required

    (If you need help on updating docs, create a doc issue)

  • no-need-doc

    (Please explain why)

  • doc

    (If this PR contains doc changes)

@dlg99
dlg99 marked this pull request as draft January 27, 2022 00:43
@github-actions github-actions Bot added the doc-not-needed Your PR changes do not impact docs label Jan 27, 2022
@dlg99

dlg99 commented Jan 29, 2022

Copy link
Copy Markdown
Contributor Author

/pulsarbot run-failure-checks

1 similar comment
@dlg99

dlg99 commented Jan 29, 2022

Copy link
Copy Markdown
Contributor Author

/pulsarbot run-failure-checks

@lhotari lhotari left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@eolivelli eolivelli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great stuff.
But I left one comment.


name: CI - Misc - OWASP Dependency Check
on:
pull_request:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why running this check on every pull request?
New dependencies are added very seldom.
If a dependency is flagged there will be much noise.
People usually add a new dependency using the latest available version.

I suggest to run this only periodically, like every day and manually on every active release branch

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@eolivelli this is only run when one of the pom.xml files is modified.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

in addition there's the existing job to run periodically

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@eolivelli as Lari said, it runs only on changes in pom files, see:

      - name: Detect changed pom files
        id: changes
        uses: apache/pulsar-test-infra/paths-filter@master
        with:
          filters: |
            poms:
              - 'pom.xml'
              - '**/pom.xml'

@dlg99
dlg99 marked this pull request as ready for review January 31, 2022 20:14

@eolivelli eolivelli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for your clarifications

Lgtm

@nicoloboschi nicoloboschi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1, great work

Comment thread .github/workflows/ci-owasp-dep-check.yaml
@hpvd

hpvd commented Feb 2, 2022

Copy link
Copy Markdown

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/build area/security doc-not-needed Your PR changes do not impact docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants