Merge branch 'master' of https://github.com/OWASP/railsgoat
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
FROM rails:onbuild
|
||||
MAINTAINER mccabe615
|
||||
|
||||
ADD script/start /start
|
||||
|
||||
RUN chmod a+x /start
|
||||
|
||||
user root
|
||||
|
||||
ENV RAILS_ENV development
|
||||
|
||||
CMD /start
|
||||
@@ -42,6 +42,25 @@ $ rails server
|
||||
|
||||
Open your favorite browser, navigate to `http://localhost:3000` and start hacking!
|
||||
|
||||
## Vagrant Install
|
||||
|
||||
To run Railsgoat with Vagrant you must first have [Vagrant](https://www.vagrantup.com/) and [Virtualbox](https://www.virtualbox.org/) installed. Once those dependencies are installed cd into the Railsgoat directory where you've cloned the code and run.
|
||||
|
||||
```
|
||||
#~/code/railsgoat
|
||||
$ vagrant up
|
||||
...
|
||||
railsgoat: Port: 3000:3000
|
||||
railsgoat:
|
||||
railsgoat: Container created: 3084633a81675346
|
||||
==> railsgoat: Starting container...
|
||||
==> railsgoat: Provisioners will not be run since container doesn't support SSH.
|
||||
$
|
||||
```
|
||||
Once you see the preceeding message Railsgoat is running on your localhost on port 3000.
|
||||
|
||||
Open your favorite browser, navigate to `http://localhost:3000` and start hacking!
|
||||
|
||||
## Capybara Tests
|
||||
|
||||
RailsGoat now includes a set of failing Capybara RSpecs, each one indicating that a separate vulnerability exists in the application. To run them, you first need to install [PhantomJS](https://github.com/jonleighton/poltergeist#installing-phantomjs), which is required by the Poltergeist Capybara driver. Upon installation, simply run the following rake task:
|
||||
|
||||
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
VAGRANTFILE_API_VERSION = "2"
|
||||
ENV['VAGRANT_DEFAULT_PROVIDER'] ||= 'docker'
|
||||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||
config.vm.define "railsgoat" do |rg|
|
||||
rg.vm.provider "docker" do |d|
|
||||
d.image = "mccabe615/railsgoat"
|
||||
d.name = "railsgoat"
|
||||
d.ports = ["3000:3000"]
|
||||
d.vagrant_vagrantfile = "./Vagrantfile.proxy"
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
@@ -0,0 +1,10 @@
|
||||
VAGRANTFILE_API_VERSION = "2"
|
||||
|
||||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||
config.vm.box = "hashicorp/precise64"
|
||||
config.vm.provision "docker"
|
||||
config.vm.provision "shell", inline:
|
||||
"ps aux | grep 'sshd:' | awk '{print $2}' | xargs kill"
|
||||
|
||||
config.vm.network :forwarded_port, guest: 3000, host: 3000
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
rake db:setup
|
||||
rails server
|
||||
Reference in New Issue
Block a user