Skip to content

Commit ffd73b1

Browse files
authored
Merge pull request #177 from safedep/fix/json-report-spec-threat-id
fix: Add identifiers to JSON report spec for threats
2 parents f4df5f8 + c3b3e25 commit ffd73b1

5 files changed

Lines changed: 262 additions & 163 deletions

File tree

api/json_report_spec.proto

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,20 +44,27 @@ message ReportThreat {
4444
CWE = 1;
4545
}
4646

47-
enum Subject {
47+
enum SubjectType {
4848
UnknownSubject = 0;
4949

5050
Package = 1;
5151
Manifest = 2;
5252
}
5353

54-
string id = 1;
55-
string message = 2;
56-
Subject subject_type = 3;
57-
string subject = 4;
58-
Confidence confidence = 5;
59-
Source source = 6;
60-
string source_id = 7;
54+
enum ReportThreatId {
55+
UnknownReportThreatId = 0;
56+
57+
LockfilePoisoning = 1;
58+
}
59+
60+
ReportThreatId id = 1;
61+
string instanceId = 2; // Unique threat instance ID per (ID, SubjectType, Subject) tuple
62+
string message = 3;
63+
SubjectType subject_type = 4;
64+
string subject = 5;
65+
Confidence confidence = 6;
66+
Source source = 7;
67+
string source_id = 8;
6168
}
6269

6370
message PackageManifestReport {

0 commit comments

Comments
 (0)