Skip to content

Commit 5bec4e6

Browse files
Merge pull request #287 from PaystackHQ/security/add-secret-scanner-config
security: Add GitHub secret scanning config (assessment)
2 parents 84312d9 + d04161f commit 5bec4e6

2 files changed

Lines changed: 173 additions & 0 deletions

File tree

.github/secret_scanning.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
paths-ignore: []

docs/memory/secret-scanning.md

Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
# Secret Scanning Assessment - Test Path Patterns
2+
3+
**Date:** 2026-03-05
4+
**Repository:** nigerialogos
5+
**Branch:** security/add-secret-scanner-config
6+
7+
## Summary
8+
9+
This repository currently has **NO test infrastructure** configured. After a comprehensive assessment of the codebase, no test directories, test files, or test-related patterns were found.
10+
11+
## Repository Overview
12+
13+
- **Tech Stack:** Node.js (v20+), Vite, vanilla JavaScript, SCSS
14+
- **Project Type:** Static website for Nigerian company logos
15+
- **Test Framework:** None configured (package.json test script returns error)
16+
- **CI/CD:** GitHub Actions with CodeQL analysis only
17+
18+
## Directory Structure
19+
20+
```
21+
.
22+
├── .github/workflows/ (CI/CD workflows)
23+
├── .husky/ (Git hooks)
24+
├── public/ (Static assets and logos)
25+
│ ├── images/
26+
│ └── logos/
27+
├── src/
28+
│ ├── js/ (JavaScript modules)
29+
│ └── scss/ (Sass stylesheets)
30+
├── index.html
31+
├── main.js
32+
├── package.json
33+
└── vite.config.js
34+
```
35+
36+
## Assessment Findings
37+
38+
### Test Directories - None Found
39+
40+
Searched for the following directory patterns:
41+
-`test/`
42+
-`tests/`
43+
-`__tests__/`
44+
-`spec/`
45+
-`specs/`
46+
-`e2e/`
47+
-`cypress/`
48+
-`playwright/`
49+
-`fixtures/`
50+
-`__fixtures__/`
51+
-`mocks/`
52+
-`__mocks__/`
53+
-`stubs/`
54+
-`testdata/`
55+
-`test-data/`
56+
-`seed/`
57+
-`seeds/`
58+
-`factories/`
59+
60+
### Test Files - None Found
61+
62+
Searched for the following file patterns:
63+
-`*.test.js`
64+
-`*.test.ts`
65+
-`*.test.jsx`
66+
-`*.test.tsx`
67+
-`*.spec.js`
68+
-`*.spec.ts`
69+
-`*.spec.jsx`
70+
-`*.spec.tsx`
71+
-`*.spec.rb`
72+
-`*.test.py`
73+
-`*_test.go`
74+
-`*_spec.rb`
75+
76+
### Mobile/Android Test Paths - Not Applicable
77+
78+
This is a web frontend project, not a mobile/Android app.
79+
-`src/test/**`
80+
-`src/androidTest/**`
81+
-`src/testDebug/**`
82+
83+
### Test Configuration Files - None Found
84+
85+
- ❌ No jest.config.js
86+
- ❌ No vitest.config.ts
87+
- ❌ No playwright.config.ts
88+
- ❌ No cypress.config.js
89+
- ❌ No test configuration detected
90+
91+
### Name Collision Check
92+
93+
Verified that no non-test directories or files would be accidentally matched by test patterns:
94+
- ✅ No directories with names like "testament", "protest", "contest"
95+
- ✅ No risk of false exclusions from test patterns
96+
97+
## Recommendation
98+
99+
**Empty `.github/secret_scanning.yml` configuration created.**
100+
101+
Since this repository has no test infrastructure:
102+
1. There are no test fixtures, mock credentials, or seed data to exclude
103+
2. All source code should be scanned for secrets without exclusions
104+
3. An empty `paths-ignore: []` list correctly indicates no exclusions
105+
4. When test infrastructure is added in the future, this configuration should be updated
106+
107+
## Future Considerations
108+
109+
If test infrastructure is added to this repository, consider the following:
110+
111+
1. **If Vitest/Jest is added:**
112+
- Exclude patterns: `**/__tests__/**`, `**/*.test.js`, `**/*.spec.js`
113+
114+
2. **If E2E testing (Playwright/Cypress) is added:**
115+
- Exclude patterns: `**/e2e/**`, `**/cypress/**`, `**/playwright/**`
116+
- Exclude fixtures: `**/fixtures/**`, `**/test-data/**`
117+
118+
3. **If mock/seed data is added:**
119+
- Exclude patterns: `**/__mocks__/**`, `**/seeds/**`, `**/factories/**`
120+
121+
4. **General best practices:**
122+
- Only exclude paths that contain test fixtures or mock credentials
123+
- Never exclude .env files or documentation
124+
- Be specific with patterns to avoid accidental exclusions
125+
- Review exclusions regularly as the codebase evolves
126+
127+
## Assessment Methodology
128+
129+
This assessment was conducted using:
130+
1. Directory structure inspection via `ls` and `find` commands
131+
2. Pattern matching searches for all common test directory names
132+
3. Pattern matching searches for all common test file naming conventions
133+
4. Review of package.json for test framework configuration
134+
5. Verification of no name collisions with legitimate source directories
135+
136+
---
137+
138+
## Implementation
139+
140+
**Date Implemented:** 2026-03-05
141+
**File Created:** `.github/secret_scanning.yml`
142+
143+
### Configuration
144+
145+
```yaml
146+
paths-ignore: []
147+
```
148+
149+
### Justification
150+
151+
An empty `paths-ignore` list was intentionally chosen because:
152+
153+
1. ✅ **No test directories exist** - Comprehensive search found zero test infrastructure
154+
2. ✅ **No test files exist** - No `*.test.*` or `*.spec.*` files in the repository
155+
3. ✅ **No mock/fixture data** - No seed data, factories, or mock directories
156+
4. ✅ **Follows best practices** - Empty list is correct for repos with no tests, prevents over-exclusion
157+
5. ✅ **Maximum security** - All files will be scanned; no false negatives from overly broad patterns
158+
159+
### Pattern Rules Applied
160+
161+
- ❌ Did not add speculative patterns (no `test/**`, no `**/__tests__/**`)
162+
- ❌ Did not use broad wildcards (no `**/*test*/**`, no partial matches)
163+
- ❌ Did not exclude config files (no `*.config.*` patterns)
164+
- ❌ Did not exclude documentation or .env files
165+
- ✅ Created minimal, accurate configuration matching actual repo structure
166+
167+
---
168+
169+
**Assessment Status:** Complete ✅
170+
**Implementation Status:** Complete ✅
171+
**Action Required:** Commit and push configuration
172+
**Next Steps:** Convert draft PR to ready for review

0 commit comments

Comments
 (0)