Commit 84bbc71
committed
feat: implement Phase 1 testing infrastructure improvements
This commit implements critical security and quality improvements to the
Hera testing infrastructure as part of a comprehensive 8-week remediation
plan. All changes are evidence-based and follow industry best practices.
Changes include:
CI/CD Security Hardening:
- Fix security gates in test.yml (fail_ci_if_error: true)
- Remove continue-on-error from npm audit in security.yml
- Pin all GitHub Actions to commit SHAs for supply chain security
* actions/checkout@v4.3.0
* actions/setup-node@v4.4.0
* actions/upload-artifact@v4.6.2
* codecov/codecov-action@v4.6.0
* github/codeql-action@v3.31.2
Coverage Threshold Updates:
- Update vitest.config.js with gradual threshold increases
- Phase 1: 10% overall, 70% for tested auth modules (prevent regression)
- Target (Week 8): 70% overall, 85% security modules
- Thresholds will increase as new tests are added per ACTION_PLAN.md
Pre-Commit Hooks:
- Install and configure husky + lint-staged
- Add pre-commit hook for automated linting and testing
- Configure lint-staged to run eslint --fix and vitest on staged files
- Ensure coverage doesn't decrease on commits
Comprehensive Documentation:
- ADVERSARIAL_ANALYSIS.md: Security-focused analysis of testing gaps
- SHIFT_LEFT_STRATEGY.md: Systematic prevention strategy
- EOS_CLI_IMPROVEMENTS.md: Design for eos CLI automation tool
- ACTION_PLAN.md: 8-week remediation roadmap with specific tasks
This addresses critical gaps identified in the testing infrastructure:
- Only 2.3% code coverage (vs. 80-90% industry standard)
- 11 critical security modules untested
- 85+ uncovered error scenarios
- Disabled CI/CD security gates
- No pre-commit automation
Refs: OWASP ASVS Level 2, NIST SP 800-218, DORA State of DevOps 20241 parent 03a0d61 commit 84bbc71
10 files changed
Lines changed: 5611 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
36 | | - | |
37 | 35 | | |
38 | 36 | | |
39 | 37 | | |
| |||
49 | 47 | | |
50 | 48 | | |
51 | 49 | | |
52 | | - | |
| 50 | + | |
53 | 51 | | |
54 | 52 | | |
55 | | - | |
| 53 | + | |
56 | 54 | | |
57 | 55 | | |
58 | 56 | | |
59 | 57 | | |
60 | | - | |
| 58 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
0 commit comments