validate-secrets.sh checked the placeholder allowlist regex against the whole line before running any secret-pattern regex. An unrelated placeholder-looking token anywhere on the line (e.g. "example" or "your-token-here" in a trailing comment) suppressed detection of a real credential earlier on the same line. Scope the allowlist check to the matched secret-candidate substring only, which the per-match re-check already did downstream but the whole-line pre-check short-circuited before it ever ran. Extend validate-secrets.bats with a case proving a real AWS-style key is still caught when a placeholder token sits elsewhere on the line. Regenerate the flat-mirror copy at plugins/core/skills/agentsmd-audit/scripts/validate-secrets.sh via scripts/sync-plugin-content.sh --all per ADR-0016.
tests/
Test files for scripts bundled with this skill.
Dependencies
Tests require bats-support and
bats-assert. The test files load
helpers from the repo root's tests/test_helper/.
From the repo root:
git clone https://github.com/bats-core/bats-support tests/test_helper/bats-support
git clone https://github.com/bats-core/bats-assert tests/test_helper/bats-assert
Run all tests for this skill (from the repo root):
bats plugins/core/.apm/skills/agentsmd-audit/tests/
Files
| File | Purpose |
|---|---|
validate-secrets.bats |
Bats test suite for scripts/validate-secrets.sh |
validate-structure.bats |
Bats test suite for scripts/validate-structure.sh |
validate-drift.bats |
Bats test suite for scripts/validate-drift.sh |