Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add image scanning #3614

Merged
merged 3 commits into from
Nov 21, 2023
Merged

Add image scanning #3614

merged 3 commits into from
Nov 21, 2023

Conversation

joeribekker
Copy link
Contributor

@joeribekker joeribekker commented Nov 15, 2023

Closes open-formulieren/security-issues#10

Second attempt to add non-intrusive image scanning.

Copy link

codecov bot commented Nov 15, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b591166) 95.96% compared to head (650caa7) 95.96%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3614   +/-   ##
=======================================
  Coverage   95.96%   95.96%           
=======================================
  Files         683      683           
  Lines       21912    21912           
  Branches     2533     2533           
=======================================
  Hits        21028    21028           
  Misses        611      611           
  Partials      273      273           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@joeribekker joeribekker force-pushed the feature/gh-image-scanning branch 2 times, most recently from 25f284d to c0ec4a1 Compare November 20, 2023 15:03
@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@sergei-maertens sergei-maertens force-pushed the feature/gh-image-scanning branch from c0ec4a1 to 035d201 Compare November 21, 2023 13:03
Copy link
Member

@sergei-maertens sergei-maertens left a comment

Choose a reason for hiding this comment

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

From the log output I'm not yet convinced that it's using the locally downloaded/loaded image 🤔

I see that trivy itself is starting a container and mounting some volumes, so this should be double checked.

@joeribekker
Copy link
Contributor Author

@sergei-maertens maybe we should just do the tarball scan:

    - name: Run Trivy vulnerability scanner in tarball mode
      uses: aquasecurity/trivy-action@master
      with:
        input: /github/workspace/vuln-image.tar
        severity: 'CRITICAL,HIGH'

See: https://github.com/aquasecurity/trivy-action#scanning-a-tarball

@sergei-maertens
Copy link
Member

@sergei-maertens maybe we should just do the tarball scan:

    - name: Run Trivy vulnerability scanner in tarball mode
      uses: aquasecurity/trivy-action@master
      with:
        input: /github/workspace/vuln-image.tar
        severity: 'CRITICAL,HIGH'

See: https://github.com/aquasecurity/trivy-action#scanning-a-tarball

yes, that's the way to go! I'll update the PR

I looked into the CodeQL scanning warning too, it's borking on some python syntax so I'm not sure what the proper way to resolve that is, but it's not urgent.

This should scan the local image rather than downloading it from Docker
Hub.
@sergei-maertens sergei-maertens force-pushed the feature/gh-image-scanning branch from 035d201 to 650caa7 Compare November 21, 2023 14:10
@sergei-maertens sergei-maertens merged commit 19f34cb into master Nov 21, 2023
21 checks passed
@sergei-maertens sergei-maertens deleted the feature/gh-image-scanning branch November 21, 2023 14:25
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.

2 participants