8000 Adding integration tests for trivy security scanner by SebieF · Pull Request #650 · secureCodeBox/secureCodeBox · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@SebieF
Copy link
Contributor
@SebieF SebieF commented Sep 19, 2021

Description

Upon merging, this PR will add integration tests for the trivy security scanner.
This will close #623.

Contrary to what has been discussed there, downloading the database for trivy during the integration tests does not seem to be an issue. The tests took only about 35s.
Successful download of the database has also been stated in the trivy logs.

If the tests prove to be unstable, however, it could be considered to add an offline version of the trivy database as described here. This would pose the need for a scanner dockerfile created by us instead of the official image, where a version of the database would be included. Integration tests could be run with the "--skip-update" flag afterwards.

Checklist

  • Test your changes as thoroughly as possible before you commit them. Preferably, automate your test by unit/integration tests.
  • Make sure npm test runs for the whole project.
  • Make codeclimate checks happy

Testing against a recent version of the juiceshop from dockerhub

Signed-off-by: Sebastian <sebastian.franz@iteratec.com>
Signed-off-by: Sebastian <sebastian.franz@iteratec.com>
Signed-off-by: Sebastian <sebastian.franz@iteratec.com>
@SebieF SebieF added testing Improvements or additions regarding the test setup ci Changes to the continuous integration setup labels Sep 19, 2021
@SebieF SebieF self-assigned this Sep 19, 2021
@nigthknight nigthknight self-requested a review September 20, 2021 06:23
Copy link
Member
@nigthknight nigthknight left a comment

Choose a reason for hiding this comment

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

I'm not quite sure how volatile this test is because of new discovered vulnerabilities. What do you think @J12934 , @rseedorff ?

@J12934
Copy link
Member
J12934 commented Sep 20, 2021

Yeah good point, might be better to have it be a "at least this amount of findings" check, as its bound to go up in the future.

This should ensure a more stable test result due to the older version

Signed-off-by: Sebastian <sebastian.franz@iteratec.com>
This will not let the tests failed when new vulnerabilities are found

Signed-off-by: Sebastian <sebastian.franz@iteratec.com>
@nigthknight nigthknight merged commit fda8e47 into main Sep 21, 2021
@nigthknight nigthknight deleted the tests/trivy-integration branch September 21, 2021 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Changes to the continuous integration setup testing Improvements or additions regarding the test setup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🧪 Add Integration Tests for Trivy

4 participants

0