POC - Upload corpus to package registery
POC to create a service/model to upload the corpus to the package registry. The uploaded corpus will be used by the cov-fuzz engine in the coverage fuzzing job. More info #334941 (closed).
Note: This is just a quick POC to validate the approach with the package registry team.
Related to #341338 (closed)
Proposal:
- Frontend upload the file to Publish package endpoint https://docs.gitlab.com/ee/user/packages/generic_packages/index.html#publish-a-package-file
Set:
package_name: corpus*
status: hidden
-
Frontend can delete the file if required using https://docs.gitlab.com/ee/api/packages.html#delete-a-project-package endpoint. Update since it's a file https://docs.gitlab.com/ee/api/packages.html#delete-a-package-file
-
Once the user clicks on
add
send a POST request to the GRAPHQL endpoint/CorpusFile
. The new table will have some other info required on the manage corpus page. (New endpoint to be introduced in this poc)
Notes
- Required fields on corpus page
ref https://docs.gitlab.com/ee/api/graphql/reference/#cijob
(p1) Target Name - Corpus.package.pipeline.CiJob.name
(p1) Latest Job / Pipeline - Corpus.package.pipeline.CiJob.id
(p1) Last Updated - Corpus.updatedAt
(p1) Last Used - latest Corpus.package.pipeline.CiJob.startedAt
(p2) File Count - Corpus.package.filecount
(p2) Coverage Percentage - Corpus.package.pipeline.coverage
(p2) Crashes - This is in Ci.Reports.CoverageFuzzing.Reports we can include it incrementally.
Edited by Aditya Tiwari