Repository navigation
Releases
Releases · bgs113/azpim
v1.3.0
Immutable
release. Only release title and notes can be modified.
Added
azpim activate --preset <name>activates a named set of roles at once, read frompresets.tomlin azpim's config directory. azpim looks up every role before activating any, skips roles that are already active, and prints one row per role. See Presets.--sortand--reverseoneligible,activeandrequests.--sorttakes one or more columns, comma-separated, each optionally followed by:desc, e.g.azpim requests --sort status,requested:desc. An unknown key suggests the closest valid one, and shell completion suggests the keys.
Changed
eligible,activeandrequestsare sorted by default, so rows no longer come out in a different order from one run to the next.eligiblesorts by role then scope,activeby role then resource, andrequestsnewest first. Both table and JSON output use the same order. The role pickers inactivate,deactivateandextenduse the same order.
v1.2.3
Immutable
release. Only release title and notes can be modified.
Changed
- Bump
github.com/Azure/azure-sdk-for-go/sdk/azcoreto v1.23.2, which fixes parsing RFC 7231 dates to always use the GMT zone. - Release builds use the GoReleaser version pinned in
tools/goreleaser/go.mod, which Dependabot keeps current, instead of whichever v2 release was newest at release time. golangci-lint, govulncheck and actionlint are pinned the same way, each in its own module undertools/, and run withgo tool. - CI audits the GitHub Actions workflows with zizmor, and its findings appear in code scanning.
Removed
make release. Releases run only in CI, which signs and attests them.make snapshotstill builds release artifacts locally.- gitleaks from CI. GitHub secret scanning and push protection cover it.
Security
- Workflow checkouts no longer save the GitHub token in the git config, and release builds no longer restore the Go build cache, so a poisoned cache can't reach signed release artifacts. zizmor found both.
v1.2.2
Immutable
release. Only release title and notes can be modified.
Fixed
- Prompts on dark terminals now use Catppuccin Mocha, matching the spinner. Before, they always used the light Latte flavor because huh never checked the terminal's background color.
v1.2.1
Immutable
release. Only release title and notes can be modified.
Changed
- The spinner now uses Catppuccin colors to match the prompts (Latte on light terminals, Mocha on dark) instead of huh's default pink.
v1.2.0
Immutable
release. Only release title and notes can be modified.
Added
- When you answered any prompts,
activate,extendanddeactivateask you to confirm the request before sending it. Runs driven entirely by flags,--dry-runand--validate-onlydon't ask. ACCESSIBLE=1switches to plain line-based prompts: a numbered list to pick from and typed answers, for screen readers or if you prefer them to the interactive UI.- A spinner on stderr while azpim signs in, fetches assignments or reads a role's policy, shown only when stdin and stderr are terminals (not with
ACCESSIBLE=1orTERM=dumb). Ctrl-C while it spins exits with status 130. - Requests that only read from Azure time out: each attempt after 30 seconds, retried up to 3 times, so one Azure never answers fails after about two minutes with
Azure didn't respond …instead of hanging. Activating, extending and deactivating are exempt, so a slow request is never resent as a duplicate. - Every command's
--helpnow ends with links to the documentation and the issue tracker.
Changed
- Interactive prompts now use huh v2 instead of the unmaintained promptui. Press
/to filter the role picker. Ctrl-C cancels quietly, exiting with status 130 instead of printingError: selection cancelled. Prompts draw on stderr, so-o jsonoutput stays clean. Each answer stays on screen after you press Enter, and picker columns line up however long the role names are. - When stdin isn't a terminal, azpim no longer tries to prompt. It exits with an error naming the missing flag, e.g.
--role is required when not running in a terminal. deactivate --allasks for confirmation with the same prompts. Without a terminal it now fails with--yes is required when not running in a terminalinstead of silently deactivating nothing.- Tables from
eligible,activeandrequestsare drawn with Lip Gloss v2 instead of tablewriter. They look the same, and tablewriter and eight modules only it used are gone. In a terminal too narrow for a table, long cells now wrap within their column, at word boundaries, instead of the terminal breaking whole lines; piped output still has one row per line. - When
eligible,activeorrequestsfind nothing, the table output now writes nothing to stdout and prints the message (No active assignments found.and so on) on stderr; the exit status is still 0 and-o jsonstill prints[]. Scripts that matched that message on stdout should check for empty output instead. azpim --versionandazpim versionnow print the same line,azpim 1.2.0: the program name, then the version without av(it wasazpim version v1.2.0andv1.2.0). The version is everything after the last space, per the GNU--versionconvention.
Removed
--humanoneligibleandrequests, where it never did anything (neither has a time-remaining column). It still works onactive. Scripts that pass it to those commands now getunknown flag: --human.
Fixed
- Commands now reject unexpected arguments instead of silently ignoring them. For example,
azpim activate Ownerused to ignoreOwnerand open the role picker; it now fails withunknown command "Owner"(use--role Owner). - Table colors now respect
NO_COLORand are only used when the output itself is a terminal.
v1.1.2
Immutable
release. Only release title and notes can be modified.
Added
- The Homebrew formula now installs bash, zsh and fish completions (generated from
azpim completion).
v1.1.1
Immutable
release. Only release title and notes can be modified.
Added
- Release archives and container images now have GitHub artifact attestations (SLSA v1.0 Build Level 2 provenance), recording the workflow run, commit and tag that built them. Verify with
gh attestation verify <file> --repo bgs113/azpimorgh attestation verify oci://ghcr.io/bgs113/azpim:<tag> --repo bgs113/azpim. This complements the existing Cosign signature onchecksums.txt.
Changed
- Container images are published to GHCR again (
ghcr.io/bgs113/azpim), starting with this release, andlatestmoves off v1.0.0. Publishing was paused from v1.0.1 to v1.1.0 because GoReleaser's bundled ko didn't support Go 1.27; GoReleaser v2.18.0 fixed it.
v1.1.0
Immutable
release. Only release title and notes can be modified.
Added
go install github.com/bgs113/azpim@latestnow works: the module path isgithub.com/bgs113/azpim(wasazpim), so the Go module proxy and pkg.go.dev can find it (#34). Binaries built this way report their module version inazpim version.activate,deactivateandextendprint the identity they act as (Acting as alice@contoso.com (tenant …), orservice principal <appid>) to stderr before changing anything, so a service-principal secret left inAZURE_CLIENT_ID/AZURE_CLIENT_SECRETcan't elevate unnoticed. JSON on stdout is unchanged (#29).--cloud public|usgov|china(orAZURE_CLOUD) targets Azure US Government or Azure China instead of the public cloud. Sign-in, the ARM endpoint and the token scope all follow the chosen cloud (#25).--dry-runand--validate-onlyonactivate,deactivateandextend.--dry-runshows what would be sent and sends nothing.--validate-onlyhas Azure check the request against the role policy without creating it, and exits non-zero with Azure's reason if it fails. JSON output reports"status": "DryRun"or"Validated"(#26).activate --startschedules an activation for a later time, e.g. a maintenance window:--start 22:00(today, or tomorrow if that time has passed),--start 2026-10-01T22:00(local time), or RFC 3339.azpim requestsshows such a request asScheduleduntil it starts, and its JSON has a newstarts_atfield (#28).--management-group(-m) accepts a management group's display name as well as its ID, e.g.-m "Production". Names are looked up among the management groups where you have an eligible or active assignment, so no extra permission is needed. An ID still costs no extra API calls, and an unknown or ambiguous name gives an error that lists the candidates and their IDs (#31).
Changed
--subscriptionno longer defaults to theAZURE_SUBSCRIPTION_IDenvironment variable. When it was set (often byazdor a deployment script), commands run without scope flags quietly looked at only that subscription, anddeactivate --allleft roles in other subscriptions active. Commands without scope flags now always cover the whole tenant. To keep the old behaviour, pass-s "$AZURE_SUBSCRIPTION_ID".- JSON output of
activate,extendanddeactivate:statusnow uses the same values asazpim requests(Active,Pending, …), and a newazure_statusfield carries Azure's raw status.activate's pending value changes fromPendingApprovaltoPending. The time fields (activated_at,extended_at,deactivated_at,expires_at) are omitted until Azure confirms the change;requested_atis always set. - With no scope flags,
eligible,active,requests,activate,deactivateandextendnow list assignments with one tenant-wide query instead of querying every subscription and management group separately. This is faster in large tenants and avoids ARM throttling. Role and scope names now come from the same response, so azpim no longer makes extra lookups for them (#23). requestsnow lists requests that target you (asTarget()) instead of requests you submitted (asRequestor()), which Azure rejects at the tenant root. For self-activation the results are the same. Requests an admin made on your behalf now appear too.
Fixed
extendno longer prints✓ extendedwhen Azure only queued the request for approval: it says the request is pending and not in effect yet (#32).activateanddeactivatenow check Azure's status the same way.activatetreatedPendingAdminDecisionand some other pending statuses as success, anddeactivatenever checked the status at all. Denied, failed and timed-out requests are reported as errors.- The interactive picker in
extendsaid "Select active role to deactivate"; it now says "to extend". RoleAssignmentDoesNotExisterrors, which Azure returns when you deactivate or extend a role within about 5 minutes of activating it, now explain that and suggest waiting.PendingRoleAssignmentRequesterrors now say a request for the role is already pending, and point toazpim requests --pending.- The MEMBERSHIP column (
membership_typein JSON) now shows Azure's value as-is. Before, anything other thanGroupwas shown asDirect, so an assignment inherited from a parent scope (Inherited) looked like a direct assignment. active --include-permanentno longer hides a permanent assignment when you also have a group-based assignment for the same role and scope. Only the shadow Direct copies that Azure creates for group members are hidden now.- A subscription or management group that failed to list is no longer dropped silently. There is now a single query, so a failure is reported as an error.
Removed
- The on-disk caches
~/.cache/azpim/scopes.jsonand~/.cache/azpim/roledefs.json. azpim no longer writes to~/.cache/azpim/, and the directory can be deleted. The Docker examples no longer mount it.
v1.0.2
Security
- Bump the indirect
golang.org/x/cryptodependency to v0.56.0, fixing two SSH-channel deadlock DoS advisories (GO-2026-6354, GO-2026-6355). azpim doesn't use thesshpackage, so this wasn't reachable, but keeps the dependency clean of known issues.
v1.0.1
Changed
- Publish the Homebrew tap as a formula (
brew install bgs113/tap/azpim) instead of a cask. Casks re-apply the macOS quarantine attribute on install, which triggered a Gatekeeper block since the binary isn't Apple-notarized; formulas don't. Existing cask users should runbrew uninstall --cask azpim && brew install bgs113/tap/azpim. - Require Go 1.27+ to build from source. Drops the direct
github.com/google/uuiddependency in favor of Go 1.27's stdlibuuidpackage. - Replace GitHub's default CodeQL setup with a committed workflow (
.github/workflows/codeql.yml), since default setup couldn't build with the new Go 1.27 requirement; addactionlintto CI to catch GitHub Actions workflow mistakes CodeQL's security-focused queries don't. - Group Dependabot PRs to reduce noise from SHA-pinned actions.
- Bump
golangci/golangci-lint-action.
Removed
- Temporarily stop publishing the GHCR container image.
ko(bundled in GoReleaser) fails to build when driven by a Go 1.27 compiler withko: azpim does not contain a valid local import path, an upstream ko/Go 1.27 incompatibility unrelated to this repo. Will be re-enabled once ko ships a fix.
Fixed
- Fetch full history in CI checkout so gitleaks can diff against older commits.