Repository navigation
Description
Summary
The "Check for hardcoded credentials" CI step filters its grep output with grep -v '...example...'. grep output lines start with the file path, so every hit under ./examples/ (and any line that mentions "example") is dropped and never reported.
Where
.github/workflows/validate.yml:137-144(Check for hardcoded credentials)
Details
patterns='password\s*=\s*["\x27][^"\x27]+|api_key\s*=\s*["\x27][^"\x27]+|token\s*=\s*["\x27][A-Za-z0-9]+'
if grep -rPi "$patterns" --include='*.lua' ... . 2>/dev/null | grep -v 'YOUR_SESSION_COOKIE\|example\|placeholder\|mock'; thenThe exclusion applies to the whole output line, ./examples/<resource>/file.lua:NN:<match>, so the examples/ directory is excluded entirely.
Impact
examples/ holds the reference resources users are told to copy into their servers, and CLAUDE.md promises that "CI flags suspicious patterns". A credential committed there would pass CI.
Steps to reproduce
- Add
local api_key = "abcdefghij"to anyexamples/*/config.lua. - Run the step's command locally from the repo root.
- It prints "No hardcoded credentials found".
Suggested fix
Filter on the matched content rather than the whole line, for example use grep -o (or -rPion) to extract the match and then exclude placeholder values, or exclude specific allowlisted path:line entries. Alternatively replace the step with gitleaks.
Acceptance criteria
- A fake credential added to a file under
examples/fails the step. - Existing placeholder values (for example in skills docs) still pass, via a content-based or explicit allowlist.
Getting started
- Relevant files:
.github/workflows/validate.yml - How to run checks: there is no test suite yet; run the MCP server with
cd mcp-server && pip install -r requirements.txt && python server.py, and CI checks live in.github/workflows/validate.yml - Related docs:
CLAUDE.md(Key Conventions, "No hardcoded credentials")
Filed by repo-audit/full-audit at 701824d. Severity: medium. Effort: S. audit-key: ci|.github/workflows/validate.yml|Check for hardcoded credentials
Activity
TMHSDigital commentedon Nov 21, 2026
Fixed in be7d96e.
The step now extracts only the matched value, allows placeholder values, and prints path:line for hits without echoing values, so examples/ is checked.
Verified: Ran the step on the repo (passes) and on a fixture where a fake password under examples/ fails while placeholder values elsewhere pass.