ossf / package-analysis

Open Source Package Analysis
Apache License 2.0
714 stars 51 forks source link

Add user-agents to http requests sent by Package Analysis #1018

Closed calebbrown closed 4 months ago

calebbrown commented 4 months ago

Being a good API user means setting the user-agent field in outbound requests so our requests can be distinguished from others.

This change adds user-agent support.

Part of the implementation allows an "extra" component to be added to the user-agent. This is especially important as it allows our production environment to be distinguished from other runs.

To propagate this "extra" data to sandbox required some messing around with how environment variables are managed and configuration passed around in the worker process.

1015