Class: PingController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/ping_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



2
3
4
5
6
7
8
9
10
11
# File 'app/controllers/ping_controller.rb', line 2

def index
  @scan = Scan.find(params[:id])
  @scan.vulnerabilities.create!(
    status: 'HIGH',
    class_type: 'Vulnerability',
    description: "Possible XXE vulnerability in #{@scan.url}",
    value: body
  ) if @scan
  render json: { status: :ok }
end

#pongObject



13
14
15
# File 'app/controllers/ping_controller.rb', line 13

def pong
  render json: { status: :ok }
end