-
Couldn't load subscription status.
- Fork 342
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
89d35e5
708a805
5ae5f43
836f63a
0d3c19a
8ed9212
77adb14
0959b6e
eecfcfc
5ebaf42
90fbde7
ea408e0
587c00a
512ea30
1b3c47a
bf35ae3
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.
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,46 @@ | ||
| CREATE TYPE delphi_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_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); | ||
|
|
||
| -- The details of a Delphi report issue, which contain data about a | ||
| -- Java class affected by it. Every Delphi report issue details object | ||
| -- belongs to a specific issue, and an issue can have zero, one, or | ||
| -- more details attached to it. (Some issues may be artifact-wide, | ||
| -- or otherwise not really specific to any particular class.) | ||
| CREATE TABLE delphi_report_issue_details ( | ||
| 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, | ||
| data JSONB NOT NULL, | ||
| severity DELPHI_SEVERITY NOT NULL | ||
| ); |
Uh oh!
There was an error while loading. Please reload this page.