-
Notifications
You must be signed in to change notification settings - Fork 238
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
tar ball scanning broken #120
Comments
I can access the image if I copy it into The image is build with |
hi @timdittler - thanks for the observation. I suspect something must have changed within the GitHub Action runtime that the Would you mind documenting this (your workaround that is)? Do you have any other ideas how we could solve it better? Open to thoughts. |
No idea, sorry. But usually having an open issue including a workaround is the best way of documenting such limitations for me :) |
Seems to me that a good starting point would be to add a test to |
I'm seeing the same issue. In my case, moving the tarball to It definitely seems to be related to some nefarious runtime change by github. Everything works as expected running locally with https://github.com/nektos/act |
hi @toddbaert and @timdittler - just spent some time to investigate this. Looks like the following should help you: name: build
on:
push:
branches:
- master
pull_request:
jobs:
build:
name: Build
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Generate tarball from image
run: |
docker pull <your-docker-image>
docker save -o vuln-image.tar <your-docker-image>
- name: Run Trivy vulnerability scanner in tarball mode
uses: aquasecurity/trivy-action@master
with:
input: /github/workspace/vuln-image.tar
severity: 'CRITICAL,HIGH'
So using Let me know if it helps. |
Yes, this works. As I wrote above, tar scanning in github workspace works
for me fine. For whatever reason, we were building it in /tmp and there I
couldn't scan. This is not a big problem, just something you have to know.
…On Fri, Jun 24, 2022 at 1:55 AM simar7 ***@***.***> wrote:
hi @toddbaert <https://github.com/toddbaert> and @timdittler
<https://github.com/timdittler> - just spent some time to investigate
this. Looks like the following should help you:
name: buildon:
push:
branches:
- master
pull_request:jobs:
build:
name: Build
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: ***@***.***
- name: Generate tarball from image
run: | docker pull <your-docker-image> docker save -o vuln-image.tar <your-docker-image> - name: Run Trivy vulnerability scanner in tarball mode
uses: ***@***.***
with:
input: /github/workspace/vuln-image.tar
severity: 'CRITICAL,HIGH'
Looks like the volume is mounted, just at /github/workspace. Let me know
if it helps.
—
Reply to this email directly, view it on GitHub
<#120 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AWMTXKEWZ2XZPMGUSIG7STDVQT2QDANCNFSM5YJIRYVA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@simar7 I will give this a shot later today and report back. Thanks! |
@simar7 confirmed that new advice fixed my issue. Thanks for updating the doc |
Thanks for providing trivy and the action. I'm trying to supply
input
to scan an image directly after building it. The action fails like this:Looking at #23 it seemed to work on day.
Trivy is actually trying to scan inside it's own container.
I can replicate the error locally. I have to mount the dir of the tarball to make it work
The text was updated successfully, but these errors were encountered: