Skip to content

Commit 60d09aa

Browse files
tabbysableGacko
authored andcommitted
Controller: Deactivate configuration test during validation.
1 parent 162c405 commit 60d09aa

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

internal/ingress/controller/controller.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,11 +421,15 @@ func (n *NGINXController) CheckIngress(ing *networking.Ingress) error {
421421
return err
422422
}
423423

424+
/* Deactivated to mitigate CVE-2025-1974
425+
// TODO: Implement sandboxing so this test can be done safely
424426
err = n.testTemplate(content)
425427
if err != nil {
426428
n.metricCollector.IncCheckErrorCount(ing.ObjectMeta.Namespace, ing.Name)
427429
return err
428430
}
431+
*/
432+
429433
n.metricCollector.IncCheckCount(ing.ObjectMeta.Namespace, ing.Name)
430434
endCheck := time.Now().UnixNano() / 1000000
431435
n.metricCollector.SetAdmissionMetrics(

internal/ingress/controller/controller_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,8 @@ func TestCheckIngress(t *testing.T) {
250250
}
251251
})
252252

253+
/* Deactivated to mitigate CVE-2025-1974
254+
// TODO: Implement sandboxing so this test can be done safely
253255
t.Run("When nginx test returns an error", func(t *testing.T) {
254256
nginx.command = testNginxTestCommand{
255257
t: t,
@@ -261,6 +263,7 @@ func TestCheckIngress(t *testing.T) {
261263
t.Errorf("with a new ingress with an error, an error should be returned")
262264
}
263265
})
266+
*/
264267

265268
t.Run("When the default annotation prefix is used despite an override", func(t *testing.T) {
266269
defer func() {

0 commit comments

Comments
 (0)