[CI/CD Assessment] CI/CD Pipelines and Integration Tests Gap Assessment #1140
Replies: 1 comment
-
|
🔮 The ancient spirits stir; the smoke test agent was here, and the omens are noted.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
📊 Current CI/CD Pipeline Status
The repository has a mature and layered CI/CD pipeline with 56 total GitHub Actions workflows spanning static analysis, unit tests, integration tests, security scanning, smoke testing, and AI-driven quality checks. Recent run data shows most pipelines healthy, with one notable active failure.
✅ Existing Quality Gates
The following checks currently run on pull requests:
Code Quality
lint.yml) — TypeScript linting, runs on all PRstest-integration.yml) — strict type checking viatsc --noEmitbuild.yml) — builds on Node 20 + 22 matrix, includes API proxy unit testspr-title.yml) — enforces Conventional Commits format with allowed scope listTesting
test-coverage.yml) — runs jest with coverage, comments on PRs, fails on regressiontest-integration-suite.yml) — 4 parallel job groups: domain/network, protocol/security, container ops, API proxytest-chroot.yml) — language support, package managers, procfs, edge casestest-examples.yml) — validates example shell scripts run end-to-endtest-action.yml) — validates the GitHub Action itself installs correctlySecurity
codeql.yml) — static analysis for JS/TS and GitHub Actions YAMLcontainer-scan.yml) — Trivy scans both squid and agent images, uploads SARIFdependency-audit.yml) — npm audit for main and docs-site packages, SARIF uploadsecurity-guard.md) — Claude-based review flags changes that weaken firewall security postureSmoke / E2E
🔍 Identified Gaps
🔴 High Priority
1. Integration Tests suite is currently failing
The
Integration Testsworkflow (test-integration-suite.yml) is actively failing in recent runs. This is the most critical gap: PRs may be merging while the primary integration suite is broken, reducing confidence in every merge.2. Unit test coverage thresholds are critically low
Coverage thresholds are set at only 30–38%, and the most critical production files are nearly untested:
cli.ts(entry point)docker-manager.ts(core orchestration)host-iptables.ts(security enforcement)A 0% threshold for
cli.tsmeans signal/error handling paths, cleanup logic, and CLI argument parsing are completely unvalidated by unit tests.3. Container scan does not run on code-only changes
container-scan.ymltriggers only onpaths: containers/**changes. If a code change insrc/modifies how containers are configured or introduces a misconfiguration, Trivy never runs. Additionally, when base images receive new CVEs between release cycles, there is no automated detection until the next containers/ commit.4. Shell scripts have no linting
The repository contains security-critical shell scripts (
containers/agent/setup-iptables.sh,containers/agent/entrypoint.sh,scripts/ci/cleanup.sh, etc.) that are not linted withshellcheck. Shell script bugs insetup-iptables.shcould silently break firewall rules without any CI signal.🟡 Medium Priority
5. Smoke tests are opt-in via emoji reaction on PRs
The main smoke tests (
smoke-claude.md,smoke-codex.md,smoke-copilot.md) require specific emoji reactions (👁️, ❤️, 🎉) to trigger on PRs. Without the reaction, these tests only run on a 12-hour schedule. PRs that change core container/proxy logic can merge without any human-triggered smoke test running.6. No secret scanning on PRs
While hourly
secret-diggerworkflows run on the main branch, there is no pre-merge secret scanning (e.g.,gitleaksortrufflehog) on pull requests. A credential accidentally committed in a PR would only be caught after merging to main.7. No performance/startup regression testing
AWF starts Docker containers and configures iptables rules as part of every invocation. There are no benchmarks or timing guards to detect startup time regressions. A slow container start could degrade UX for all users of the tool without any CI signal.
8.
test-integration.ymlfilename/name mismatchThe file
test-integration.ymlcontains a workflow namedTypeScript Type Check, whiletest-integration-suite.ymlcontainsIntegration Tests. This naming inconsistency makes CI status confusing and may cause required status checks to be misconfigured if branch protection rules reference workflow names vs file names.9. No mutation testing
Current coverage metrics measure line execution but not test quality. With only 38% line coverage and low thresholds, mutation testing (e.g., Stryker) would reveal whether the existing tests actually assert meaningful behavior or just execute code paths.
10. Build-test agentic workflows use external test repos
The
build-test-*.mdworkflows clone external test repositories (e.g.,Mossaka/gh-aw-firewall-test-node) via AI agents. If those repos become unavailable or change, CI silently degrades. There's no fallback or local fixture option.🟢 Low Priority
11. Documentation build not verified on PRs
deploy-docs.ymlonly builds the Astro docs site on pushes to main withdocs-site/**changes. There is no preview build or broken-link check for documentation PRs, so broken docs only surface after merging.12. No Node.js version compatibility matrix for integration tests
Unit tests run on Node 20 and 22 (matrix in
build.yml), but integration tests only run on Node 22. This means a Node 20 regression in container orchestration code would not be caught.13. No license compliance check
No automated license scanning (e.g.,
license-checker) verifies that new dependencies comply with the project's MIT license. A copyleft dependency introduced via a PR would not be detected.14. Coverage upload to external service missing
Coverage reports are generated and uploaded as GitHub Actions artifacts, but not uploaded to Codecov, Coveralls, or similar. This means there's no coverage badge, no historical trend tracking, and no PR-level coverage diff visible in external tooling.
15. No Dockerfile linting
containers/agent/Dockerfileandcontainers/squid/Dockerfileare not linted withhadolint. Best-practice violations (e.g.,apt-getwithout--no-install-recommends,ADDinstead ofCOPY) go undetected.📋 Actionable Recommendations
test-integration-suite.ymlmatching pattern intest-chroot.ymlshellcheckstep tobuild.ymlor a newlint-scripts.ymlworkflowlines: 50,functions: 50,branches: 40as a first step; requirecli.tsanddocker-manager.tscoverage > 50%paths:filter fromcontainer-scan.ymlor add a scheduled weekly scan without path filteringgitleaks/gitleaks-actionto a PR-gated workflowsrc/**andcontainers/**path changestest-integration.ymltotype-check.ymlto match itsname: TypeScript Type Checkhadolinttobuild.ymlor a new step scanningcontainers/*/Dockerfiledocs-sitebuild step (without deploy)npx license-checker --failOn GPLtodependency-audit.yml📈 Metrics Summary
Critical stat:
cli.tsat 0% unit coverage anddocker-manager.tsat 18% unit coverage — these two files implement all container lifecycle, signal handling, and cleanup logic.Beta Was this translation helpful? Give feedback.
All reactions