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

feature: amend garak user-agent #960

Merged
merged 14 commits into from
Nov 14, 2024
Merged

feature: amend garak user-agent #960

merged 14 commits into from
Nov 14, 2024

Conversation

leondz
Copy link
Collaborator

@leondz leondz commented Oct 25, 2024

We should be good citizens and not use the default requests user-agent, but instead our own

  • add new run-level config param for useragent
  • use this in generators using requests library

Verification

List the steps needed to make sure this thing works

  • drawing a blank here for now. maybe when this comes out of draft, we can use requests-mock

Copy link
Collaborator

@erickgalinkin erickgalinkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may want to find other places where we're using requests and fix the user agent -- may want to place the user agent in the shared resources so we can ref it easily.

garak/resources/garak.core.yaml Outdated Show resolved Hide resolved
garak/_config.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@jmartin-tech jmartin-tech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider finding a hook to set for all uses in common libs we are already dependent on:

  • requests
  • aiohttp
  • httpx

garak/_config.py Outdated Show resolved Hide resolved
garak/_config.py Outdated Show resolved Hide resolved
garak/resources/garak.core.yaml Outdated Show resolved Hide resolved
garak/_config.py Outdated Show resolved Hide resolved
@leondz leondz changed the title generators: amend requests user-agent feature: amend requests user-agent Oct 30, 2024
@leondz leondz changed the title feature: amend requests user-agent feature: amend garak user-agent Oct 30, 2024
@leondz leondz marked this pull request as ready for review November 11, 2024 14:15
Copy link
Collaborator

@erickgalinkin erickgalinkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

garak/resources/garak.core.yaml Outdated Show resolved Hide resolved
Copy link
Collaborator

@jmartin-tech jmartin-tech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor tweaks.

garak/_config.py Outdated Show resolved Hide resolved
garak/resources/garak.core.yaml Outdated Show resolved Hide resolved
@leondz leondz merged commit 0dda8de into main Nov 14, 2024
9 checks passed
@leondz leondz deleted the feature/requests_ua branch November 14, 2024 13:22
@github-actions github-actions bot locked and limited conversation to collaborators Nov 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants