-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Create Docker registry auth detector #2677
Open
rgmz
wants to merge
1
commit into
trufflesecurity:main
Choose a base branch
from
rgmz:feat/docker-detector
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rgmz
force-pushed
the
feat/docker-detector
branch
7 times, most recently
from
April 8, 2024 18:09
2d4d336
to
3d0aa96
Compare
rgmz
force-pushed
the
feat/docker-detector
branch
from
April 18, 2024 04:23
3d0aa96
to
37e6685
Compare
2 tasks
rgmz
force-pushed
the
feat/docker-detector
branch
2 times, most recently
from
May 21, 2024 12:06
2cb905e
to
87c6a62
Compare
rgmz
changed the title
Create Docker auth credentials detector
Create Docker registry auth detector
May 21, 2024
rgmz
force-pushed
the
feat/docker-detector
branch
10 times, most recently
from
May 22, 2024 02:37
1633ac6
to
a8c6c9f
Compare
rgmz
force-pushed
the
feat/docker-detector
branch
2 times, most recently
from
June 5, 2024 01:09
de80769
to
4fef2e4
Compare
rgmz
force-pushed
the
feat/docker-detector
branch
from
June 17, 2024 01:02
4fef2e4
to
2e8f9e9
Compare
rgmz
force-pushed
the
feat/docker-detector
branch
3 times, most recently
from
June 21, 2024 02:55
9d1a983
to
efa0a0f
Compare
rgmz
force-pushed
the
feat/docker-detector
branch
2 times, most recently
from
July 1, 2024 18:39
c107eef
to
16d0e35
Compare
rgmz
force-pushed
the
feat/docker-detector
branch
from
September 13, 2024 11:54
16d0e35
to
eb03c7f
Compare
rgmz
force-pushed
the
feat/docker-detector
branch
from
November 3, 2024 15:43
eb03c7f
to
75e0ee4
Compare
rgmz
force-pushed
the
feat/docker-detector
branch
2 times, most recently
from
November 11, 2024 19:23
e9ee964
to
a79828f
Compare
rgmz
force-pushed
the
feat/docker-detector
branch
from
November 20, 2024 03:16
a79828f
to
d7abdd8
Compare
rgmz
force-pushed
the
feat/docker-detector
branch
8 times, most recently
from
November 27, 2024 00:22
17b9929
to
2a2570a
Compare
rgmz
force-pushed
the
feat/docker-detector
branch
2 times, most recently
from
December 2, 2024 16:55
befdef0
to
5e3c671
Compare
rgmz
force-pushed
the
feat/docker-detector
branch
from
December 15, 2024 15:30
5e3c671
to
91ad2d8
Compare
rgmz
force-pushed
the
feat/docker-detector
branch
from
December 21, 2024 16:00
91ad2d8
to
874f306
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
This implements a detector to find Docker registry credentials, inspired by this suggestion from @bgoareguer.
The current code works, but is a bit messy and requires more feedback + testing.
Questions/TODO
Should this also match and decode Kubernetes.dockerconfigjson
results, or rely on the base64 decoder?json.Unmarshal
) that are worth noting, as it could be indicative of a bug.gcr.io
credential, as that registry uses base64-encoded GCP service principals as the password. It's possible that this doesn't work with the current logic (e.g., encoded newlines.)Handle username for GCR credentials? (It's a static_json_key
, the real username is in the auth)Are there any other potential formats this data gets stored in? (e.g., YAML)\n
as well as literal?docker.io
which is a special case (https://stackoverflow.com/a/68654659)Future work?
json.NewDecoder
instead ofjson.Unmarshal
(https://github.com/Azure/ARO-RP/blob/25b8569698b61abd7af6cdefe680fdc1306b001f/pkg/operator/admission/validation/pullsecret/request.json#L1)base64-encoded auth does not match source
is a legitimate issue (probably not, seems to be caused by base64 decoder)Checklist:
make test-community
)?make lint
this requires golangci-lint)?