Use unprivileged user by default (#1862)

* Use unprivileged user by default

* fix order

Co-authored-by: Admiral Awkbar <admiralawkbar@github.com>
This commit is contained in:
Sander Maijers 2021-08-16 16:19:30 +02:00 committed by GitHub
parent e7b7340a88
commit 7813f41047
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 0 deletions

View file

@ -458,6 +458,13 @@ COPY TEMPLATES /action/lib/.automation
################################################ ################################################
RUN ACTIONS_RUNNER_DEBUG=true WRITE_LINTER_VERSIONS_FILE=true /action/lib/linter.sh RUN ACTIONS_RUNNER_DEBUG=true WRITE_LINTER_VERSIONS_FILE=true /action/lib/linter.sh
############
# Set user #
############
RUN addgroup -g 1000 superlinter && \
adduser -u 1000 -D -G superlinter superlinter
USER superlinter
###################### ######################
# Set the entrypoint # # Set the entrypoint #
###################### ######################

View file

@ -393,6 +393,13 @@ COPY TEMPLATES /action/lib/.automation
################################################ ################################################
RUN ACTIONS_RUNNER_DEBUG=true WRITE_LINTER_VERSIONS_FILE=true IMAGE=slim /action/lib/linter.sh RUN ACTIONS_RUNNER_DEBUG=true WRITE_LINTER_VERSIONS_FILE=true IMAGE=slim /action/lib/linter.sh
############
# Set user #
############
RUN addgroup -g 1000 superlinter && \
adduser -u 1000 -D -G superlinter superlinter
USER superlinter
###################### ######################
# Set the entrypoint # # Set the entrypoint #
###################### ######################