ossf / ossf/package-analysis

Improve package download flow

Open
#770 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement needs discussion
Dominant language
Go
Stars
912
Forks
74
PR merge metrics
No merged PRs in 30d

Description

Since #739 has been merged, we now have the ability to redownload and save the package archive (**) after analysis.

It would be ideal if the downloaded/saved archive is the same one that's used for analysis

Some possible ways to achieve this:

  1. Downloading the archive first in the worker container, then copying it into the static and dynamic sandboxes. These then do analysis as if on a local package.
  2. Have the static analysis sandbox double as the 'package downloader' container, then copy the downloaded files back to the host and into the dynamic analysis container, as well as uploading them to the bucket
  3. Have a separate 'downloader' container whose sole job is to download everything, and pass it to the other containers like in option 1.

** One caveat with all this is that Packagist packages hosted on GitLab don't offer direct package archive download URLs. We will need to figure out how to support this case (or possibly fall back to legacy behaviour).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the existing package download, analysis, archive-saving, and upload flow described in the issue and the changes from #739. Define a design that makes the analyzed archive the same one saved and uploaded, while deciding how GitLab-hosted Packagist packages are handled or whether legacy behavior is required.

Written by the indexing model from the issue text.

Assessment

Tech stack
gitlab, go
Domain
backend, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.