Skip to content

test: harden security-sensitive path coverage#21

Merged
jamiesun merged 1 commit into
mainfrom
codex/security-path-tests
Jun 20, 2026
Merged

test: harden security-sensitive path coverage#21
jamiesun merged 1 commit into
mainfrom
codex/security-path-tests

Conversation

@jamiesun

Copy link
Copy Markdown
Contributor

Refs #13.

Summary

  • add JSON contract tests for pre-connect config failures in agent mode
  • reuse a JSON failure helper for blocked command short-circuit coverage
  • add host-key tests for changed-key rejection and explicit insecure fallback opt-in

Coverage

  • internal/app: 46.9% -> 47.2%
  • internal/sshclient: 47.0% -> 49.0%

This is a focused first pass for #13, not a full closure of every candidate path listed there.

Verification

  • go test ./internal/app ./internal/sshclient -run 'TestRun_BlockedCommandShortCircuits|TestRun_JSONConfigFailuresDoNotConnect|TestGetHostKeyCallbackRejectsChangedKnownHostKey|TestGetHostKeyCallbackInsecureFallbackRequiresExplicitOptIn'
  • go test ./...
  • go test -cover ./...
  • git diff --check
  • make check

@jamiesun jamiesun merged commit 58de30f into main Jun 20, 2026
6 checks passed
@jamiesun jamiesun deleted the codex/security-path-tests branch June 20, 2026 16:03
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.

1 participant