Skip to content

feat(testing): add adversarial testing module for mofa-testing (#1459)#1551

Open
iashutoshyadav wants to merge 1 commit intomofa-org:mainfrom
iashutoshyadav:final-branch
Open

feat(testing): add adversarial testing module for mofa-testing (#1459)#1551
iashutoshyadav wants to merge 1 commit intomofa-org:mainfrom
iashutoshyadav:final-branch

Conversation

@iashutoshyadav
Copy link
Copy Markdown

Summary

This PR introduces a foundational Adversarial Testing Module in mofa-testing to enable systematic security and robustness evaluation of AI agents.

It provides a modular framework to simulate adversarial scenarios aligned with OWASP LLM Top 10 risks.


Key Features

1. Adversarial Testing Framework

  • Added a new adversarial module with structured components:

    • category.rs – Defines adversarial categories
    • corpus.rs – Contains adversarial test datasets
    • evaluator.rs – Implements evaluation logic
    • report.rs – Generates structured reports
    • tests.rs – Includes unit tests

2. Modular & Extensible Design

  • Clean separation of concerns across components
  • Designed for easy extension with new evaluators and datasets

3. Integration

  • Integrated the module via lib.rs
  • Added necessary crate configuration in Cargo.toml

Testing

  • Includes basic unit tests in tests.rs
  • Validates adversarial evaluation flow and reporting functionality

Motivation

Current mofa-testing focuses on functional correctness but lacks mechanisms for security validation.

This module lays the groundwork for:

  • Prompt injection detection
  • Jailbreak attack simulation
  • Safety and robustness evaluation of AI agents

Scope

This PR implements only the foundational layer.

Advanced evaluators and comprehensive OWASP coverage will be added in future PRs.


Related Issue

Closes #1459

@diiviikk5
Copy link
Copy Markdown
Contributor

You do not need to create mofa testing inside crates there is an existing foundation in the tests directory in root for this , i suggest you check it out first

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(testing): Adversarial Testing Module for mofa-testing ( Idea 6)

2 participants