diff --git a/frontend/src/components/Config/CreateTargetDialog.test.tsx b/frontend/src/components/Config/CreateTargetDialog.test.tsx
index 21741f6987..69b7b65ab2 100644
--- a/frontend/src/components/Config/CreateTargetDialog.test.tsx
+++ b/frontend/src/components/Config/CreateTargetDialog.test.tsx
@@ -322,6 +322,21 @@ describe("CreateTargetDialog", () => {
).toBeInTheDocument();
});
+ it("should render .pyrit_conf_example as an accessible link", () => {
+ render(
+
+
+
+ );
+
+ const link = screen.getByRole("link", { name: ".pyrit_conf_example" });
+ expect(link).toBeInTheDocument();
+ expect(link).toHaveAttribute(
+ "href",
+ "https://github.com/microsoft/PyRIT/blob/main/.pyrit_conf_example"
+ );
+ });
+
it("should show field validation errors when submitting form without endpoint", async () => {
const user = userEvent.setup();
diff --git a/frontend/src/components/Config/CreateTargetDialog.tsx b/frontend/src/components/Config/CreateTargetDialog.tsx
index 02f94bb9c4..7cd1e66363 100644
--- a/frontend/src/components/Config/CreateTargetDialog.tsx
+++ b/frontend/src/components/Config/CreateTargetDialog.tsx
@@ -9,6 +9,7 @@ import {
Button,
Input,
Label,
+ Link,
Radio,
RadioGroup,
Select,
@@ -348,9 +349,9 @@ export default function CreateTargetDialog({ open, onClose, onCreated }: CreateT
Targets can also be auto-populated by adding an initializer (e.g. airt) to your{' '}
~/.pyrit/.pyrit_conf file, which reads endpoints from your .env and{' '}
.env.local files. See{' '}
-
+
.pyrit_conf_example
- .
+ .
diff --git a/frontend/src/components/Config/TargetConfig.tsx b/frontend/src/components/Config/TargetConfig.tsx
index 1b28a34f69..80e3419c84 100644
--- a/frontend/src/components/Config/TargetConfig.tsx
+++ b/frontend/src/components/Config/TargetConfig.tsx
@@ -3,6 +3,7 @@ import {
tokens,
Text,
Button,
+ Link,
Spinner,
} from '@fluentui/react-components'
import { AddRegular, ArrowSyncRegular } from '@fluentui/react-icons'
@@ -107,9 +108,9 @@ export default function TargetConfig({ activeTarget, onSetActiveTarget }: Target
to auto-populate targets from your .env and .env.local files.
For example, add airt to the initializers list to register
Azure OpenAI targets automatically. See the{' '}
-
+
.pyrit_conf_example
- {' '}
+ {' '}
for details.