dcg

Unleash

featureflags.unleash

Protects against destructive Unleash CLI and API operations.

  • 9blocking rules
  • 16safe patterns
  • 5Critical
  • 4High
~/.config/dcg/config.toml
[packs]
enabled = ["featureflags.unleash"]

Evaluated when a command contains unleash.

Blocking rules

Each rule ID is featureflags.unleash:<name>. Use it in allowlists and [policy.rules].

  1. unleash-api-delete-features

    Critical

    DELETE request to Unleash API removes feature toggles.

    Explanation
    API DELETE calls to features permanently remove toggles without archive recovery options. All strategies and configurations are lost immediately. Safer alternatives: - Use the Unleash CLI for confirmation prompts - Archive toggles instead of deleting - GET the toggle configuration first
  2. unleash-api-delete-projects

    Critical

    DELETE request to Unleash API removes projects.

    Explanation
    API DELETE calls to projects remove ALL toggles, strategies, and configurations within the project. This is the most destructive operation and cannot be undone. Safer alternatives: - Export project configuration completely - Use the Unleash UI for visibility - Archive toggles individually first
  3. unleash-environments-delete

    Critical

    unleash environments delete removes an environment.

    Explanation
    Deleting an environment removes all toggle configurations for that environment. API keys for this environment stop working. Applications will fail to fetch toggle states. Safer alternatives: - Export environment configuration - Disable toggles in the environment first - Rotate API keys before deletion
  4. unleash-features-delete

    Critical

    unleash features delete permanently removes a feature toggle. This cannot be undone.

    Explanation
    Deleting an Unleash feature toggle permanently removes it and all its strategies. SDKs will return the default value (typically false). Event history is preserved but the toggle cannot be recovered. Safer alternatives: - unleash features archive: Soft-delete with recovery - Disable the toggle in all environments first - Export toggle configuration before deletion
  5. unleash-projects-delete

    Critical

    unleash projects delete removes a project and all its feature toggles.

    Explanation
    Deleting a project removes ALL feature toggles, strategies, and environments within it. This is irreversible. All applications using toggles from this project will receive default values. Safer alternatives: - Export project configuration first - Archive toggles individually for recovery options - Migrate critical toggles to another project
  6. unleash-api-delete-generic

    High

    DELETE request to Unleash API can remove resources.

    Explanation
    Generic DELETE requests to the Unleash admin API can remove various resources including strategies, environments, users, and API keys. Review the specific endpoint before executing. Safer alternatives: - Verify the exact resource being deleted - Use the Unleash CLI or UI for better visibility - GET the resource first to confirm
  7. unleash-api-keys-delete

    High

    unleash api-keys delete removes an API key.

    Explanation
    Deleting an API key immediately revokes access for all SDKs using that key. Applications will fail to connect and receive toggle updates, falling back to cached or default values. Safer alternatives: - Create new API keys before deleting old ones - Update SDK configurations first - Use key rotation instead of deletion
  8. unleash-features-archive

    High

    unleash features archive soft-deletes a feature toggle.

    Explanation
    Archiving a toggle removes it from evaluation but allows recovery. SDKs will stop receiving the toggle and return default values. Archived toggles can be restored from the Unleash UI. Safer alternatives: - Disable the toggle before archiving - Verify no code paths depend on the toggle - Document the toggle's purpose before archiving
  9. unleash-strategies-delete

    High

    unleash strategies delete removes a custom strategy.

    Explanation
    Deleting a custom strategy breaks all toggles using it. Those toggles will fail to evaluate properly, potentially returning unexpected values or errors. Safer alternatives: - Check which toggles use this strategy - Migrate toggles to built-in strategies first - Create a replacement strategy before deleting

Safe patterns

Checked first. A command that matches one is never blocked by this pack.

  • unleash-features-list
  • unleash-features-get
  • unleash-features-create
  • unleash-features-update
  • unleash-features-enable
  • unleash-features-disable
  • unleash-projects-list
  • unleash-projects-get
  • unleash-projects-create
  • unleash-environments-list
  • unleash-environments-get
  • unleash-strategies-list
  • unleash-strategies-get
  • unleash-help
  • unleash-version
  • unleash-api-get