Skip to content

ci(#7045): add security-hook pytest suite to script-test target - #7046

Open
fullsend-ai-coder[bot] wants to merge 1 commit into
mainfrom
agent/7045-ci-security-hook-tests
Open

ci(#7045): add security-hook pytest suite to script-test target#7046
fullsend-ai-coder[bot] wants to merge 1 commit into
mainfrom
agent/7045-ci-security-hook-tests

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor

Summary

Adds the security-hook Python test suite (~500 tests under internal/security/hooks/) to the script-test Makefile target so it runs in CI on every PR and push to main. Previously, no CI job ran these tests — a regression in any PreToolUse or PostToolUse hook could land without any check failing.

Related Issue

Closes #7045

Changes

  • Added python3 -m pytest internal/security/hooks/ -v to the script-test Makefile target, folding it into the existing test job in lint.yml
  • Updated the script-test help description to mention security-hooks

No workflow file changes needed — lint.yml already runs make script-test and installs pytest.

Testing

  • python3 -m pytest internal/security/hooks/ -v — all 497 tests pass
  • make help shows updated description
  • Secret scan passes

Closes #7045

Post-script verification

  • Branch is not main/master (agent/7045-ci-security-hook-tests)
  • Secret scan passed (gitleaks — 6d496c4ce54bcccefdcbd5bec1ab44f775a33de8..HEAD)
  • PR body secret scan passed (gitleaks — no-git)

The ~500 pytest tests under internal/security/hooks/ were not run by
any CI job. A regression in a PreToolUse or PostToolUse hook could
land without any required check failing.

Add the pytest invocation to the script-test Makefile target, which
is already called by the lint.yml workflow on every PR and push to
main. This folds the hooks suite into the existing test job with no
workflow changes needed, since pytest is already installed in that
job's setup step.

Closes #7045
@fullsend-ai-coder
fullsend-ai-coder Bot requested a review from a team as a code owner September 5, 2026 14:52
@fullsend-ai-coder fullsend-ai-coder Bot added the ready-for-review Triggers review agent dispatch label Sep 5, 2026
@fullsend-ai-review

fullsend-ai-review Bot commented Sep 5, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 2:54 PM UTC · Completed 3:06 PM UTC

Commit: de68c74 · View workflow run →

Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $2.14

@codecov

codecov Bot commented Sep 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@fullsend-ai-review fullsend-ai-review Bot added the risk/moderate PR risk: moderate label Sep 5, 2026
@fullsend-ai-review

Copy link
Copy Markdown

Risk Assessment: moderate (2/5)

Details

A minimal 1-file, 3-line Makefile change that precisely addresses a documented CI gap; the score reaches moderate (rather than low) because the Makefile is a high-churn, multi-author hub with 16 commits in 30 days and a dense fix/revert history, and the CI_WORKFLOW_CHANGED signal is elevated, but these structural risks are offset by a near-perfect scope-to-issue match and an additive, easily revertible change.

@fullsend-ai-review

Copy link
Copy Markdown

Looks good to me

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

Labels

ready-for-merge All reviewers approved — ready to merge ready-for-review Triggers review agent dispatch risk/moderate PR risk: moderate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: the security-hook Python tests (internal/security/hooks/*_test.py) are not run by any CI job

1 participant