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

unable to initialize a image struct: failed to initialize source: reading manifest tmp in docker.io/library/svc-test: requested access to the resource is denied #7

Open
fpt-phongnx8 opened this issue Jun 13, 2024 · 0 comments

Comments

@fpt-phongnx8
Copy link

Hi team,

I got error today when run github action

Error:

+ FIRST_ARGS=' --exit-level warn --format list'
+ '[' ./dockle-result.txt ]
+ FIRST_ARGS=' --exit-level warn --format list --output ./dockle-result.txt'
+ '[' 1 ]
+ SECOND_ARGS=' --exit-level warn --exit-code 1'
+ RUN_TWICE=
+ '[' ./dockle-result.txt '!='  ]
+ '[' 1 '!=' 0 ]
+ RUN_TWICE=TRUE
+ '[' TRUE ]
+ run_dockle --exit-level warn --format list --output ./dockle-result.txt
+ /usr/bin/dockle --exit-level warn --format list --output ./dockle-result.txt svc-test:tmp
2024-06-13T01:05:26.574Z	FATAL	unable to initialize a image struct: failed to initialize source: reading manifest tmp in docker.io/library/svc-test: requested access to the resource is denied

Github workflow

      - name: Security check by Dockle
        uses: goodwithtech/dockle-action@main
        with:
          image: svc-test:tmp
          output: ${{ inputs.working-directory }}dockle-result.txt
          ignore: ${{ inputs.working-directory }}.dockleignore

Docker version:
Version: 26.1.3

Github Operating System
Ubuntu
22.04.4

Docker images svc-test:tmp builded when run github action (Github Ubuntu machine)

But It's work Ok when I use github image

      - name: Security check by Dockle
        uses: goodwithtech/dockle-action@main
        with:
          image: goodwithtech/test-image:v1
          output: ${{ inputs.working-directory }}dockle-result.txt
          ignore: ${{ inputs.working-directory }}.dockleignore
+ /usr/bin/dockle --exit-level warn --exit-code 1 goodwithtech/test-image:v1
FATAL	- CIS-DI-0009: Use COPY instead of ADD in Dockerfile
	* Use COPY : /bin/sh -c #(nop) ADD file:81c0a803075715d1a6b4f75a29f8a01b21cc170cfc1bff6702317d1be2fe71a3 in /app/credentials.json 
FATAL	- CIS-DI-0010: Do not store credential in environment variables/files
	* Suspicious filename found : app/credentials.json (You can suppress it with "-af credentials.json")
	* Suspicious ENV key found : MYSQL_PASSWD on /bin/sh -c #(nop)  ENV MYSQL_PASSWD=password (You can suppress it with --accept-key)
FATAL	- DKL-DI-0005: Clear apt-get caches
	* Use 'rm -rf /var/lib/apt/lists' after 'apt-get install|update' : /bin/sh -c apt-get update && apt-get install -y git
FATAL	- DKL-LI-0001: Avoid empty password
	* No password user found! username : nopasswd
INFO	- CIS-DI-0008: Confirm safety of setuid/setgid files
	* setuid file: urwxr-xr-x bin/ping
	* setgid file: grwxr-xr-x usr/bin/chage
	* setgid file: grwxr-xr-x usr/bin/wall
	* setgid file: grwxr-xr-x usr/bin/expiry
	* setgid file: grwxr-xr-x usr/bin/ssh-agent
	* setuid file: urwxr-xr-x bin/umount
	* setuid file: urwxr-xr-x usr/bin/chfn
	* setuid file: urwxr-xr-x usr/bin/gpasswd
	* setuid file: urwxr-xr-x usr/bin/passwd
	* setgid file: grwxr-xr-x sbin/unix_chkpwd
	* setuid file: urwxr-xr-x bin/su
	* setuid file: urwxr-xr-x bin/mount
	* setuid file: urwxr-xr-x usr/bin/newgrp
	* setuid file: urwxr-xr-x usr/bin/chsh
	* setuid file: urwxr-xr-x usr/lib/openssh/ssh-keysign
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

No branches or pull requests

1 participant