Skip to content

FIX: Filter scenario notebook inputs for ASCII smuggling - #2915

Merged
Nina Chikanov (nina-msft) merged 3 commits into
microsoft:mainfrom
nina-msft:nina-msft-azure-sql-integration-fix
Sep 30, 2026
Merged

Nina Chikanov (nina-msft) merged 3 commits into
microsoft:mainfrom
nina-msft:nina-msft-azure-sql-integration-fix

Conversation

@nina-msft

@nina-msft Nina Chikanov (nina-msft) commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Description

The common scenario parameters notebook runs the default Foundry techniques, including ASCII smuggling, against randomly sampled HarmBench objectives. Objectives containing newlines cause AsciiSmugglerConverter to reject the input and fail the notebook with ScenarioPartialFailureException.

Filter explicit seed groups to printable ASCII (0x20-0x7E) before sampling. This keeps the default technique example intact without rewriting objective text or weakening converter validation. The paired notebook and Python source remain synchronized, with existing notebook outputs preserved.

No breaking changes. Database permissions and secret updates discussed during investigation are not part of this PR.

Tests and Documentation

  • Relies on the existing notebook integration test. Removed the additional documentation unit-test file per review feedback.
  • Requested integration test: pytest tests/integration/scenarios/test_notebooks_scenarios.py -k 1_common_scenario_parameters - 1 passed, 4 deselected during initial validation. The successful local run used process-only Entra authentication after the existing local API-key configuration was rejected; saved credentials were not changed.
  • Ruff checks passed for the changed Python files during initial validation.

Used Jupytext to confirm that the paired files have identical cell types and source content. Executed the notebook through the existing integration test with a worktree-local Python kernel.

Filter incompatible seed groups before sampling while preserving the default technique set and selected objective text. Keep notebook sources synchronized and cover control characters, Unicode, and mixed groups.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 7d65728c-a1fd-4ace-8f7e-a337353ff787

@jsong468 Justin Song (jsong468) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for fixing!!

Rely on the existing notebook integration test, as requested in review.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 7d65728c-a1fd-4ace-8f7e-a337353ff787
@nina-msft
Nina Chikanov (nina-msft) added this pull request to the merge queue Sep 30, 2026
Merged via the queue into microsoft:main with commit 9fac4af Sep 30, 2026
49 checks passed
@nina-msft
Nina Chikanov (nina-msft) deleted the nina-msft-azure-sql-integration-fix branch September 30, 2026 18:20
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.

2 participants