Skip to content

Commit

Permalink
update based on feedback part II
Browse files Browse the repository at this point in the history
Signed-off-by: cpanato <[email protected]>
  • Loading branch information
cpanato committed Nov 20, 2023
1 parent 1cff3f0 commit ea4ee2c
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 74 deletions.
56 changes: 28 additions & 28 deletions github/github-accessors.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

64 changes: 32 additions & 32 deletions github/github-accessors_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions github/security_advisories.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,19 +97,19 @@ type ListGlobalSecurityAdvisoriesOptions struct {
// GlobalSecurityAdvisory represents the global security advisory object response.
type GlobalSecurityAdvisory struct {
SecurityAdvisory
ID *int64 `json:"id,omitempty"`
RepositoryAdvisoryURL *string `json:"repository_advisory_url,omitempty"`
Type *string `json:"type,omitempty"`
SourceCodeLocation *string `json:"source_code_location,omitempty"`
References []string `json:"references,omitempty"`
Vulnerabilities []*Vulnerabilities `json:"vulnerabilities,omitempty"`
GitHubReviewedAt *Timestamp `json:"github_reviewed_at,omitempty"`
NVDPublishedAt *Timestamp `json:"nvd_published_at,omitempty"`
Credits []*Credit `json:"credits,omitempty"`
ID *int64 `json:"id,omitempty"`
RepositoryAdvisoryURL *string `json:"repository_advisory_url,omitempty"`
Type *string `json:"type,omitempty"`
SourceCodeLocation *string `json:"source_code_location,omitempty"`
References []string `json:"references,omitempty"`
Vulnerabilities []*GlobalSecurityVulnerability `json:"vulnerabilities,omitempty"`
GithubReviewedAt *Timestamp `json:"github_reviewed_at,omitempty"`
NVDPublishedAt *Timestamp `json:"nvd_published_at,omitempty"`
Credits []*Credit `json:"credits,omitempty"`
}

// Vulnerabilities represents the Vulnerabilities for the global security advisory.

Check failure on line 111 in github/security_advisories.go

View workflow job for this annotation

GitHub Actions / lint

ST1021: comment on exported type GlobalSecurityVulnerability should be of the form "GlobalSecurityVulnerability ..." (with optional leading article) (stylecheck)
type Vulnerabilities struct {
type GlobalSecurityVulnerability struct {
Package *VulnerabilityPackage `json:"package,omitempty"`
FirstPatchedVersion *string `json:"first_patched_version,omitempty"`
VulnerableVersionRange *string `json:"vulnerable_version_range,omitempty"`
Expand Down
8 changes: 4 additions & 4 deletions github/security_advisories_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ func TestListGlobalSecurityAdvisories(t *testing.T) {
},
},
References: []string{"https://nvd.nist.gov/vuln/detail/CVE-xoxo-1234"},
Vulnerabilities: []*Vulnerabilities{
Vulnerabilities: []*GlobalSecurityVulnerability{
{
Package: &VulnerabilityPackage{
Ecosystem: String("npm"),
Expand All @@ -463,7 +463,7 @@ func TestListGlobalSecurityAdvisories(t *testing.T) {
RepositoryAdvisoryURL: String("https://api.github.com/repos/project/a-package/security-advisories/GHSA-xoxo-1234-xoxo"),
Type: String("reviewed"),
SourceCodeLocation: String("https://github.com/project/a-package"),
GitHubReviewedAt: &date,
GithubReviewedAt: &date,
NVDPublishedAt: &date,
Credits: []*Credit{
{
Expand Down Expand Up @@ -633,10 +633,10 @@ func TestGetGlobalSecurityAdvisories(t *testing.T) {
Type: String("reviewed"),
SourceCodeLocation: String("https://github.com/project/a-package"),
References: []string{"https://nvd.nist.gov/vuln/detail/CVE-xoxo-1234"},
GitHubReviewedAt: &date,
GithubReviewedAt: &date,
NVDPublishedAt: &date,

Vulnerabilities: []*Vulnerabilities{
Vulnerabilities: []*GlobalSecurityVulnerability{
{
Package: &VulnerabilityPackage{
Ecosystem: String("npm"),
Expand Down

0 comments on commit ea4ee2c

Please sign in to comment.