-
Notifications
You must be signed in to change notification settings - Fork 52
WIP: CORENET-7047: CNCC K8s rebase to 1.36.1 #223
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| build_root_image: | ||
| name: release | ||
| namespace: openshift | ||
| tag: rhel-9-release-golang-1.25-openshift-4.22 | ||
| tag: rhel-9-release-golang-1.26-openshift-5.0 |
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,10 +1,10 @@ | ||||||||||||||
| FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.25-openshift-4.22 AS builder | ||||||||||||||
| FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.26-openshift-5.0 AS builder | ||||||||||||||
|
|
||||||||||||||
| WORKDIR /go/src/github.com/openshift/cloud-network-config-controller | ||||||||||||||
| COPY . . | ||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Copy specific files instead of entire build context. Line 4 copies the entire build context ( 🔒 Proposed fix-COPY . .
+COPY go.mod go.sum ./
+COPY vendor/ vendor/
+COPY pkg/ pkg/
+COPY cmd/ cmd/
+COPY Makefile ./📝 Committable suggestion
Suggested change
🤖 Prompt for AI AgentsSource: Coding guidelines |
||||||||||||||
| RUN make build | ||||||||||||||
|
|
||||||||||||||
| FROM registry.ci.openshift.org/ocp/4.22:base-rhel9 | ||||||||||||||
| FROM registry.ci.openshift.org/ocp/5.0:base-rhel9 | ||||||||||||||
|
|
||||||||||||||
| COPY --from=builder /go/src/github.com/openshift/cloud-network-config-controller/_output/bin/cloud-network-config-controller /usr/bin/ | ||||||||||||||
|
|
||||||||||||||
|
|
||||||||||||||
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.
🧩 Analysis chain
🏁 Script executed:
Repository: openshift/cloud-network-config-controller
Length of output: 67
Harden Dockerfile per container security guidelines (non-root + least-context + HEALTHCHECK) and confirm base image registry policy.
./Dockerfile(lines 1-15): MissingUSERdirective; container runs as root (DS-0002)../Dockerfile(line 4):COPY . .copies the full build context; copy only required files/dirs../Dockerfile(lines 1, 7): Base images useregistry.ci.openshift.org(ocp/builder...andocp/5.0:base-rhel9); no repo policy/docs exception forregistry.ci.openshift.orgvscatalog.redhat.comwas located—confirm this is allowed or switch tocatalog.redhat.com../Dockerfile(lines 1-15): MissingHEALTHCHECK.🧰 Tools
🪛 Trivy (0.69.3)
[error] 1-1: Image user should not be 'root'
Specify at least 1 USER command in Dockerfile with non-root user as argument
Rule: DS-0002
Learn more
(IaC/Dockerfile)
[error] 1-1: Image user should not be 'root'
Specify at least 1 USER command in Dockerfile with non-root user as argument
Rule: DS-0002
Learn more
(IaC/Dockerfile)
[error] 1-1: Image user should not be 'root'
Specify at least 1 USER command in Dockerfile with non-root user as argument
Rule: DS-0002
Learn more
(IaC/Dockerfile)
🤖 Prompt for AI Agents
Source: Coding guidelines