Skip to content

Add vendor validators for custom patterns - #44

Open
theztefan wants to merge 1 commit into
mainfrom
theztefan/validators-custom-patterns
Open

theztefan wants to merge 1 commit into
mainfrom
theztefan/validators-custom-patterns

Conversation

@theztefan

Copy link
Copy Markdown
Collaborator

Adds validators for the vendor patterns in #43.

  • Add Flickr, ClickUp, Vercel, Datadog, LaunchDarkly, PagerDuty, and BrowserStack checks.
  • Add mocked tests and document the new validators and site settings.

Tests: uv run python -m pytest tests/ -q --tb=short (206 passed).

Closes #43

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are recorded for the new vendor validators and token aliases.

No open issues 🎉

What changed in this PR

Adds seven vendor integrations to validate secrets detected by the custom patterns in #43, with aliases for Vercel CLI and LaunchDarkly access tokens.

Changes:

  • Adds read-only validation requests with conservative valid/invalid/unknown outcomes and allowlisted regional hosts.
  • Introduces isolated HTTP handling that disables redirects and avoids logging credentials or response bodies.
  • Adds validator, registry, and CLI coverage; replaces existing live-request tests with mocks and documents configuration.
File Description
tests/​test_vendor_validators.py Tests request contracts, responses, regional settings, and credential protection.
tests/​test_vendor_cli.py Tests validator listing and CLI validation.
tests/​test_validators.py Replaces live requests with mocks and specific assertions.
tests/​test_registry.py Verifies new validator names and metadata.
src/​validate_secrets/​validators/​vercel_cli_token.py Reuses Vercel validation for CLI tokens.
src/​validate_secrets/​validators/​vercel_access_token.py Validates Vercel tokens through the user endpoint.
src/​validate_secrets/​validators/​pagerduty_api_key.py Checks PagerDuty abilities in one configured region.
src/​validate_secrets/​validators/​launchdarkly_api_key.py Checks LaunchDarkly API-token identity on an allowed host.
src/​validate_secrets/​validators/​launchdarkly_access_token.py Adds the LaunchDarkly access-token alias.
src/​validate_secrets/​validators/​flickr_api_key.py Checks Flickr keys using form POST and documented error handling.
src/​validate_secrets/​validators/​datadog_api_key.py Validates Datadog keys against one configured site.
src/​validate_secrets/​validators/​clickup_api_key.py Checks ClickUp keys through the authorized-user endpoint.
src/​validate_secrets/​validators/​browserstack_token_url.py Parses credentials and checks BrowserStack Automate access.
src/​validate_secrets/​validators/​_http.py Provides isolated requests, input checks, and credential-safe logging.
README.md Documents new validators, regional settings, and limitations.
docs/​development.md Updates offline testing guidance.

Review effort: Balanced

@theztefan
theztefan requested a review from felickz November 5, 2026 09:20
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.

Add validators for vendor secrets from custom patterns

2 participants