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

Add proxy, token refresh, and multi_endpoint features to generators #878

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "Python 3",
"image": "mcr.microsoft.com/devcontainers/python:1-3.11-bullseye",
"runArgs": [
"--env-file", ".env", "--gpus=all"
],
"customizations": {
"vscode": {
"extensions": [
"HashiCorp.terraform",
"GitHub.copilot",
"GitHub.copilot-chat"
]
}
},
"postCreateCommand": "pip install --upgrade pip && pip install -r requirements.txt",
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -167,3 +167,4 @@ hitlog.*.jsonl
garak_runs/
runs/
logs/
.github/dependabot.yml
au70ma70n marked this conversation as resolved.
Show resolved Hide resolved
16 changes: 16 additions & 0 deletions garak/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,16 @@ def main(arguments=None) -> None:
action="store_true",
help="allow skip of unknown probes, detectors, or buffs",
)
parser.add_argument(
"--proxies",
type=str,
help="allow proxy settings for rest generator",
)
parser.add_argument(
"--verify_ssl",
type=str,
help="expose SSL verification settings for rest generator",
)

## RUN
parser.add_argument(
Expand Down Expand Up @@ -135,6 +145,12 @@ def main(arguments=None) -> None:
type=str,
help="options to pass to the generator",
)
token_refresh_args = parser.add_mutually_exclusive_group()
token_refresh_args.add_argument(
"--token_refresh_config",
type=str,
help="path to JSON file containing configuration for the request that fetches a new token",
)
# probes
parser.add_argument(
"--probes",
Expand Down
Loading
Loading