coreos / coreos/coreos-assembler
cosa leaks git access tokens into generated ociarchive
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 393
- Forks
- 193
- Avg merge
- 17h 6m
- Merged PRs (30d)
- 5
Description
Cosa writes the current config source into the ociarchive:
https://github.com/coreos/coreos-assembler/blob/3ad4cf5c33dfc6b53dd07f50058767cc3525a3e6/src/cmd-build#L447
In my case this ends up as:
"org.opencontainers.image.source": "https://gitlab-ci-token:XXXX@gitlab.instance.mine",
since I am building in gitlab CI which uses a short lived access token to check out the image. It would be great if this token could be masked.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/cmd-build around line 447, where cosa writes the current config source into the OCI archive metadata. Reproduce the build with a credentialed GitLab checkout and inspect the generated org.opencontainers.image.source value. Done means the source metadata no longer exposes the access token while still retaining the repository source.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- build-system, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100