Skip to content

Commit 8b2dd0a

Browse files
fix: address PR review feedback — docstrings, changelog, yaml safety
- Add docstring to scenario_adversarial_attacks - Document --include-attacks flag in README - Pin pyyaml version in security-scan workflow - Audit and fix unsafe yaml.load() calls (if any) - Add unreleased changelog entries Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 68d6202 commit 8b2dd0a

File tree

4 files changed

+29
-2
lines changed

4 files changed

+29
-2
lines changed

.github/workflows/security-scan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
with:
1919
python-version: "3.11"
2020
- name: Install dependencies
21-
run: pip install pyyaml
21+
run: pip install "pyyaml>=6.0,<7.0"
2222
- name: Run security skills scan
2323
continue-on-error: true
2424
run: |

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
1313
## [Unreleased]
1414

15+
### Added
16+
- Demo `--include-attacks` flag for adversarial scenario testing (prompt injection, tool alias bypass, SQL bypass).
17+
- .NET `SagaStep.MaxAttempts` property replacing deprecated `MaxRetries`.
18+
19+
### Security
20+
- Replaced XOR placeholder encryption with AES-256-GCM in DMZ module.
21+
- Added Security Model & Limitations section to README.
22+
- Added security advisories to SECURITY.md for CostGuard and thread safety fixes.
23+
1524
## [2.2.0] - 2026-03-17
1625

1726
### Added

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,16 @@ var result = kernel.EvaluateToolCall(
146146
if (result.Allowed) { /* proceed */ }
147147
```
148148

149+
### Run the governance demo
150+
151+
```bash
152+
# Full governance demo (policy enforcement, audit, trust, cost, reliability)
153+
python demo/maf_governance_demo.py
154+
155+
# Run with adversarial attack scenarios
156+
python demo/maf_governance_demo.py --include-attacks
157+
```
158+
149159
## More Examples & Samples
150160

151161
- **[Framework Quickstarts](examples/quickstart/)** — One-file governed agents for LangChain, CrewAI, AutoGen, OpenAI Agents, Google ADK

demo/maf_governance_demo.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1017,7 +1017,15 @@ def print_audit_summary(audit_log: AuditLog) -> None:
10171017
async def scenario_adversarial_attacks(
10181018
client: Any, model: str, audit_log: AuditLog, verbose: bool
10191019
) -> int:
1020-
"""Run adversarial test scenarios to verify governance blocks common attacks."""
1020+
"""Run adversarial attack scenarios to test governance resilience.
1021+
1022+
Probes 4 attack vectors: prompt injection, tool alias bypass,
1023+
trust score manipulation, and SQL policy bypass. Reports whether
1024+
each attack was blocked by the governance middleware.
1025+
1026+
Returns:
1027+
Number of audit entries generated during the adversarial scenarios.
1028+
"""
10211029
print(_section("Adversarial Scenarios: Attack Resilience"))
10221030

10231031
policy_dir = Path(__file__).resolve().parent / "policies"

0 commit comments

Comments
 (0)