snyk-labs / pysnyk

A Python client for the Snyk API.
https://snyk.docs.apiary.io/
MIT License
85 stars 116 forks source link

[Question]: How to get the vulnerabilities of "Code Analysis" #215

Open AjayJagan opened 7 months ago

AjayJagan commented 7 months ago

I have a project, which has some code analysis vulnerabilities. when I do project.issueset_aggregated.all() it returns IssueSetAggregated(issues=[])

when I look at the issueCountsBySeverity issueCountsBySeverity=IssueCounts(low=31, medium=22, high=30, critical=0)

I need to understand why it is not capturing these issues. Any help is appreciated.

ig596 commented 5 months ago

It doesn't look like this is implemented in the codebase presently. You can try calling the old endpoint directly and manually overriding the project attribute with the response cast into the proper model.

Which API version Client are you using? Here is the relevant API call from the old version But its not fully implemented in the code Client Get Issues

It appears to me that the new API doesn't support pulling issues from the project at this time.

The Project object from the new API only has the counts not the actual issues.

ProjectManager IssueSetAggregatedManager

AjayJagan commented 5 months ago

Which API version Client are you using? -> pysnyk==0.9.19