Added support for mail notifications and WIP JIRA export.

This commit is contained in:
Šesták Vít
2016-02-12 19:50:40 +01:00
parent f4fa0ee948
commit 2fb2c3fd72
32 changed files with 728 additions and 51 deletions

View File

@@ -0,0 +1,20 @@
# --- !Ups
create table "vulnerability_subscription" ("subscriber_provider_id" VARCHAR NOT NULL,"subscriber_provider_key" VARCHAR NOT NULL,"project" VARCHAR NOT NULL);
create unique index "all" on "vulnerability_subscription" ("subscriber_provider_id","subscriber_provider_key","project");
create table "exported_issue_tracker_vulnerabilities" ("id" SERIAL NOT NULL PRIMARY KEY,"vulnerability_name" VARCHAR NOT NULL,"ticket" VARCHAR NOT NULL,"ticket_format_version" INTEGER NOT NULL);
create unique index "idx_exported_issue_tracker_vulnerabilities_vulnerabilityName" on "exported_issue_tracker_vulnerabilities" ("vulnerability_name");
create unique index "idx_ticket" on "exported_issue_tracker_vulnerabilities" ("ticket");
create table "exported_issue_tracker_vulnerability_projects" ("exported_vulnerability_id" INTEGER NOT NULL,"full_project_id" VARCHAR NOT NULL);
create unique index "idx_exported_issue_tracker_vulnerability_projects_all" on "exported_issue_tracker_vulnerability_projects" ("exported_vulnerability_id","full_project_id");
create table "exported_email_vulnerabilities" ("id" SERIAL NOT NULL PRIMARY KEY,"vulnerability_name" VARCHAR NOT NULL,"message_id" VARCHAR NOT NULL,"ticket_format_version" INTEGER NOT NULL);
create unique index "idx_exported_email_vulnerabilities_vulnerabilityName" on "exported_email_vulnerabilities" ("vulnerability_name");
create table "exported_email_vulnerability_projects" ("exported_vulnerability_id" INTEGER NOT NULL,"full_project_id" VARCHAR NOT NULL);
create unique index "idx_exported_email_vulnerability_projects_all" on "exported_email_vulnerability_projects" ("exported_vulnerability_id","full_project_id");
# --- !Downs
drop table "exported_email_vulnerability_projects";
drop table "exported_email_vulnerabilities";
drop table "exported_issue_tracker_vulnerability_projects";
drop table "exported_issue_tracker_vulnerabilities";
drop table "vulnerability_subscription";

4
conf/reference.conf Normal file
View File

@@ -0,0 +1,4 @@
play.modules.enabled += "modules.ConfigModule"
play.modules.enabled += "modules.SilhouetteModule"
play.modules.enabled += "modules.IssueTrackerExportModule"
play.modules.enabled += "modules.EmailExportModule"

View File

@@ -25,6 +25,11 @@ GET /stats/libraries/vulnerable controllers.Statistics.vulnerableL
GET /stats/libraries/all controllers.Statistics.allLibraries(selector: Option[String])
GET /stats/libraries/gavs controllers.Statistics.allGavs(selector: Option[String])
GET /notifications controllers.Notifications.listProjects()
POST /notifications/watch controllers.Notifications.watch(project: String)
POST /notifications/unwatch controllers.Notifications.unwatch(project: String)
GET /notifications/cron/:key controllers.Notifications.cron(key: String, purgeCache: Boolean ?= true)
GET /libraries/vulnerabilities controllers.Statistics.searchVulnerableSoftware(versionlessCpes: Seq[String], versionOption: Option[String])
GET /vulnerability/:name controllers.Statistics.vulnerability(name, selector: Option[String])