-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from guardrailsio/feat/add-dockerfile
Create Dockerfile
- Loading branch information
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM composer:latest | ||
|
||
# add unpriviledged user and | ||
# create directory for the code to be scanned | ||
RUN addgroup -S tool && adduser -S -G tool tool && \ | ||
mkdir -p /opt/mount/ | ||
|
||
# Install phpcs-security-audit | ||
RUN composer global require pheromone/phpcs-security-audit | ||
WORKDIR /tmp | ||
RUN sh ./vendor/pheromone/phpcs-security-audit/symlink.sh | ||
|
||
# change user | ||
USER tool | ||
|
||
ENTRYPOINT [ "/tmp/vendor/bin/phpcs", "--standard=/tmp/vendor/pheromone/phpcs-security-audit/example_base_ruleset.xml", "/opt/mount/"] |