Skip to content

Feature/new providers - #76

Merged
JSChronicles merged 31 commits into
mainfrom
feature/new_providers
Aug 25, 2026
Merged

Feature/new providers#76
JSChronicles merged 31 commits into
mainfrom
feature/new_providers

Conversation

@JSChronicles

Copy link
Copy Markdown
Owner

Description

Expands Anvil beyond cloud platforms with first-class Cloudflare, Datadog, GitLab, and PagerDuty providers. Each provider includes authentication, target resolution, session management, execution planning, built-in tasks, optional dependencies, examples, and comprehensive tests.

  • Add Cloudflare account and zone targeting with member, zone, and DNS record tasks.
  • Add Datadog organization support for dashboards, monitors, users, and user disabling.
  • Add GitLab group/project discovery, security auditing, vulnerability reporting, code search, and membership management.
  • Add PagerDuty account support for users, teams, services, escalation policies, and user removal.
  • Expand GitHub with organization member/team inventory and removal tasks.
  • Introduce reusable provider profiles through ~/.anvil/config.toml or ANVIL_CONFIG.
  • Centralize secret fingerprinting and shared provider-task validation/serialization helpers.
  • Add dry-run action recording and partial failure results to destructive tasks.
  • Add provider-specific installation extras plus the anvil[all] aggregate extra.
  • Add a root-level anvil --version option and reduce noisy provider SDK logging.
  • Add simple, multi-target, include/exclude, and advanced examples for every new provider.
  • Update README and agent guidance for the expanded provider and task contracts.

Task standardization and compatibility notes

  • Rename remove_disabled_idc_users to remove_idc_user.
    • Supports user ID, username, email, and enabled/disabled status selectors.
    • Supports status-only bulk cleanup, bounded concurrent deletion, dry-run, and partial failure reporting.
  • Rename GitHub alert tasks from plural to singular:
    • list_code_scanning_alert
    • list_dependabot_alert
    • list_secret_scanning_alert
  • GitHub profiles now use the shared Anvil configuration file instead of the previous GitHub-specific profile configuration.
  • GitHub organization-owned tasks must run on dedicated organization targets.

Checklist

  • Python format, lint, and tests (ruff and pytest) were successful.
  • Pre-commit hooks passed locally.
  • Documentation updated if needed.
  • Unit tests added or updated.

Add a provider-neutral profile loader backed by ~/.anvil/config.toml,
with support for overriding the path through ANVIL_CONFIG.

Migrate GitHub authentication profiles from the GitHub-specific
ANVIL_GITHUB_CONFIG and ~/.github/config mechanism to provider-namespaced
Anvil profiles under [providers.github.<profile>].

Keep profile option validation provider-owned, preserve named and default
GitHub profile behavior, and update CLI diagnostics to report the resolved
Anvil configuration file.
Add Cloudflare as a first-class Anvil provider with account- and zone-scoped execution modes.

Implement provider registration, option validation, authentication,
session creation, deterministic target discovery, execution planning,
and runtime integration using the standard provider contracts.

Support API token authentication and legacy API key/email credentials without introducing cloud-specific hierarchy assumptions into Anvil core. Add the optional Cloudflare SDK dependency and provider documentation.
Add Datadog as a first-class Anvil provider using organization-scoped execution.

Implement provider registration, option validation, API and application key authentication, site-aware client configuration, session creation, execution planning, and runtime integration through the standard Anvil provider contracts.
Add PagerDuty as a first-class Anvil provider using account-scoped
execution.

Implement provider registration, option validation, token
authentication, REST API session creation, execution planning, and
runtime integration through the normal Anvil provider contracts.
Add GitLab as a first-class Anvil provider with group- and
project-scoped execution modes.

Implement provider registration, option validation, authentication,
session creation, deterministic hierarchy discovery, target
resolution, execution planning, and runtime integration using the
standard provider contracts.
Move secret fingerprint generation into the shared provider layer so
all providers can build credential-sensitive cache identities without
duplicating hashing behavior.
Add ~/.anvil/config.toml profile support for Cloudflare, Datadog, GitLab, and PagerDuty.
Add initial stock tasks for Cloudflare, Datadog, GitLab, and PagerDuty.
- Add provider inventory and membership-management tasks using singular resource names and plural array selectors.

- Add GitHub organization member, team, and team-member operations
- GitLab membership operations
- Cloudflare account-member operations
- Datadog user management
- PagerDuty user inventory and removal.

- Rename the Identity Center cleanup task to remove_idc_user and support filtering by multiple user IDs, usernames, or emails, status-only bulk cleanup, or the intersection of users and status.
Update the Anvil task-builder skill with naming, selector, destructive-task, and breaking-change conventions.
Reduce or plan to reduce pieces or information to simplify the flow. People can extrapolate certain areas
Add simple, multi-target, include/exclude, and advanced examples forCloudflare, Datadog, GitLab, and PagerDuty.

Normalize YAML indentation across the examples directory and renumber the AWS cleanup workflow to keep each provider series contiguous.

Update the Anvil task-builder skill to document current package-based task,processor, and provider entry points without maintaining a fixed provider allowlist.

Expand example tests to verify each new provider has four numbered examples, all configurations load successfully, and referenced tasks resolve for their configured provider.
Anvil's SDK-logger suppression list (added for azure/github/google) missed httpx, which backs the Cloudflare SDK's HTTP client. Every Cloudflare API call was logging a raw "HTTP Request: GET ..." line at INFO, and the SDK's pydantic models also emit a benign UserWarning  "Pydantic serializer warnings: PydanticSerializationUnexpectedValue") for a known upstream PolicyResourceGroupScope typing mismatch.
- stop GitHub member and team pagination at max_results
- apply Datadog monitor limits through the API page_size parameter
- cache GitLab project lookups within target-scoped sessions
- add regression coverage for bounded iteration and project reuse
- Adds --version support to the CLI using installed package metadata and includes regression coverage for stable output and a successful exit code.

- Also updates the Python best-practices skill to require and document root-level version flags for installable console applications.
- Adds an all package extra that installs every optional provider dependency in one command.

- Updates the README with installation and source-sync examples for using the new all extra.
Comment thread src/anvil/providers/base.py Fixed
- Replace unkeyed SHA-256 secret fingerprints with HMAC-SHA256 using a random process-local key.

- Update provider base tests to verify normalization, stability, output format, and distinct fingerprints without depending on a fixed digest.
Comment thread src/anvil/providers/base.py Fixed
Comment thread src/anvil/providers/base.py Dismissed
@JSChronicles
JSChronicles merged commit d3c4d69 into main Aug 25, 2026
8 checks passed
@JSChronicles
JSChronicles deleted the feature/new_providers branch August 25, 2026 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants