-
Notifications
You must be signed in to change notification settings - Fork 665
FEAT: PyRIT Config #1343
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
Merged
Merged
FEAT: PyRIT Config #1343
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
59d4e86
tests and base classes
6518e39
tweaks
f012424
config-file arg
785bbc6
Merge branch 'main' into pyrit-config
ValbuenaVC 1753576
precedence
2a3a79d
Merge branch 'pyrit-config' of https://github.com/ValbuenaVC/PyRIT in…
70df49d
Merge branch 'main' into pyrit-config
ValbuenaVC 3d1ff3e
precommit
930f7ec
unit tests precommit
2fdd416
fixes
cf6012d
Merge branch 'main' into pyrit-config
ValbuenaVC 761e94e
devcontainer and conf
9c2b6cc
Merge branch 'main' into pyrit-config
ValbuenaVC 3e05974
empty list behavior
dbb2e3f
precommit
3284e19
logging type
9f775a8
Merge branch 'main' into pyrit-config
ValbuenaVC 5a48b78
precommit
ecc4ab0
precommit mypy
c183e34
logging type
0f638bd
logging
4d904fd
Merge branch 'main' into pyrit-config
ValbuenaVC 7d2f02b
Merge branch 'main' into pyrit-config
ValbuenaVC cdbd20a
reverting devcontainer
d8fd884
precommit
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| # PyRIT Configuration File Example | ||
| # ================================ | ||
| # This is a YAML-formatted configuration file. Copy to ~/.pyrit/.pyrit_conf | ||
| # or specify a custom path when loading via --config-file. | ||
| # | ||
| # For documentation on configuration options, see: | ||
| # https://github.com/Azure/PyRIT/blob/main/doc/setup/configuration.md | ||
|
|
||
| # Memory Database Type | ||
| # -------------------- | ||
| # Specifies which database backend to use for storing prompts and results. | ||
| # Options: in_memory, sqlite, azure_sql (case-insensitive) | ||
| # - in_memory: Temporary in-memory database (data lost on exit) | ||
| # - sqlite: Persistent local SQLite database (default) | ||
| # - azure_sql: Azure SQL database (requires connection string in env vars) | ||
| memory_db_type: sqlite | ||
|
|
||
| # Initializers | ||
| # ------------ | ||
| # List of built-in initializers to run during PyRIT initialization. | ||
| # Initializers configure default values for converters, scorers, and targets. | ||
| # Names are normalized to snake_case (e.g., "SimpleInitializer" -> "simple"). | ||
| # | ||
| # Available initializers: | ||
| # - simple: Basic OpenAI configuration (requires OPENAI_CHAT_* env vars) | ||
| # - airt: AI Red Team setup with Azure OpenAI (requires AZURE_OPENAI_* env vars) | ||
| # - load_default_datasets: Loads default datasets for all registered scenarios | ||
| # - objective_list: Sets default objectives for scenarios | ||
| # - openai_objective_target: Sets up OpenAI target for scenarios | ||
| # | ||
| # Each initializer can be specified as: | ||
| # - A simple string (name only) | ||
| # - A dictionary with 'name' and optional 'args' for constructor arguments | ||
| # | ||
| # Example: | ||
| # initializers: | ||
| # - simple | ||
| # - name: airt | ||
| # args: | ||
| # some_param: value | ||
| initializers: | ||
| - simple | ||
|
|
||
| # Initialization Scripts | ||
| # ---------------------- | ||
| # List of paths to custom Python scripts containing PyRITInitializer subclasses. | ||
| # Paths can be absolute or relative to the current working directory. | ||
| # | ||
| # Behavior: | ||
| # - Omit this field (or set to null): No custom scripts loaded (default) | ||
| # - Set to []: Explicitly load no scripts (same as omitting) | ||
| # - Set to list of paths: Load the specified scripts | ||
| # | ||
| # Example: | ||
| # initialization_scripts: | ||
| # - /path/to/my_custom_initializer.py | ||
| # - ./local_initializer.py | ||
|
|
||
| # Environment Files | ||
| # ----------------- | ||
| # List of .env file paths to load during initialization. | ||
| # Later files override values from earlier files. | ||
| # | ||
| # Behavior: | ||
| # - Omit this field (or set to null): Load default .env and .env.local from ~/.pyrit/ if they exist | ||
| # - Set to []: Explicitly load NO environment files | ||
| # - Set to list of paths: Load only the specified files | ||
| # | ||
| # Example: | ||
| # env_files: | ||
| # - /path/to/.env | ||
| # - /path/to/.env.local | ||
|
|
||
| # Silent Mode | ||
| # ----------- | ||
| # If true, suppresses print statements during initialization. | ||
| # Useful for non-interactive environments or when embedding PyRIT in other tools. | ||
| silent: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.