Skip to content

Commit c9d5285

Browse files
committed
Run gitleaks As User In Container
See: <#286> Signed-off-by: Yannik Fuhrmeister <yannik.fuhrmeister@iteratec.com>
1 parent 0dd3616 commit c9d5285

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

‎scanners/gitleaks/scanner/Dockerfile‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@
44

55
ARG scannerVersion=latest
66
FROM zricethezav/gitleaks:${scannerVersion}
7+
RUN adduser -S -H -u 1001 gitleaks
78
COPY wrapper.sh /wrapper.sh
8-
ENTRYPOINT [ "sh", "/wrapper.sh" ]
9+
RUN chmod o+x ./wrapper.sh
10+
USER gitleaks
11+
ENTRYPOINT ["./wrapper.sh" ]

‎scanners/gitleaks/scanner/wrapper.sh‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/bin/sh
12
# SPDX-FileCopyrightText: 2020 iteratec GmbH
23
#
34
# SPDX-License-Identifier: Apache-2.0

0 commit comments

Comments
 (0)