jenkinsci / fortify-on-demand-uploader-plugin

Fortify on Demand Uploader
https://plugins.jenkins.io/fortify-on-demand-uploader/
8 stars 37 forks source link

Not all applications appear in application dropdown #11

Closed reggiebIV closed 8 years ago

reggiebIV commented 8 years ago

When attempting to upload to FOD, not all applications appear in dropdown. I used POSTMAN to duplicate the API call from the source, and it does appear in it. Also of note, the application has not had any assessments run against it. Please contact reginald.brown@hpe.com for more information.

ebiiii commented 8 years ago

If it is related to the type of application maybe this could help. There is a filter somewhere that discards mobile applications (https://github.com/jenkinsci/fortify-on-demand-uploader-plugin/blob/master/src/main/java/org/jenkinsci/plugins/fod/FoDAPI.java#L395). Also the current version doesn't support pagination, so if you have a large number of applications, only the first ones will show. The PR #10 tries to solve that, and also some people are also working on an update that should fix those issues (c.f. the comments on the PR).

reggiebIV commented 8 years ago

It's not mobile, and when I perform the GET via Postman, the app that immediately precedes it, and the one right after both show up in the plugin dropdown. I think it might be related to the fact that there has never been an assessment run against it.

reggiebIV commented 8 years ago

Upon further investigation, I think this is related to the getReleaseList() method. That method makes the following call: "/api/v2/Releases?fields=applicationId,applicationName,releaseId,releaseName";

The application has no releases returned in that call, those that appear in the application dropdown do.

reggiebIV commented 8 years ago

On a second look, I think that it's because of pagination that the release isn't returned, the client has 246 releases, and the API returns 50 at a time in v3, I imagine v2 was the same.

ryancblack commented 8 years ago

Resolved in PR #10, merged.