40 lines
1.6 KiB
YAML
40 lines
1.6 KiB
YAML
when:
|
|
- event: push
|
|
branch: main
|
|
|
|
steps:
|
|
- name: local-testing
|
|
image: andymeneely/swen331fuzzer
|
|
commands:
|
|
- chown -R mysql:mysql /var/lib/mysql /var/run/mysqld
|
|
- service mysql start
|
|
- service apache2 start
|
|
# Image is based on Debian9; no longer hosted at deb.debian.org, still available at archive.debian.org
|
|
- sed -i 's/deb.debian.org/archive.debian.org/g' /etc/apt/sources.list
|
|
# Remove broken repository
|
|
- sed -i '/security/d' /etc/apt/sources.list
|
|
- sed -i '/stretch-updates/d' /etc/apt/sources.list
|
|
# Pull down latest updates
|
|
- apt-get update
|
|
# Install git and Ruby environment manager
|
|
- DEBIAN_FRONTEND=noninteractive apt-get install -y git rbenv
|
|
# Install ruby-build plugin, allowing build-from-source install of latest version
|
|
- git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
|
|
# Install version 3.3.5
|
|
- rbenv install 3.3.5
|
|
# Set version 3.3.5 as default
|
|
- rbenv global 3.3.5
|
|
# Ensure that 3.3.5 is available
|
|
- eval "$(rbenv init -)"
|
|
# Install necessary libraries for this project
|
|
- bundle install
|
|
# Update system's Ruby libraries using Ruby v3.3.5
|
|
- gem update
|
|
# Clean up pre-installed out of date libraries
|
|
- gem pristine --all
|
|
# Manually install slop gem to user (????)
|
|
# No idea why this is necessary, or why this works when bundle install should do the same thing
|
|
- gem install slop
|
|
# Run project
|
|
- ruby lib/fuzzer.rb discover http://localhost/ --custom-auth=dvwa
|
|
- ruby lib/fuzzer.rb discover http://127.0.0.1/fuzzer-tests
|