-
Notifications
You must be signed in to change notification settings - Fork 337
feat(labrinth): overhaul malware scanner report storage and routes #4233
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
base: main
Are you sure you want to change the base?
Changes from all commits
910f63f
80ef820
a328776
42e4e0f
e2c12ab
e3d499b
faa8fe4
b534700
533de69
281ad92
eca92bf
33ffa29
bdc5439
f75190f
b147477
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
CREATE TYPE delphi_report_severity AS ENUM ('low', 'medium', 'high', 'severe'); | ||
|
||
CREATE TYPE delphi_report_issue_status AS ENUM ('pending', 'approved', 'rejected'); | ||
|
||
-- A Delphi analysis report for a project version | ||
CREATE TABLE delphi_reports ( | ||
id BIGINT PRIMARY KEY GENERATED ALWAYS AS IDENTITY, | ||
file_id BIGINT REFERENCES files (id) | ||
ON DELETE SET NULL | ||
ON UPDATE CASCADE, | ||
delphi_version INTEGER NOT NULL, | ||
artifact_url VARCHAR(2048) NOT NULL, | ||
created TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP NOT NULL, | ||
severity DELPHI_REPORT_SEVERITY NOT NULL, | ||
UNIQUE (file_id, delphi_version) | ||
); | ||
CREATE INDEX delphi_version ON delphi_reports (delphi_version); | ||
|
||
-- An issue found in a Delphi report. Every issue belongs to a report, | ||
-- and a report can have zero, one, or more issues attached to it | ||
CREATE TABLE delphi_report_issues ( | ||
id BIGINT PRIMARY KEY GENERATED ALWAYS AS IDENTITY, | ||
report_id BIGINT NOT NULL REFERENCES delphi_reports (id) | ||
ON DELETE CASCADE | ||
ON UPDATE CASCADE, | ||
issue_type TEXT NOT NULL, | ||
status DELPHI_REPORT_ISSUE_STATUS NOT NULL, | ||
UNIQUE (report_id, issue_type) | ||
); | ||
CREATE INDEX delphi_report_issue_by_status_and_type ON delphi_report_issues (status, issue_type); | ||
|
||
-- A Java class affected by a Delphi report issue. Every affected | ||
-- Java class belongs to a specific issue, and an issue can have zero, | ||
-- one, or more affected classes. (Some issues may be artifact-wide, | ||
-- or otherwise not really specific to any particular class.) | ||
CREATE TABLE delphi_report_issue_java_classes ( | ||
id BIGINT PRIMARY KEY GENERATED ALWAYS AS IDENTITY, | ||
issue_id BIGINT NOT NULL REFERENCES delphi_report_issues (id) | ||
ON DELETE CASCADE | ||
ON UPDATE CASCADE, | ||
internal_class_name TEXT NOT NULL, | ||
decompiled_source TEXT, | ||
UNIQUE (issue_id, internal_class_name) | ||
); |
Uh oh!
There was an error while loading. Please reload this page.