File tree Expand file tree Collapse file tree 11 files changed +26
-11
lines changed
app/controllers/vulneruby_engine Expand file tree Collapse file tree 11 files changed +26
-11
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,8 @@ def run
1515 @result = {
1616 digest : Vulneruby ::Trigger ::CryptoBadMac . run_digest_md5 ,
1717 random : Vulneruby ::Trigger ::CryptoWeakRandomness . run_rand ,
18- cipher : Vulneruby ::Trigger ::CryptoBadCipher . run_bad_cipher
18+ # Bad Ciphers are deprecated in OpenSSL 3.X
19+ # cipher: Vulneruby::Trigger::CryptoBadCipher.run_bad_cipher
1920 }
2021
2122 render ( 'layouts/vulneruby_engine/insecure_algorithm/run' )
Original file line number Diff line number Diff line change @@ -3,6 +3,12 @@ ARG RUBY_VER=3.0
33FROM ghcr.io/contrast-security-oss/vulneruby_engine/base:${RUBY_VER}
44
55ENV CI_TEST=true
6+
7+ # If ruby is 3.0 then use ffi 1.15.5:
8+ RUN if [ "$RUBY_VER" = "3.0" ]; \
9+ then echo "RUBY_VER is 3.0" && export CONTRAST__PIPELINE__RUN=true; \
10+ fi
11+
612COPY agent/* agent/
713RUN rm contrast_security.yaml || true
814COPY contrast_security.yaml contrast_security.yaml
Original file line number Diff line number Diff line change @@ -31,6 +31,14 @@ RUN gem install bundler
3131ENV PUMA=true
3232ENV THIN=true
3333
34+ # If ruby is 3.0 then use ffi 1.15.5:
35+ RUN if [ "$RUBY_VER" = "3.0" ]; \
36+ then echo "RUBY_VER is 3.0" && export CONTRAST__PIPELINE__RUN=true \
37+ && bundle config build.ffi -- --disable-system-libffi \
38+ && gem install ffi -v 1.15.5 -- -- disable-system-libffi; \
39+ fi
40+
41+
3442RUN bundle config set with 'puma' 'thin'
3543RUN bundle config force_ruby_platform true \
3644 && bundle config build.nokogiri --use-system-libraries
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ ENV PORT=$PORT_ARG
88ENV PASSENGER_MAX=true
99RUN bundle config set with 'passenger_max'
1010
11- RUN bundle update
11+ RUN bundle install
1212
1313# Copy configuration files to root directory:
1414RUN cp /app/contrast_security.yaml /app/spec/dummy/contrast_security.yaml
@@ -22,4 +22,4 @@ RUN bundle exec rake db:version
2222
2323# Name and run the application
2424RUN ./docker/app_name_generator.sh Passenger_max >> /tmp/app_name.txt
25- CMD redis-server & cat /tmp/app_name.txt && CONTRAST__APPLICATION__NAME=$(cat /tmp/app_name.txt) PASSENGER_START_TIMEOUT=300 bundle exec rails s -p $PORT
25+ CMD redis-server & cat /tmp/app_name.txt && CONTRAST__APPLICATION__NAME=$(cat /tmp/app_name.txt) PASSENGER_START_TIMEOUT=300 bundle exec rails s -p $PORT
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ ENV PORT=$PORT_ARG
88ENV PASSENGER_MIN=true
99RUN bundle config set with 'passenger_min'
1010
11- RUN bundle update
11+ RUN bundle install
1212
1313# Copy configuration files to root directory:
1414RUN cp /app/contrast_security.yaml /app/spec/dummy/contrast_security.yaml
@@ -22,4 +22,4 @@ RUN bundle exec rake db:version
2222
2323# Name and run the application
2424RUN ./docker/app_name_generator.sh Passenger_min >> /tmp/app_name.txt
25- CMD redis-server & cat /tmp/app_name.txt && CONTRAST__APPLICATION__NAME=$(cat /tmp/app_name.txt) PASSENGER_START_TIMEOUT=300 bundle exec rails s -p $PORT
25+ CMD redis-server & cat /tmp/app_name.txt && CONTRAST__APPLICATION__NAME=$(cat /tmp/app_name.txt) PASSENGER_START_TIMEOUT=300 bundle exec rails s -p $PORT
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ ENV WEB_CONCURRENCY=1
1111ENV PUMA_MAX=true
1212RUN bundle config set with 'puma_max'
1313
14- RUN bundle update
14+ RUN bundle install
1515
1616# So we may use whatever command we want to trigger rake, to be sure
1717# that the agent is not braking the rake task
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ ENV WEB_CONCURRENCY=1
1111ENV PUMA_MIN=true
1212RUN bundle config set with 'puma_min'
1313
14- RUN bundle update
14+ RUN bundle install
1515
1616# So we may use whatever command we want to trigger rake, to be sure
1717# that the agent is not braking the rake task
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ ENV PORT=$PORT_ARG
88ENV THIN_MAX=true
99RUN bundle config set with 'thin_max'
1010
11- RUN bundle update
11+ RUN bundle install
1212
1313# So we may use whatever command we want to trigger rake, to be sure
1414# that the agent is not braking the rake task
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ ENV PORT=$PORT_ARG
88ENV THIN_MIN=true
99RUN bundle config set with 'thin_min'
1010
11- RUN bundle update
11+ RUN bundle install
1212
1313# So we may use whatever command we want to trigger rake, to be sure
1414# that the agent is not braking the rake task
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ ENV PORT=$PORT_ARG
88ENV UNICORN_MAX=true
99RUN bundle config set with 'unicorn_max'
1010
11- RUN AGENT_PATH=`gem which contrast-agent` bundle update && bundle install
11+ RUN AGENT_PATH=`gem which contrast-agent` bundle install
1212
1313# So we may use whatever command we want to trigger rake, to be sure
1414# that the agent is not braking the rake task
You can’t perform that action at this time.
0 commit comments