swen-331-fuzzer/.woodpecker.yml
Blizzard Finnegan 1f1a07f7eb
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Set woodpecker to output all run information
2024-09-21 18:54:48 -04:00

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