Skip to content
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

AllPages throws when used on SecurityVulnerabilities #213

Open
brphelps opened this issue Feb 5, 2020 · 5 comments
Open

AllPages throws when used on SecurityVulnerabilities #213

brphelps opened this issue Feb 5, 2020 · 5 comments
Labels
Type: Bug Something isn't working as documented

Comments

@brphelps
Copy link
Collaborator

brphelps commented Feb 5, 2020

Hitting this guy:
https://developer.github.com/v4/object/securityvulnerability/

Like so:

var query = new Query()
                    .SecurityVulnerabilities(10, null, null, null, SecurityAdvisoryEcosystem.Rubygems, null)
                    .AllPages(100)
                    .Select(vuln => new
                    {
                        vuln.FirstPatchedVersion.Identifier,
                        vuln.Package.Name,
                        vuln.Package.Ecosystem,
                        vuln.Severity,
                        vuln.VulnerableVersionRange
                    })
                    .Compile();

                var result = await connection.Run(query);

Produces:
image

I'm assuming that in other cases there is a "secret" Id field added at the front of the list, and it's not present here.

@jcansdale
Copy link
Collaborator

I don't know if a schema update might fix this?

There's a PR with one here #211. You could compile and pull in the DLLs or nupkg from that.

@brphelps
Copy link
Collaborator Author

brphelps commented Feb 5, 2020

@jcansdale I tried on your branch, same issue. I can't really tell without more inspection if the id selection part is just option, that is "If we don't find it should we just skip it?". If so I can commit something doing that.

@jcansdale
Copy link
Collaborator

Re your query:

var query = new Query()
                    .SecurityVulnerabilities(10, null, null, null, SecurityAdvisoryEcosystem.Rubygems, null)
                    .AllPages(100)

I didn't think you needed to set the first when using AllPages.

Could you try the following:

var query = new Query()
                    .SecurityVulnerabilities(null, null, null, null, SecurityAdvisoryEcosystem.Rubygems, null)
                    .AllPages(100)

@brphelps
Copy link
Collaborator Author

brphelps commented Feb 7, 2020

Gave it a try, it doesn't impact the behavior at all.

@github-actions
Copy link

github-actions bot commented Dec 3, 2022

👋 Hey Friends, this issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please add the Status: Pinned label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!

@github-actions github-actions bot added the Status: Stale Used by stalebot to clean house label Dec 3, 2022
@kfcampbell kfcampbell added Priority: Normal Type: Bug Something isn't working as documented labels Dec 5, 2022
@github-actions github-actions bot removed the Status: Stale Used by stalebot to clean house label Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working as documented
Projects
None yet
Development

No branches or pull requests

4 participants