2022-04-26 23:56:35 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class CisaKnownExploitsController < ApplicationController
|
|
|
|
def index
|
|
|
|
@cisa_known_exploits = CisaKnownExploit.all
|
|
|
|
render json: @cisa_known_exploits.to_json
|
|
|
|
end
|
|
|
|
|
|
|
|
def show
|
2022-04-27 01:11:36 -05:00
|
|
|
@cisa_known_exploit = CisaKnownExploit.cve_id(params[:cve_id])
|
2022-04-26 23:56:35 -05:00
|
|
|
render json: @cisa_known_exploit.to_json
|
|
|
|
end
|
2022-04-27 01:31:57 -05:00
|
|
|
|
|
|
|
def show_product
|
|
|
|
@cisa_known_exploits = CisaKnownExploit.by_product(params[:product_name])
|
|
|
|
render json: @cisa_known_exploits.to_json
|
|
|
|
end
|
2022-04-26 23:56:35 -05:00
|
|
|
end
|