Skip to content

test: adversarial coverage for secrets + enrichment#73

Open
Nelson Spence (Fieldnote-Echo) wants to merge 1 commit intomainfrom
test/L2-security-hardening
Open

test: adversarial coverage for secrets + enrichment#73
Nelson Spence (Fieldnote-Echo) wants to merge 1 commit intomainfrom
test/L2-security-hardening

Conversation

@Fieldnote-Echo
Copy link
Member

Summary

  • F-RS-001: ReDoS resistance tests already existed; finding was stale — no new tests needed
  • F-ENR-001: 5 adversarial tests for _compute_suppression() import-based enrichment:
    • Short import substring collision ("os" vs "cosmos/handler.py")
    • Path traversal import path ("../../etc/passwd")
    • Empty string import handling
    • Crafted import name suppression behavior (documents substring match semantics)
    • Unicode import path handling

Audit Context

  • Findings: F-RS-001, F-ENR-001 (both MEDIUM)
  • Lane: L2 (Security Hardening Tests) — Priority 3 in remediation plan

Test plan

  • uv run pytest tests/test_grippy_rules_enrichment.py -v — all pass
  • uv run pytest tests/ -v — full suite passes
  • Pre-commit hooks pass

🤖 Generated with Claude Code

Add 5 adversarial tests for graph-derived enrichment suppression:
- Substring collision: short import name vs file path
- Path traversal import: ../../etc/passwd no crash
- Empty import path: empty string handled safely
- Crafted import name: documents substring match false-positive vector
- Unicode import path: non-ASCII characters no crash

F-RS-001 (ReDoS) already resolved by existing TestReDoS class (9 tests).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Collaborator

@project-navi-bot project-navi-bot left a comment

Choose a reason for hiding this comment

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

All required CI checks passed. Auto-approved by navi-bot.

Copy link
Collaborator

@project-navi-bot project-navi-bot left a comment

Choose a reason for hiding this comment

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

All required CI checks passed. Auto-approved by navi-bot.

@github-actions
Copy link
Contributor

✅ Grippy Review — PASS

Score: 100/100 | Findings: 0


Commit: c9e25b1

Copy link
Collaborator

@project-navi-bot project-navi-bot left a comment

Choose a reason for hiding this comment

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

All required CI checks passed. Auto-approved by navi-bot.

Copy link
Collaborator

@project-navi-bot project-navi-bot left a comment

Choose a reason for hiding this comment

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

All required CI checks passed. Auto-approved by navi-bot.

@codecov
Copy link

codecov bot commented Mar 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Collaborator

@project-navi-bot project-navi-bot left a comment

Choose a reason for hiding this comment

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

All required CI checks passed. Auto-approved by navi-bot.

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