Skip to content

Commit ea4120b

Browse files
authored
Merge pull request #30 from guardrailsio/master
Add Dockerfile
2 parents 236edfc + e022bd4 commit ea4120b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM composer:latest
2+
3+
# add unpriviledged user and
4+
# create directory for the code to be scanned
5+
RUN addgroup -S tool && adduser -S -G tool tool && \
6+
mkdir -p /opt/mount/
7+
8+
# Install phpcs-security-audit
9+
RUN composer global require pheromone/phpcs-security-audit
10+
WORKDIR /tmp
11+
RUN sh ./vendor/pheromone/phpcs-security-audit/symlink.sh
12+
13+
# change user
14+
USER tool
15+
16+
ENTRYPOINT [ "/tmp/vendor/bin/phpcs", "--standard=/tmp/vendor/pheromone/phpcs-security-audit/example_base_ruleset.xml", "/opt/mount/"]

0 commit comments

Comments
 (0)