Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cnquery reports different User-Agents depending on destination #4741

Open
philipbalinov opened this issue Oct 11, 2024 · 0 comments
Open

cnquery reports different User-Agents depending on destination #4741

philipbalinov opened this issue Oct 11, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@philipbalinov
Copy link

Describe the bug
A single run of cnquery scan reports multiple User-Agent strings when performing http(s) requests, seemingly based on the URL being called.

To Reproduce
Observed while running cnquery scan --api-proxy http://localhost:8080 against MITMProxy

Expected behavior
cnquery should report a consistent User-Agent string for all outgoing HTTP requests, in the format

User-Agent: PN/<platform> build/<build shorthash> cnquery/<version>

Screenshots or CLI Output
I can provide a full flow log from MITMProxy upon request. Here is the relevant information w.r.t. request path and reported user-agent

root@ubuntu:~# grep -aioP  '((path;)(.*?)),|((user-agent,)(.*?),)' cnquery-scan-flow.log
path;22:/providers/latest.json,
User-Agent,18:Go-http-client/1.1,
path;19:/QueryHub/GetBundle,
User-Agent,42:PN/linux build/69fa7d1e0b1 cnquery/11.24.0,
path;33:/QueryConductor/SynchronizeAssets,
User-Agent,42:PN/linux build/69fa7d1e0b1 cnquery/11.24.0,
path;19:/QueryHub/GetBundle,
User-Agent,42:PN/linux build/69fa7d1e0b1 cnquery/11.24.0,
path;23:/QueryConductor/Resolve,
User-Agent,42:PN/linux build/69fa7d1e0b1 cnquery/11.24.0,
path;28:/QueryConductor/StoreResults,
User-Agent,42:PN/linux build/69fa7d1e0b1 cnquery/11.24.0,

Desktop (please complete the following information):

  • OS: Ubuntu
  • OS Version: 22.04
  • Browser if applicable: N/A
  • Browser Version: N/A

Additional context

@philipbalinov philipbalinov added the bug Something isn't working label Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant