feat(docker): introduce Java 26 dev/build container and build-secret challenge 71 - #2650
Conversation
|
Hi @commjoen, I've updated the devcontainer to Java 26 (eclipse-temurin:26-jdk-jammy), added the missing components (forwarded ports, docker-in-docker, Maven postCreate setup), and fixed the UTF-8 BOM encoding issue. Thanks! |
|
just to make sure: how can we now use the devcontainer to build the app completely :) ? |
|
Hi @commjoen, Here is how you can use the Dev Container to build and run the entire application completely: 1. Open in Dev Container
(The container will automatically set up Java, Docker-in-Docker, forwarded ports, and run the Maven setup). 2. Build the Complete AppInside the integrated Dev Container terminal, run: ./mvnw clean install |
Can you add this to the contributing.md please? |
|
#2646 (comment) shows an example of the components needed for a challenge :) |
|
Hi @commjoen, Thanks for the feedback! I have updated the PR with all the requested changes: Dev Container in CONTRIBUTING.md: Added instructions on how to use the Dev Container (in VS Code & GitHub Codespaces) and run ./mvnw clean install in the contributor environment guide. |
|
can you instead make the challenge about the dev ocntainer itself and add the missing dependencies? maven-wrapper, nodejs26, etc.? best would be if we don't need any local dependencies anymore i thnk. |
…lete devcontainer dependencies
5d1e387 to
b1d7a93
Compare
|
Hi @commjoen, Thanks for the feedback! I have updated the PR with all the requested changes:
Could you please approve the workflow runs and review when you have a moment? Thanks! |
|
2 more things:
|
Co-authored-by: Jeroen Willemsen <jeroenwillemsen2001@gmail.com>
|
Hi @commjoen, |
…name resource files
|
It starts to look pretty complete! If the checks pass, I will start looking into the code once more and do some testing probably next week. |
|
Hi @commjoen, All 15 core test and security checks (Java tests, Minikube/Vault, Cypress, Podman, SpotBugs, CodeQL, ZAP, Pre-commit) have passed! The only 2 failing checks are the preview deployment jobs:
|
|
Hi @sandeshkuldharme1 ! I just get the following error when trying to use a buildcontainer: |
|
I found a solution, will update the repo as you can tell :D |
|
now the error is: |
|
I now finally have the devcontainer working witha more recent version of ubuntu as a base-image. now it looks a lot more workable. |
|
I can implement https://chatgpt.com/share/6aa5e039-d650-83ed-8d0c-63ff66100be7 after this being merged :) |
commjoen
left a comment
There was a problem hiding this comment.
thank you for your PR, will merge it now :)
This PR introduces a standardized JDK 22 development/build container bundling
wrongsecrets-binaries, and adds a new challenge demonstrating secret leakage in build container layers and intermediate stages.Motivation
wrongsecrets-binaries, preventing local JDK version mismatches across contributor machines.ARGor intermediate build layers in multi-stage Docker builds.Proposed Changes
.devcontainer/devcontainer.jsonconfigured with JDK 22 and docker-in-docker.ChallengeBuildContainer.javaunder Docker challenges.ChallengeBuildContainerTest.java.challenge_build_container.htmlwith remediation guidance.Testing Done
./mvnw clean testChecklist