forked from microsoft/PyRIT
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pyrit_conf_example
More file actions
148 lines (137 loc) · 5.75 KB
/
Copy path.pyrit_conf_example
File metadata and controls
148 lines (137 loc) · 5.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# 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/microsoft/PyRIT/blob/main/doc/getting_started/pyrit_conf.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., "TargetInitializer" -> "target").
#
# Available initializers:
# - target: Registers available prompt targets into the TargetRegistry
# - scorer: Registers pre-configured scorers into the ScorerRegistry
# - technique: Registers attack techniques into the AttackTechniqueRegistry
# - load_default_datasets: Optionally preloads all registered datasets into memory
# - preload_scenario_metadata: Preloads scenario metadata into the registry
#
# Each initializer can be specified as:
# - A simple string (name only)
# - A dictionary with 'name' and optional 'args' for parameters
#
# Parameters are lists of strings. Use the CLI command
# `pyrit_scan list-initializers` to see available parameters.
#
# Example:
# initializers:
# - scorer
# - name: target
# args:
# tags:
# - default
# - scorer
initializers:
- name: target
args:
tags:
- default
- scorer
- name: scorer
- name: technique
# Optional full preload/cache warming for offline or shared environments.
# This can take several minutes and may require network access,
# provider credentials, or accepted dataset licenses. Scenarios fetch only their
# requested datasets on demand without this initializer.
# If intentional preload exceeds backend startup time, increase
# server.startup_timeout below.
# - name: load_default_datasets
# Operator and Operation Labels
# ------------------------------
# Default labels applied to all attacks created with PyRIT.
#
# - operator: Identifies who is running the attack (e.g., your team name or alias).
# - operation: Groups related attacks under a campaign or engagement name.
#
# Both are optional.
operator: roakey
operation: op_trash_panda
# Initialization Scripts
# ----------------------
# List of local paths to 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 Configuration
# -------------------------
# Azure Key Vault is the canonical source for shared and deployed configuration.
# See doc/getting_started/pyrit_conf.md for loading order, references, and migration guidance.
# The list may contain at most one bootstrap secret URL.
# env_akv_ref:
# - https://my-vault.vault.azure.net/secrets/my-pyrit-env
# env_akv_strict: true
# Auto-discovered ~/.pyrit/.env remains supported but emits a security warning.
# Prefer env_akv_ref for shared or deployed secrets.
# Use ~/.pyrit/.env.local for quick local plaintext patches or when Azure is unavailable.
# Process values remain authoritative; AKV and ordinary env_files fill gaps in load order.
# Only a file named .env.local overrides existing values.
# Explicit env_files remain supported regardless of name or location and may contain full kv: URLs.
# env_files:
# - /path/to/.env.local
# Max Concurrent Scenario Runs
# ----------------------------
# Maximum number of scenario runs that can execute concurrently in the backend.
# Applies only to the pyrit_backend server.
max_concurrent_scenario_runs: 3
# Custom Initializer Registration (REST API)
# -------------------------------------------
# When true, the REST API accepts POST /api/initializers to register custom
# initializer scripts and DELETE /api/initializers/{name} to remove custom
# initializers.
#
# ⚠️ WARNING: Enabling this allows arbitrary Python code execution on the
# server via the REST API. Only enable on trusted networks.
# The pyrit_backend default host is localhost, which limits exposure.
# If you bind to 0.0.0.0, ensure you are on a trusted network.
#
# Default: false
allow_custom_initializers: false
# Optional storage for custom initializer Python scripts. This may be a local
# directory or an Azure Blob container URI with an optional blob prefix.
# Container URIs may include a SAS; otherwise DefaultAzureCredential is used. Defaults to
# ~/.pyrit/custom_initializers.
# custom_initializers_source: https://account.blob.core.windows.net/container/custom_initializers
# Local Backend Server
# --------------------
# Client settings used by pyrit_scan when connecting to or launching a backend.
# - url: Backend URL used when --server-url is omitted.
# - startup_timeout: Seconds to wait for --start-server before cleaning up the
# spawned process and returning an error.
#
# Both settings can be overridden with --server-url and --startup-timeout.
server:
url: http://localhost:8000
startup_timeout: 120
# Silent Mode
# -----------
# If true, suppresses print statements during initialization.
# Useful for non-interactive environments or when embedding PyRIT in other tools.
silent: false