Skip to content

Commit e805a58

Browse files
committed
ci: add GitHub Actions workflow with tests + secret scanning
- Runs all 202 tests across 6 suites on push/PR - detect-secrets scans for leaked secrets against audited baseline - Node.js 22.x, ubuntu-latest runner - Includes package-lock.json for npm ci
1 parent c46f9d0 commit e805a58

3 files changed

Lines changed: 1675 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- uses: actions/setup-node@v4
16+
with:
17+
node-version: "22"
18+
19+
- name: Install slack-bridge dependencies
20+
run: cd slack-bridge && npm ci
21+
22+
- name: Test — bridge security (71 tests)
23+
run: cd slack-bridge && node --test security.test.mjs
24+
25+
- name: Test — tool-guard (60 tests)
26+
run: cd pi/extensions && node --test tool-guard.test.mjs
27+
28+
- name: Test — extension scanner (15 tests)
29+
run: cd bin && node --test scan-extensions.test.mjs
30+
31+
- name: Test — safe-bash wrapper (24 tests)
32+
run: cd bin && bash hornet-safe-bash.test.sh
33+
34+
- name: Test — log redaction (11 tests)
35+
run: cd bin && bash redact-logs.test.sh
36+
37+
- name: Test — security audit (21 tests)
38+
run: cd bin && bash security-audit.test.sh
39+
40+
secret-scan:
41+
runs-on: ubuntu-latest
42+
steps:
43+
- uses: actions/checkout@v4
44+
45+
- uses: actions/setup-python@v5
46+
with:
47+
python-version: "3.12"
48+
49+
- name: Install detect-secrets
50+
run: pip install detect-secrets
51+
52+
- name: Check for new secrets
53+
run: |
54+
# Scan the repo and compare against the audited baseline.
55+
# Fails if any NEW secrets are found that aren't in the baseline.
56+
detect-secrets scan \
57+
--baseline .secrets.baseline \
58+
--exclude-files 'node_modules/.*' \
59+
--exclude-files '\.git/.*' \
60+
--exclude-files 'package-lock\.json'
61+
62+
# Verify no unaudited secrets remain
63+
if detect-secrets audit --report --baseline .secrets.baseline 2>&1 | grep -q 'Unaudited'; then
64+
echo "❌ Unaudited secrets found — run: detect-secrets audit .secrets.baseline"
65+
exit 1
66+
fi

.secrets.baseline

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
{
2+
"version": "1.5.0",
3+
"plugins_used": [
4+
{
5+
"name": "ArtifactoryDetector"
6+
},
7+
{
8+
"name": "AWSKeyDetector"
9+
},
10+
{
11+
"name": "AzureStorageKeyDetector"
12+
},
13+
{
14+
"name": "Base64HighEntropyString",
15+
"limit": 4.5
16+
},
17+
{
18+
"name": "BasicAuthDetector"
19+
},
20+
{
21+
"name": "CloudantDetector"
22+
},
23+
{
24+
"name": "DiscordBotTokenDetector"
25+
},
26+
{
27+
"name": "GitHubTokenDetector"
28+
},
29+
{
30+
"name": "GitLabTokenDetector"
31+
},
32+
{
33+
"name": "HexHighEntropyString",
34+
"limit": 3.0
35+
},
36+
{
37+
"name": "IbmCloudIamDetector"
38+
},
39+
{
40+
"name": "IbmCosHmacDetector"
41+
},
42+
{
43+
"name": "IPPublicDetector"
44+
},
45+
{
46+
"name": "JwtTokenDetector"
47+
},
48+
{
49+
"name": "KeywordDetector",
50+
"keyword_exclude": ""
51+
},
52+
{
53+
"name": "MailchimpDetector"
54+
},
55+
{
56+
"name": "NpmDetector"
57+
},
58+
{
59+
"name": "OpenAIDetector"
60+
},
61+
{
62+
"name": "PrivateKeyDetector"
63+
},
64+
{
65+
"name": "PypiTokenDetector"
66+
},
67+
{
68+
"name": "SendGridDetector"
69+
},
70+
{
71+
"name": "SlackDetector"
72+
},
73+
{
74+
"name": "SoftlayerDetector"
75+
},
76+
{
77+
"name": "SquareOAuthDetector"
78+
},
79+
{
80+
"name": "StripeDetector"
81+
},
82+
{
83+
"name": "TelegramBotTokenDetector"
84+
},
85+
{
86+
"name": "TwilioKeyDetector"
87+
}
88+
],
89+
"filters_used": [
90+
{
91+
"path": "detect_secrets.filters.allowlist.is_line_allowlisted"
92+
},
93+
{
94+
"path": "detect_secrets.filters.common.is_ignored_due_to_verification_policies",
95+
"min_level": 2
96+
},
97+
{
98+
"path": "detect_secrets.filters.heuristic.is_indirect_reference"
99+
},
100+
{
101+
"path": "detect_secrets.filters.heuristic.is_likely_id_string"
102+
},
103+
{
104+
"path": "detect_secrets.filters.heuristic.is_lock_file"
105+
},
106+
{
107+
"path": "detect_secrets.filters.heuristic.is_not_alphanumeric_string"
108+
},
109+
{
110+
"path": "detect_secrets.filters.heuristic.is_potential_uuid"
111+
},
112+
{
113+
"path": "detect_secrets.filters.heuristic.is_prefixed_with_dollar_sign"
114+
},
115+
{
116+
"path": "detect_secrets.filters.heuristic.is_sequential_string"
117+
},
118+
{
119+
"path": "detect_secrets.filters.heuristic.is_swagger_file"
120+
},
121+
{
122+
"path": "detect_secrets.filters.heuristic.is_templated_secret"
123+
},
124+
{
125+
"path": "detect_secrets.filters.regex.should_exclude_file",
126+
"pattern": [
127+
"node_modules/.*",
128+
"\\.git/.*",
129+
"package-lock\\.json",
130+
".*\\.test\\.(mjs|sh)$"
131+
]
132+
}
133+
],
134+
"results": {
135+
"pi/extensions/zen-provider.ts": [
136+
{
137+
"type": "Secret Keyword",
138+
"filename": "pi/extensions/zen-provider.ts",
139+
"hashed_secret": "df6e0ac13c2e4889d47c4dfa0ace314e8f96eb9e",
140+
"is_verified": false,
141+
"line_number": 6,
142+
"is_secret": false
143+
}
144+
]
145+
},
146+
"generated_at": "2026-02-16T02:13:49Z"
147+
}

0 commit comments

Comments
 (0)