feat: add E2E test suite with nightly CI, fix dashboard Dockerfile #52

Merged
sharang merged 3 commits from feat/e2e-tests into main 2026-03-30 10:04:07 +00:00

3 Commits

Author SHA1 Message Date
Sharang Parnerkar
d418f8386f fix: exclude E2E tests from regular CI (no MongoDB available)
All checks were successful
CI / Check (pull_request) Successful in 10m0s
CI / Detect Changes (pull_request) Has been skipped
CI / Deploy Agent (pull_request) Has been skipped
CI / Deploy Dashboard (pull_request) Has been skipped
CI / Deploy Docs (pull_request) Has been skipped
CI / Deploy MCP (pull_request) Has been skipped
The E2E tests require MongoDB and only run in the nightly workflow.
Use --lib flag to run only unit tests in the regular CI check job.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 11:51:39 +02:00
Sharang Parnerkar
08a1ee2f00 fix: synthesise Contains edges and improve cross-file resolution in code graph
Some checks failed
CI / Check (pull_request) Failing after 12m5s
CI / Detect Changes (pull_request) Has been skipped
CI / Deploy Agent (pull_request) Has been skipped
CI / Deploy Dashboard (pull_request) Has been skipped
CI / Deploy Docs (pull_request) Has been skipped
CI / Deploy MCP (pull_request) Has been skipped
The code graph produced disconnected "islands" because:
1. No Contains edges were created between File/Module nodes and their
   children (functions, classes, structs), leaving file nodes isolated
2. Cross-file call resolution was too strict — calls like
   `crate::config::load` failed to resolve to `src/config.rs::load`

Fix:
- After resolving explicit parser edges, synthesise Contains edges by
  walking each node's qualified-name hierarchy and linking to the
  closest ancestor that exists in the node map
- Improve edge resolution with module-path matching: strip Rust
  prefixes (crate::, super::, self::) and try progressively shorter
  suffix matches for cross-file calls

Adds 4 new tests covering Contains edge synthesis, dedup with existing
edges, cross-file module path resolution, and parent qname lookup.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 11:12:38 +02:00
Sharang Parnerkar
5b07d38907 feat: add E2E test suite with nightly CI, fix dashboard Dockerfile
Some checks failed
CI / Check (pull_request) Failing after 9m4s
CI / Detect Changes (pull_request) Has been skipped
CI / Deploy Agent (pull_request) Has been skipped
CI / Deploy Dashboard (pull_request) Has been skipped
CI / Deploy Docs (pull_request) Has been skipped
CI / Deploy MCP (pull_request) Has been skipped
E2E Tests:
- 17 integration tests covering: health, repos CRUD, findings lifecycle,
  cascade delete (SAST + DAST + pentest), DAST targets, stats overview
- TestServer harness: spins up agent API on random port with isolated
  MongoDB database per test, auto-cleanup
- Added lib.rs to expose agent internals for integration tests
- Nightly CI workflow with MongoDB service container (3 AM UTC)

Tests verify:
- Repository add/list/delete + duplicate rejection + invalid ID handling
- Finding creation, filtering by severity/repo, status updates, bulk updates
- Cascade delete: repo deletion removes all DAST targets, pentest sessions,
  attack chain nodes, DAST findings, SAST findings, and SBOM entries
- DAST target CRUD and empty finding list
- Stats overview accuracy with zero and populated data

Also:
- Fix Dockerfile.dashboard: bump dioxus-cli 0.7.3 → 0.7.4 (compile fix)
- Fix clippy: allow new_without_default for pattern scanners

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 11:01:19 +02:00