Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename to Appspider #15

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## Dradis Framework 3.15 (XXX, 2019) ##

* Migration from NTOSpider to AppSpider naming convention.

## Dradis Framework 3.14 (August, 2019) ##

* No changes.
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source 'https://rubygems.org'

# Declare your gem's dependencies in dradispro-duoweb.gemspec.
# Declare your gem's dependencies in dradispro-appspider.gemspec.
# Bundler will treat runtime dependencies like base dependencies, and
# development dependencies will be added by default to the :development group.
gemspec
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# NTO Spider add-on for Dradis
# AppSpider add-on for Dradis

[![Build Status](https://secure.travis-ci.org/dradis/dradis-ntospider.png?branch=master)](http://travis-ci.org/dradis/dradis-ntospider) [![Code Climate](https://codeclimate.com/github/dradis/dradis-ntospider.png)](https://codeclimate.com/github/dradis/dradis-ntospider.png)
[![Build Status](https://secure.travis-ci.org/dradis/dradis-appspider.png?branch=master)](http://travis-ci.org/dradis/dradis-appspider) [![Code Climate](https://codeclimate.com/github/dradis/dradis-appspider.png)](https://codeclimate.com/github/dradis/dradis-appspider.png)

The NTO Spider add-on enables users to upload NTO Spider XML files to create a structure of nodes/notes that contain the same information about the hosts/ports/services as the original file.
The AppSpider add-on enables users to upload AppSpider XML files to create a structure of nodes/notes that contain the same information about the hosts/ports/services as the original file.

The add-on requires [Dradis CE](https://dradisframework.org/) > 3.0, or [Dradis Pro](https://dradisframework.com/pro/).

Expand Down
16 changes: 8 additions & 8 deletions dradis-ntospider.gemspec → dradis-appspider.gemspec
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
$:.push File.expand_path('../lib', __FILE__)
require 'dradis/plugins/ntospider/version'
version = Dradis::Plugins::NTOSpider::VERSION::STRING
require 'dradis/plugins/appspider/version'
version = Dradis::Plugins::Appspider::VERSION::STRING


# Describe your gem and declare its dependencies:
Gem::Specification.new do |spec|
spec.platform = Gem::Platform::RUBY
spec.name = 'dradis-ntospider'
spec.name = 'dradis-appspider'
spec.version = version
spec.summary = 'NTOSpider add-on for the Dradis Framework.'
spec.description = 'This add-on allows you to upload and parse output produced from NTOSpider Web Vulnerability Scanner into Dradis.'
spec.summary = 'AppSpider add-on for the Dradis Framework.'
spec.description = 'This add-on allows you to upload and parse output produced from Rapid7s AppSpider Web Vulnerability Scanner into Dradis.'

spec.license = 'GPL-2'

spec.authors = ['Daniel Martin']
spec.email = ['[email protected]']
spec.authors = ['Daniel Martin', 'Michael Gargiullo']
spec.email = ['[email protected].com', '[email protected]']
spec.homepage = 'http://dradisframework.org'

spec.files = `git ls-files`.split($\)
Expand All @@ -27,6 +27,6 @@ Gem::Specification.new do |spec|
# s.add_dependency 'rails', '~> 4.1.1'
spec.add_dependency 'dradis-plugins', '~> 3.6'

spec.add_development_dependency 'bundler', '~> 1.6'
spec.add_development_dependency 'bundler'
spec.add_development_dependency 'rake', '~> 10.0'
end
6 changes: 3 additions & 3 deletions lib/ntospider/vuln.rb → lib/appspider/vuln.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module NTOSpider
module Appspider
# This class represents each of the vulnerabilities reported in the
# NTOSpider VulnerabilitiesSummary.xml file as <Vuln> entities.
# AppSpider VulnerabilitiesSummary.xml file as <Vuln> entities.
#
# It provides a convenient way to access the information scattered all over
# the XML entities.
Expand All @@ -27,7 +27,7 @@ def supported_tags
:vuln_type, :vuln_url, :web_site
# nested tags
]
end
end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spacing.


# This allows external callers (and specs) to check for implemented
# properties
Expand Down
8 changes: 8 additions & 0 deletions lib/dradis-appspider.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# hook to the framework base clases
require 'dradis-plugins'

# load this add-on's engine
require 'dradis/plugins/appspider'

# load supporting AppSpider classes
require 'appspider/vuln'
8 changes: 0 additions & 8 deletions lib/dradis-ntospider.rb

This file was deleted.

11 changes: 11 additions & 0 deletions lib/dradis/plugins/appspider.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module Dradis
module Plugins
module Appspider
end
end
end

require 'dradis/plugins/appspider/engine'
require 'dradis/plugins/appspider/field_processor'
require 'dradis/plugins/appspider/importer'
require 'dradis/plugins/appspider/version'
9 changes: 9 additions & 0 deletions lib/dradis/plugins/appspider/engine.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module Dradis::Plugins::Appspider
class Engine < ::Rails::Engine
isolate_namespace Dradis::Plugins::Appspider

include ::Dradis::Plugins::Base
description 'Processes AppSpider reports'
provides :upload
end
end
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module Dradis::Plugins::NTOSpider
module Dradis::Plugins::Appspider
class FieldProcessor < Dradis::Plugins::Upload::FieldProcessor

def post_initialize(args={})
@nto_object = ::NTOSpider::Vuln.new(data)
@appspider_object = ::Appspider::Vuln.new(data)
end

def value(args={})
Expand All @@ -15,7 +15,7 @@ def value(args={})
# The XML uses a <Method> entity, but 'method' is a reserved word here so:
name = 'vuln_method' if name == 'method'

@nto_object.try(name) || 'n/a'
@appspider_object.try(name) || 'n/a'
end
end

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
module Dradis
module Plugins
module NTOSpider
# Returns the version of the currently loaded NTOSpider as a <tt>Gem::Version</tt>
module Appspider
# Returns the version of the currently loaded AppSpider as a <tt>Gem::Version</tt>
def self.gem_version
Gem::Version.new VERSION::STRING
end

module VERSION
MAJOR = 3
MINOR = 14
MINOR = 15
TINY = 0
PRE = nil
PRE = 'rc1'

STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
module Dradis::Plugins::NTOSpider
module Dradis::Plugins::Appspider
class Importer < Dradis::Plugins::Upload::Importer

BAD_FILENAME_ERROR_MESSAGE = \
"The uploaded file should be named VulnerabilitiesSummary.xml. "\
"You'll find VulnerabilitiesSummary.xml inside the /report subdirectory in NTO Spider's output."
"You'll find VulnerabilitiesSummary.xml inside the /report subdirectory in AppSpider's output."
NO_VULNSUMMARY_ERROR_MESSAGE = \
"A proper root element (/VulnSummary) wasn't detected in the uploaded file. "\
"Ensure the file you uploaded comes from a NTOSpider report."
"Ensure the file you uploaded comes from a AppSpider report."
NO_VULNS_ERROR_MESSAGE = \
"No vulnerabilities were detected in the uploaded file (/VulnSummary/VulnList/Vuln). "\
"Ensure the file you uploaded comes from a NTOSpider report."
"Ensure the file you uploaded comes from a AppSpider report."

# The framework will call this function if the user selects this plugin from
# the dropdown list and uploads a file.
Expand Down Expand Up @@ -40,7 +40,7 @@ def import(params={})
end

@doc.xpath('/VulnSummary/VulnList/Vuln').each do |xml_vuln|
vuln = ::NTOSpider::Vuln.new(xml_vuln)
vuln = ::Appspider::Vuln.new(xml_vuln)

host_node_label = xml_vuln.at_xpath('./WebSite').text
host_node_label = URI.parse(host_node_label).host rescue host_node_label
Expand Down Expand Up @@ -68,7 +68,7 @@ def import(params={})
private
def log_error_and_return(message)
logger.fatal { message }
content_service.create_note text: "#[Title]#\nNTO upload error\n\n#[Description]#\n#{ message }"
content_service.create_note text: "#[Title]#\nAppSpider upload error\n\n#[Description]#\n#{ message }"
end
end
end
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require_relative 'gem_version'

module Dradis::Plugins::NTOSpider
# Returns the version of the currently loaded NTOSpider as a
module Dradis::Plugins::Appspider
# Returns the version of the currently loaded Appspider as a
# <tt>Gem::Version</tt>.
def self.version
gem_version
Expand Down
11 changes: 0 additions & 11 deletions lib/dradis/plugins/ntospider.rb

This file was deleted.

9 changes: 0 additions & 9 deletions lib/dradis/plugins/ntospider/engine.rb

This file was deleted.

8 changes: 4 additions & 4 deletions lib/tasks/thorfile.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
class NTOSpiderTasks < Thor
class AppspiderTasks < Thor
include Rails.application.config.dradis.thor_helper_module

namespace "dradis:plugins:ntospider"
namespace "dradis:plugins:appspider"

desc "upload FILE", "upload NTOSpider XML results"
desc "upload FILE", "upload AppSpider XML results"
def upload(file_path)
require 'config/environment'

Expand All @@ -14,7 +14,7 @@ def upload(file_path)

detect_and_set_project_scope

importer = Dradis::Plugins::NTOSpider::Importer.new(task_options)
importer = Dradis::Plugins::Appspider::Importer.new(task_options)
importer.import(file: file_path)
end
end