Skip to content

[codex] add injection scanner unit tests#239

Merged
Koukyosyumei merged 1 commit into
h5i-dev:mainfrom
leemeo3:codex/add-injection-unit-tests
Jun 29, 2026
Merged

[codex] add injection scanner unit tests#239
Koukyosyumei merged 1 commit into
h5i-dev:mainfrom
leemeo3:codex/add-injection-unit-tests

Conversation

@leemeo3

@leemeo3 leemeo3 commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Fixes #214.

What changed

  • Added focused unit coverage for src/injection.rs prompt-injection scanning.
  • Covered clean input, known rule hits, severity labels/weights, monotonic score aggregation with capping, scan_many aggregation, and rule_description fallback behavior.
  • Kept the change test-only; production scanner behavior is unchanged.

Validation

  • env RUSTC=/Users/sanghoon/.rustup/toolchains/stable-aarch64-apple-darwin/bin/rustc rustup run stable cargo test injection
  • env TMPDIR=/private/tmp RUSTC=/Users/sanghoon/.rustup/toolchains/stable-aarch64-apple-darwin/bin/rustc RUSTDOC=/Users/sanghoon/.rustup/toolchains/stable-aarch64-apple-darwin/bin/rustdoc rustup run stable cargo test
  • env PATH=/Users/sanghoon/.rustup/toolchains/stable-aarch64-apple-darwin/bin:$PATH TMPDIR=/private/tmp cargo clippy --all-targets --all-features -- -D warnings

AI assistance was used to prepare this PR.

@leemeo3 leemeo3 marked this pull request as ready for review June 29, 2026 21:13
@Koukyosyumei Koukyosyumei merged commit 31e545d into h5i-dev:main Jun 29, 2026
5 checks passed
@Koukyosyumei

Copy link
Copy Markdown
Collaborator

Thank you for your contribution!!

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.

Add unit tests for injection.rs (prompt-injection detection)

2 participants