|
| 1 | +namespace Octokit.Webhooks.Models.RepositoryAdvisoryEvent; |
| 2 | + |
| 3 | +[PublicAPI] |
| 4 | +public sealed record RepositoryAdvisory |
| 5 | +{ |
| 6 | + [JsonPropertyName("ghsa_id")] |
| 7 | + public string GhsaId { get; init; } = null!; |
| 8 | + |
| 9 | + [JsonPropertyName("cve_id")] |
| 10 | + public string? CveId { get; init; } |
| 11 | + |
| 12 | + [JsonPropertyName("url")] |
| 13 | + public string Url { get; init; } = null!; |
| 14 | + |
| 15 | + [JsonPropertyName("html_url")] |
| 16 | + public string HtmlUrl { get; init; } = null!; |
| 17 | + |
| 18 | + [JsonPropertyName("summary")] |
| 19 | + public string Summary { get; init; } = null!; |
| 20 | + |
| 21 | + [JsonPropertyName("description")] |
| 22 | + public string Description { get; init; } = null!; |
| 23 | + |
| 24 | + [JsonPropertyName("severity")] |
| 25 | + [JsonConverter(typeof(StringEnumConverter<RepositoryAdvisorySeverity>))] |
| 26 | + public StringEnum<RepositoryAdvisorySeverity>? Severity { get; init; } |
| 27 | + |
| 28 | + [JsonPropertyName("author")] |
| 29 | + public User? Author { get; init; } |
| 30 | + |
| 31 | + [JsonPropertyName("publisher")] |
| 32 | + public User? Publisher { get; init; } |
| 33 | + |
| 34 | + [JsonPropertyName("identifiers")] |
| 35 | + public IEnumerable<RepositoryAdvisoryIdentifier> Identifiers { get; init; } = null!; |
| 36 | + |
| 37 | + [JsonPropertyName("state")] |
| 38 | + [JsonConverter(typeof(StringEnumConverter<RepositoryAdvisoryState>))] |
| 39 | + public StringEnum<RepositoryAdvisoryState> State { get; init; } = null!; |
| 40 | + |
| 41 | + [JsonPropertyName("created_at")] |
| 42 | + [JsonConverter(typeof(DateTimeOffsetConverter))] |
| 43 | + public DateTimeOffset? CreatedAt { get; init; } |
| 44 | + |
| 45 | + [JsonPropertyName("updated_at")] |
| 46 | + [JsonConverter(typeof(DateTimeOffsetConverter))] |
| 47 | + public DateTimeOffset? UpdatedAt { get; init; } |
| 48 | + |
| 49 | + [JsonPropertyName("published_at")] |
| 50 | + [JsonConverter(typeof(DateTimeOffsetConverter))] |
| 51 | + public DateTimeOffset? PublishedAt { get; init; } |
| 52 | + |
| 53 | + [JsonPropertyName("closed_at")] |
| 54 | + [JsonConverter(typeof(NullableDateTimeOffsetConverter))] |
| 55 | + public DateTimeOffset? ClosedAt { get; init; } |
| 56 | + |
| 57 | + [JsonPropertyName("withdrawn_at")] |
| 58 | + [JsonConverter(typeof(NullableDateTimeOffsetConverter))] |
| 59 | + public DateTimeOffset? WithdrawnAt { get; init; } |
| 60 | + |
| 61 | + [JsonPropertyName("submission")] |
| 62 | + public RepositoryAdvisorySubmission? Submission { get; init; } |
| 63 | + |
| 64 | + [JsonPropertyName("vulnerabilities")] |
| 65 | + public IEnumerable<RepositoryAdvisoryVulnerability>? Vulnerabilities { get; init; } |
| 66 | + |
| 67 | + [JsonPropertyName("cvss")] |
| 68 | + public RepositoryAdvisoryCvss? Cvss { get; init; } |
| 69 | + |
| 70 | + [JsonPropertyName("cvss_severities")] |
| 71 | + public RepositoryAdvisoryCvssSeverities? CvssSeverities { get; init; } |
| 72 | + |
| 73 | + [JsonPropertyName("cwes")] |
| 74 | + public IEnumerable<RepositoryAdvisoryCwe>? Cwes { get; init; } |
| 75 | + |
| 76 | + [JsonPropertyName("cwe_ids")] |
| 77 | + public IEnumerable<string>? CweIds { get; init; } |
| 78 | + |
| 79 | + [JsonPropertyName("credits")] |
| 80 | + public IEnumerable<RepositoryAdvisoryCredit>? Credits { get; init; } |
| 81 | + |
| 82 | + [JsonPropertyName("credits_detailed")] |
| 83 | + public IEnumerable<RepositoryAdvisoryCreditDetailed>? CreditsDetailed { get; init; } |
| 84 | + |
| 85 | + [JsonPropertyName("collaborating_users")] |
| 86 | + public IEnumerable<User>? CollaboratingUsers { get; init; } |
| 87 | + |
| 88 | + [JsonPropertyName("collaborating_teams")] |
| 89 | + public IEnumerable<Team>? CollaboratingTeams { get; init; } |
| 90 | + |
| 91 | + [JsonPropertyName("private_fork")] |
| 92 | + public Repository? PrivateFork { get; init; } |
| 93 | +} |
0 commit comments