Skip to content

Add confirmation prompt for URL-based extension installs#2745

Merged
mnriem merged 1 commit into
github:mainfrom
mnriem:feat/2744-url-install-confirmation
May 28, 2026
Merged

Add confirmation prompt for URL-based extension installs#2745
mnriem merged 1 commit into
github:mainfrom
mnriem:feat/2744-url-install-confirmation

Conversation

@mnriem
Copy link
Copy Markdown
Collaborator

@mnriem mnriem commented May 28, 2026

Closes #2744

Summary

specify extension add <name> --from <url> bypasses the catalog trust boundary. The user's configured extension catalogs are the primary mechanism for establishing trust in extension sources — installing from an arbitrary URL sidesteps that entirely.

Previously the CLI printed a yellow warning and proceeded silently. This PR adds a default-deny confirmation prompt so the user must consciously acknowledge they are leaving the trusted catalog path.

Changes

src/specify_cli/__init__.py — Replace the silent warning with:

  • A yellow-bordered Rich panel titled "⚠ Untrusted Source"
  • The URL being installed from
  • A reminder to only install from trusted sources
  • A typer.confirm() prompt defaulting to No ([y/N])

Context

Remote install path Protection
--from <url> HTTPS enforced + yellow panel + default-deny prompt (new)
Catalog download User explicitly configured catalogs; install_allowed policy enforced
ZIP extraction (both paths) Zip Slip protection — all member paths validated before extraction

The catalog path doesn't need a prompt because the user already established trust by adding that catalog to their config.

Display a yellow warning panel and default-deny [y/N] prompt when
installing extensions via --from <url>, since this bypasses the
catalog trust boundary.
Copilot AI review requested due to automatic review settings May 28, 2026 19:42
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@mnriem mnriem merged commit b48b223 into github:main May 28, 2026
11 checks passed
@mnriem mnriem deleted the feat/2744-url-install-confirmation branch May 28, 2026 19:49
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 confirmation prompt for URL-based extension installs

2 participants