Skip to content

Add CLI read-only mode for safe request runs#304

Open
jongio wants to merge 1 commit into
mainfrom
idea/cli-read-only-mode
Open

Add CLI read-only mode for safe request runs#304
jongio wants to merge 1 commit into
mainfrom
idea/cli-read-only-mode

Conversation

@jongio

@jongio jongio commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds a global --read-only flag for CLI request commands.
  • Allows GET, HEAD, and OPTIONS while blocking mutating methods before request setup.
  • Carries the flag through config and covers allowed and blocked paths with tests.

Validation

  • go test -v -short ./src/...
  • go build ./src/cmd/rest
  • golangci-lint run --timeout=5m --new-from-rev origin/main ./src/...

Closes #300

Closes #300

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@jongio jongio added the idea Feature idea from the idea pipeline label Jul 19, 2026
@jongio jongio self-assigned this Jul 19, 2026
github-actions Bot added a commit that referenced this pull request Jul 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Website Preview

Your PR preview is ready!

📎 Preview URL: https://jongio.github.io/azd-rest/pr/304/

This preview will be automatically cleaned up when the PR is closed.

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Test This PR

A preview build (0.5.0-pr304) is ready for testing!

One-Line Install (Recommended)

PowerShell (Windows):

iex "& { $(irm https://raw.githubusercontent.com/jongio/azd-rest/main/scripts/install-pr.ps1) } -PrNumber 304 -Version 0.5.0-pr304"

Bash (macOS/Linux):

curl -fsSL https://raw.githubusercontent.com/jongio/azd-rest/main/scripts/install-pr.sh | bash -s 304 0.5.0-pr304

Uninstall

PowerShell (Windows):

iex "& { $(irm https://raw.githubusercontent.com/jongio/azd-rest/main/scripts/uninstall-pr.ps1) } -PrNumber 304"

Bash (macOS/Linux):

curl -fsSL https://raw.githubusercontent.com/jongio/azd-rest/main/scripts/uninstall-pr.sh | bash -s 304

Build Info:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

idea Feature idea from the idea pipeline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add CLI read-only mode for safe request runs

1 participant