Skip to content

Commit

Permalink
fix(kubernetes): avoid privilege escalation in Kubernetes jobs (#476)
Browse files Browse the repository at this point in the history
Configure the security context of Kubernetes jobs to disallow privilege
escalation.
  • Loading branch information
wirespecter authored and mdonadoni committed Nov 22, 2024
1 parent 1b5aa98 commit 389f0ea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion reana_job_controller/kubernetes_job_manager.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of REANA.
# Copyright (C) 2019, 2020, 2021, 2022, 2023 CERN.
# Copyright (C) 2019, 2020, 2021, 2022, 2023, 2024 CERN.
#
# REANA is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
Expand Down Expand Up @@ -167,6 +167,7 @@ def execute(self):
"name": "job",
"env": [],
"volumeMounts": [],
"securityContext": {"allowPrivilegeEscalation": False},
}
],
"initContainers": [],
Expand Down

0 comments on commit 389f0ea

Please sign in to comment.