-
Notifications
You must be signed in to change notification settings - Fork 4
chore: do not fail serve on container pulls #11
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
base: main
Are you sure you want to change the base?
chore: do not fail serve on container pulls #11
Conversation
evilsocket
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i do not understand the point of this ... the error was not ignored, but passed on ContainerSource.resolve which then passed it to higher order functions that handle it properly -> https://github.com/search?q=repo%3Adreadnode%2Frobopages-cli%20resolve&type=code
please accept my apologies, i missed this and a good spot and mistake on my behalf: [2025-01-31T19:19:38Z INFO ] pre building container for function squealer_scan_everything_git_repo ...
[2025-01-31T19:19:38Z INFO ] Checking for docker image: squealer:latest
[2025-01-31T19:19:38Z INFO ] Image squealer:latest not found locally, attempting pull
[2025-01-31T19:19:38Z INFO ] Error response from daemon: pull access denied for squealer, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
[2025-01-31T19:19:38Z WARN ] Failed to pull squealer:latest: command failed with status: ExitStatus(unix_wait_status(256))
[2025-01-31T19:19:38Z INFO ] pre building container for function squealer_scan_git_repo ...
[2025-01-31T19:19:38Z INFO ] Checking for docker image: squealer:latest
[2025-01-31T19:19:38Z INFO ] Image squealer:latest not found locally, attempting pull
[2025-01-31T19:19:39Z INFO ] Error response from daemon: pull access denied for squealer, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
[2025-01-31T19:19:39Z WARN ] Failed to pull squealer:latest: command failed with status: ExitStatus(unix_wait_i'll update the pr to reflect full intention for the entire flow, sorry about that |
|
@GangGreenTemperTatum no apologies needed! can you help me understand the objective? From what I can see, the error is handled and logged in the lines like:
Does this specific error require additional handling logic? |
you are the best @evilsocket ! 🤍 yes i believe so, on ➜ robopages-cli git:(main) docker pull squealer
Using default tag: latest
Error response from daemon: pull access denied for squealer, repository does not exist or may require 'docker login': denied: requested access to the resource is deniedfrom my last using robopages, i had purged my docker image list and therefore removed it from the local cache, so when i try to ➜ robopages-cli git:(main) robopages serve
[2025-02-02T10:43:16Z INFO ] pre building container for function squealer_scan_everything_git_repo ...
[2025-02-02T10:43:16Z INFO ] Error response from daemon: pull access denied for squealer, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
[2025-02-02T10:43:16Z ERROR] command failed with status: ExitStatus(unix_wait_status(256))hope i made sense of that :) thank you for all your awesome help! |
|
Apologies again for my missed call there! of course happy to take your lead here :) i'm unsure if this is the best approach (tried to be as minimal and as descriptive as possible here) but i submitted a new commit relying on new changes:
the flaw in my ability to test this is that i don't have the container on my disk to verify the ➜ robopages-cli git:(ads/eng-929-chore-dont-exist-on-failed-pulled-containers) ✗ robopages serve
[2025-02-02T18:34:49Z INFO ] pre building container for function squealer_scan_everything_git_repo ...
[2025-02-02T18:34:50Z INFO ] Error response from daemon: pull access denied for squealer, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
[2025-02-02T18:34:50Z ERROR] Failed to resolve container for function squealer_scan_everything_git_repo: Failed to pull Docker image squealer:latest: command failed with status: ExitStatus(unix_wait_status(256))
[2025-02-02T18:34:50Z INFO ] pre building container for function squealer_scan_git_repo ...
[2025-02-02T18:34:50Z INFO ] Error response from daemon: pull access denied for squealer, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
[2025-02-02T18:34:50Z ERROR] Failed to resolve container for function squealer_scan_git_repo: Failed to pull Docker image squealer:latest: command failed with status: ExitStatus(unix_wait_status(256))
[2025-02-02T18:34:50Z INFO ] pre building container for function trufflehog_scan ...
[2025-02-02T18:34:50Z INFO ] Using default tag: latest
[2025-02-02T18:34:51Z INFO ] latest: Pulling from trufflesecurity/trufflehog
[2025-02-02T18:34:51Z INFO ] 52f827f72350: Already exists
[2025-02-02T18:34:51Z INFO ] ae21e8ca9bd8: Pulling fs layer
...
[2025-02-02T18:36:48Z INFO ] pre building container for function http_post ...
[2025-02-02T18:36:48Z INFO ] serving 24 pages on http://127.0.0.1:8000 with 12 max running tasks
➜ robopages-cli git:(ads/eng-929-chore-dont-exist-on-failed-pulled-containers) ✗ robopages run -F zsc
an_default_scan
>> enter value for argument 'target': 127.0.0.1
[2025-01-31T19:29:26Z WARN ] executing: /usr/local/bin/docker run --rm -v/Users/ads/.robopages/robopages-main/cybersecurity/offensive/information-gathering:/data --net=host zscan_local -target 127.0.0.1
>> enter 'y' to proceed or any other key to cancel: y
{
"nodes": [
{
"ip": "127.0.0.1",
"ports": [
{
"port": 6443,
"protocol": "http",
...
➜ robopages-cli git:(ads/eng-929-chore-dont-exist-on-failed-pulled-containers) ✗ robopages run -F squealer_scan_git_repo
>> enter value for argument 'repository': https://github.com/trufflesecurity/trufflehog
[2025-02-02T18:41:39Z INFO ] Error response from daemon: pull access denied for squealer, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
[2025-02-02T18:41:39Z ERROR] Failed to pull Docker image squealer:latest: command failed with status: ExitStatus(unix_wait_status(256)) |
|
great call from evilsocket here that it's better for that type of error to kill the entire execution as it does |
a suggestion PR as i encountered a corner case which will likely affect anyone who has either changed host machine or cleaned docker image volume (my eample) in the delta from when the prior robopage templates were verified and tested with the latest release which caused the robopages-cli server to fail
serve'ingi noticed a corner-case where it looks like a docker image has been gated/removed or whatever that was previously working:
local testing following commit:
example function execution:
also verified the images are present in the container runtime library
the change proposes we log but do not fail to
serveif a container fails for whatever reason and in most cases beyond our control