Skip to content

feat: add lint.exclude_paths and secrets.allowlist config#8

Merged
Kodaxadev merged 1 commit into
mainfrom
feat/exclude-paths-and-secrets-allowlist
May 20, 2026
Merged

feat: add lint.exclude_paths and secrets.allowlist config#8
Kodaxadev merged 1 commit into
mainfrom
feat/exclude-paths-and-secrets-allowlist

Conversation

@Kodaxadev
Copy link
Copy Markdown
Owner

Summary

  • Adds lint.exclude_paths config field — path prefixes excluded from file-length checks
  • Adds secrets.allowlist config field — path prefixes excluded from credential scanning
  • Adds --config=<path> CLI flag to governance-report.js for external config files
  • Adds config input to action.yml so consuming repos can provide their own codewarden.json
  • Documents both fields in CONFIGURE.md with examples

Motivation

When running Code-Warden as a CI gate on real repos, the governance report fails on:

  • Documentation files that legitimately exceed 400 lines (design docs, research spikes, READMEs)
  • Localhost development database URLs that match the credential regex but aren't real secrets

Without exclude support, repos must either weaken global thresholds or accept permanent CI failures on known-safe paths.

Usage

{
  "thresholds": { "max_file_length": 400 },
  "lint": {
    "exclude_paths": ["Documents/", "Documents/Obsolete/"]
  },
  "secrets": {
    "allowlist": ["scripts/indexer.config.toml", "indexer/src/api_auth.rs"]
  }
}

In GitHub Actions:

- uses: Kodaxadev/Code-Warden@v3.4.0
  with:
    config: codewarden.json
    sarif: "true"

Test plan

  • All 32 existing tests pass unchanged
  • Config loader returns empty arrays by default (backward-compatible)
  • Path matching uses prefix comparison with / normalization

🤖 Generated with Claude Code

Adds two new config fields that let consuming repos control which paths
are checked by the governance report:

- lint.exclude_paths: path prefixes excluded from file-length checks
  (e.g. docs directories, generated files, vendored code)
- secrets.allowlist: path prefixes excluded from credential scanning
  (e.g. files with known-safe localhost dev database URLs)

Also adds --config=<path> CLI flag to governance-report.js and a
config input to action.yml so repos can provide their own
codewarden.json without modifying the skill installation.

All 32 existing tests pass unchanged.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Kodaxadev Kodaxadev merged commit 912d86c into main May 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant