Skip to content

Add azure-container-registry-cli skill - #2450

Open
AClerbois wants to merge 6 commits into
github:mainfrom
AClerbois:feature/azure-container-registry-cli-skill
Open

Add azure-container-registry-cli skill#2450
AClerbois wants to merge 6 commits into
github:mainfrom
AClerbois:feature/azure-container-registry-cli-skill

Conversation

@AClerbois

@AClerbois AClerbois commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Pull Request Checklist

  • I have read and followed the CONTRIBUTING.md guidelines.
  • I have read and followed the Guidance for submissions involving paid services.
  • My contribution adds a new instruction, prompt, agent, skill, workflow, or canvas extension file in the correct directory.
  • The file follows the required naming convention.
  • The content is clearly structured and follows the example format.
  • I have tested my instructions, prompt, agent, skill, workflow, or canvas extension with GitHub Copilot.
  • I have run npm start and verified that README.md is up to date.
  • I am targeting the main branch for this pull request.

Description

Adds a new azure-container-registry-cli skill for managing Azure Container Registry via the az acr CLI, modeled on the existing azure-devops-cli skill (compact SKILL.md + progressive-disclosure reference files).

The skill covers:

  • SKILL.md — prerequisites, quick start, key principles (prefer az acr build/az acr import over local docker workflows, keep the admin user disabled in production, Premium-only feature awareness) and the az acr CLI structure, with a routing table to the reference files.
  • references/auth-and-security.mdaz acr login (incl. --expose-token), Entra RBAC roles (AcrPull/AcrPush/…), service principals, managed identities, AKS --attach-acr, repository-scoped tokens & scope maps, admin user rotation, content trust.
  • references/build-and-tasks.mdaz acr build, az acr run, multi-step task YAML, ACR Tasks with commit/base-image/timer triggers, task logs and identities, agent pools.
  • references/images-and-artifacts.mdaz acr import, repository/manifest management, untag vs delete pitfall, acr purge with dry-run, image locking, retention policy & soft delete, artifact cache (pull-through), storage usage.
  • references/networking-and-geo.md — geo-replication, zone redundancy, private endpoints + private DNS, network rules, dedicated data endpoints, connected registries, registry transfer pipelines.

npm run skill:validate passes (393 skills valid) and the generated skills table in docs/README.skills.md is included in this PR.


Type of Contribution

  • New instruction file.
  • New prompt file.
  • New agent file.
  • New plugin.
  • New skill file.
  • New agentic workflow.
  • New canvas extension.
  • Update to existing instruction, prompt, agent, plugin, skill, workflow, or canvas extension.
  • Other (please specify):

Additional Notes

Fills a gap: the repository has ~10 Azure instruction/skill assets (DevOps CLI, Bicep/Terraform AVM, Functions, naming) but nothing dedicated to Azure Container Registry, and az acr only appears incidentally in two unrelated skill references.


By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.

Copilot AI review requested due to automatic review settings July 27, 2026 09:39
@AClerbois
AClerbois requested a review from aaronpowell as a code owner July 27, 2026 09:39
@github-actions github-actions Bot added new-submission PR adds at least one new contribution skills PR touches skills labels Jul 27, 2026
@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

🔒 PR Risk Scan Results

Scanned 6 changed file(s).

Severity Count
🔴 High 3
🟠 Medium 0
ℹ️ Info 0
Severity Rule File Line Match
🔴 guardrail-bypass-language skills/azure-container-registry-cli/references/build-and-tasks.md 132 Premium SKU. Dedicated task compute — for more CPU, or one of the two supported ways to run tasks against a network-restricted registry (the other being trusted services + the task
🔴 guardrail-bypass-language skills/azure-container-registry-cli/references/networking-and-geo.md 66 - With public access disabled, standard ACR Tasks agents cannot reach the registry — use a dedicated agent pool attached to a subnet in the VNet, or enable trusted services **and**
🔴 guardrail-bypass-language skills/azure-container-registry-cli/references/networking-and-geo.md 83 ⚠️ **Since June 1, 2025, `--allow-trusted-services` alone is NOT enough for ACR Tasks using a system-assigned managed identity** — without the task network bypass policy, their run

This is an automated soft-gate report. Findings indicate review targets and do not block merge by themselves.

@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

🔍 Vally Lint Results

✅ All checks passed

Scope Checked
Skills 1
Agents 0
Total 1
Severity Count
❌ Errors 0
⚠️ Warnings 0
ℹ️ Advisories 0

Summary

Level Finding
ℹ️ ✅ azure-container-registry-cli (2/2 checks passed)
ℹ️ ✓ [spec-compliance] All 1 skill(s) are spec-compliant.
ℹ️ ✓ spec-compliance: All spec checks passed.
ℹ️ ✓ [valid-refs] All file references across 1 skill(s) are valid.
ℹ️ ✓ valid-refs: All file references resolve to existing files within the skill directory.
ℹ️ 1 skill(s) linted, 1 passed
Full linter output
### Linting skills/azure-container-registry-cli
✅ azure-container-registry-cli (2/2 checks passed)
    ✓ [spec-compliance] All 1 skill(s) are spec-compliant.
        ✓ spec-compliance: All spec checks passed.
    ✓ [valid-refs] All file references across 1 skill(s) are valid.
        ✓ valid-refs: All file references resolve to existing files within the skill directory.

1 skill(s) linted, 1 passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds an Azure Container Registry CLI skill with task-focused reference documentation.

Changes:

  • Adds ACR setup, authentication, image, build, and networking guidance.
  • Organizes detailed commands into four reference files.
  • Registers the skill in generated documentation.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
skills/azure-container-registry-cli/SKILL.md Defines skill routing and quick-start guidance.
references/auth-and-security.md Covers identities, roles, tokens, and AKS.
references/build-and-tasks.md Documents builds, tasks, triggers, and agent pools.
references/images-and-artifacts.md Covers image lifecycle, caching, and retention.
references/networking-and-geo.md Documents networking, replication, and transfers.
docs/README.skills.md Adds the skill to the generated index.
Comments suppressed due to low confidence (2)

skills/azure-container-registry-cli/references/networking-and-geo.md:38

  • Zone redundancy is no longer a Premium creation-time option: Azure enables it automatically for all service tiers in supported regions, regardless of the resource property's displayed value. These commands teach an obsolete provisioning requirement.
Set at creation time (registry or replica) in supported regions:

```bash
az acr create --resource-group {rg} --name {registry} --sku Premium --zone-redundancy enabled
az acr replication create --registry {registry} --location westeurope --zone-redundancy enabled

skills/azure-container-registry-cli/references/networking-and-geo.md:83

  • This does not fully let ACR Tasks through a network-restricted registry after the June 2025 policy change. For tasks using a system-assigned identity, explicitly enable networkRuleBypassAllowedForTasks as well.
# Let trusted Azure services (e.g., ACR Tasks, Defender) through the firewall
az acr update --name {registry} --allow-trusted-services true

Comment thread skills/azure-container-registry-cli/SKILL.md Outdated
Comment thread skills/azure-container-registry-cli/SKILL.md Outdated
Comment thread skills/azure-container-registry-cli/references/auth-and-security.md Outdated
Comment thread skills/azure-container-registry-cli/references/auth-and-security.md Outdated
Comment thread skills/azure-container-registry-cli/references/auth-and-security.md
Comment thread skills/azure-container-registry-cli/references/auth-and-security.md Outdated
Comment thread skills/azure-container-registry-cli/references/build-and-tasks.md Outdated
Comment thread skills/azure-container-registry-cli/references/build-and-tasks.md
Comment thread skills/azure-container-registry-cli/references/networking-and-geo.md Outdated
Comment thread skills/azure-container-registry-cli/references/networking-and-geo.md Outdated
… network bypass) and secure credential handling
Copilot AI review requested due to automatic review settings July 27, 2026 14:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.

Comments suppressed due to low confidence (6)

skills/azure-container-registry-cli/SKILL.md:53

  • This SKU summary omits Premium-only public network rules, dedicated data endpoints, and transfer pipelines. Since the referenced networking guide uses all three, Basic/Standard users can otherwise be routed to commands their registry cannot enable.
- **Premium-only features**: geo-replication, private endpoints, retention policies, connected registries, agent pools. (Repository-scoped tokens work in all tiers; zone redundancy is automatic in all tiers in supported regions.)

skills/azure-container-registry-cli/SKILL.md:70

  • Repository-scoped tokens and scope maps are available in Basic, Standard, and Premium, so labeling this command group Premium-only contradicts the detailed reference and can incorrectly discourage valid usage on lower tiers.
├── token / scope-map      # Repository-scoped tokens (Premium)

skills/azure-container-registry-cli/references/auth-and-security.md:49

  • Generic Azure Contributor and Owner roles provide control-plane management but do not grant ACR repository push/pull permissions, including in legacy RBAC mode. Claiming full data-plane access here can leave principals unable to pull or push until an explicit ACR role is assigned.
| `Contributor`/`Owner` | Full control-plane management + push/pull |

skills/azure-container-registry-cli/references/auth-and-security.md:65

  • This generic grant always assigns AcrPull, although the section just established that this role is ignored on ABAC-enabled registries. Show both mode-specific alternatives so the advertised user/group/service-principal/identity example works for either registry mode.
# Grant pull access to a user, group, service principal, or managed identity
az role assignment create --assignee {principal-id} --scope $ACR_ID --role AcrPull

skills/azure-container-registry-cli/references/auth-and-security.md:78

  • This service-principal command silently fails to provide data-plane access on an ABAC-enabled registry because AcrPull is not honored there. Label the mode and direct ABAC users to the corresponding Repository Reader role.
# Create an SP scoped to pull only
ACR_ID=$(az acr show --name {registry} --query id --output tsv)
az ad sp create-for-rbac --name {sp-name} --scopes $ACR_ID --role AcrPull

skills/azure-container-registry-cli/references/auth-and-security.md:94

  • The managed-identity example also hard-codes the legacy-only AcrPull role, so it does not grant pull access on ABAC-enabled registries. Make the role substitution explicit here as well.
# Assign a system-assigned identity and grant it pull
az vm identity assign --name {vm} --resource-group {rg}
PRINCIPAL_ID=$(az vm show --name {vm} --resource-group {rg} --query identity.principalId --output tsv)
az role assignment create --assignee $PRINCIPAL_ID --scope $ACR_ID --role AcrPull

Comment thread skills/azure-container-registry-cli/references/networking-and-geo.md Outdated
Comment thread skills/azure-container-registry-cli/references/images-and-artifacts.md Outdated
Comment thread skills/azure-container-registry-cli/references/auth-and-security.md Outdated
Comment thread skills/azure-container-registry-cli/references/auth-and-security.md Outdated
Copilot AI review requested due to automatic review settings July 28, 2026 01:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review details

Comments suppressed due to low confidence (7)

skills/azure-container-registry-cli/SKILL.md:70

  • Repository-scoped tokens and scope maps are available in every ACR service tier, so labeling this command group as Premium-only is incorrect and contradicts both line 53 and the reference file. Basic/Standard users may incorrectly avoid a supported authentication option.
├── token / scope-map      # Repository-scoped tokens (Premium)

skills/azure-container-registry-cli/references/auth-and-security.md:58

  • Catalog Lister is only needed when the principal must enumerate repository names; known-repository pull/write operations do not require it. Saying it is needed alongside all repository roles encourages an unnecessary registry-wide permission.
| `Container Registry Repository Catalog Lister` | List repositories (needed alongside the roles above) |

skills/azure-container-registry-cli/references/auth-and-security.md:144

  • The unquoted token password can be changed by shell word splitting or pathname expansion before it reaches docker login. Preserve the generated credential exactly with a quoted expansion.
echo $TOKEN_PWD | docker login $LOGIN_SERVER --username {token} --password-stdin

skills/azure-container-registry-cli/references/auth-and-security.md:110

  • This hardcodes the public-cloud login suffix despite line 29 warning that sovereign clouds and domain-name-label-scoped registries use different login servers. In those supported configurations, check-acr targets the wrong host; resolve loginServer from ACR instead.
az aks check-acr --name {cluster} --resource-group {rg} --acr {registry}.azurecr.io

skills/azure-container-registry-cli/references/auth-and-security.md:167

  • As of the PR's current date, Docker Content Trust can no longer be enabled on new registries or registries that had not enabled it before May 31, 2026. This command therefore fails for new setups; the section should lead with the deprecation and direct new users to Notation/Notary Project.
## Content Trust

```bash
# Enable Docker Content Trust support (Premium)
az acr config content-trust update --registry {registry} --status enabled

skills/azure-container-registry-cli/references/networking-and-geo.md:12

  • The file's Premium summary omits two Premium-only features documented below: public IP network rules and dedicated data endpoints. Basic/Standard users following those sections will receive unsupported-SKU errors, so include them in the prerequisite statement.
Geo-replication, private endpoints, connected registries, and transfer pipelines require the **Premium** SKU. Zone redundancy is automatic in every tier.

skills/azure-container-registry-cli/references/images-and-artifacts.md:135

  • This sequence enables retention and then soft delete, but ACR rejects enabling both policies simultaneously. Soft delete is also a preview available in all service tiers, not Premium-only, and is unsupported with geo-replication or artifact cache. Split these into mutually exclusive alternatives so the documented commands can succeed.
# Soft delete (preview): recover deleted artifacts within the retention window
az acr config soft-delete update --registry {registry} --status enabled --days 7
  • Files reviewed: 6/6 changed files
  • Comments generated: 4
  • Review effort level: Medium

Comment thread skills/azure-container-registry-cli/references/auth-and-security.md Outdated
Comment thread skills/azure-container-registry-cli/references/build-and-tasks.md
Comment thread skills/azure-container-registry-cli/references/build-and-tasks.md Outdated
Comment thread skills/azure-container-registry-cli/references/build-and-tasks.md Outdated
@aaronpowell

Copy link
Copy Markdown
Contributor

There's a minor spelling issue that just requires an ignore to be added to the codespellrc file and a final pass on the current CCR coments would be good (close any that aren't relevant)

@aaronpowell aaronpowell self-assigned this Jul 28, 2026
Copilot AI review requested due to automatic review settings July 28, 2026 10:21
… caveat, soft-delete tiers, Catalog Lister scope, secret quoting

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (11)

skills/azure-container-registry-cli/SKILL.md:70

  • Repository-scoped tokens are available in Basic, Standard, and Premium, as this file already states on line 53 and the auth reference states on line 129. Labeling this command group Premium-only gives users contradictory SKU guidance.
├── token / scope-map      # Repository-scoped tokens (Premium)

skills/azure-container-registry-cli/references/networking-and-geo.md:12

  • This SKU warning omits two features documented later in this file: IP network rules and dedicated data endpoints are also Premium-only. Basic/Standard users following those sections will otherwise receive unsupported-feature errors.
Geo-replication, private endpoints, public IP network rules, dedicated data endpoints, connected registries, and transfer pipelines require the **Premium** SKU. Zone redundancy is automatic in every tier.

skills/azure-container-registry-cli/references/auth-and-security.md:58

  • Catalog Lister is not required alongside the repository Reader/Writer/Contributor roles; it only permits enumerating repository names. Presenting it as required encourages broader registry visibility than consumers need.
| `Container Registry Repository Catalog Lister` | List repositories — assign only when the identity must enumerate the catalog (e.g., `az acr repository list`); not needed for pull/push of known repositories |

skills/azure-container-registry-cli/references/auth-and-security.md:124

  • The kubelet only needs Repository Reader to pull a known image. Catalog Lister adds registry-wide repository enumeration and is not required for AKS image pulls, so this example grants unnecessary access.
  --role "Container Registry Repository Reader"
# "Container Registry Repository Catalog Lister" is NOT needed for pulls —

skills/azure-container-registry-cli/references/auth-and-security.md:167

  • As of May 31, 2026, Azure no longer allows Docker Content Trust to be enabled on new registries or registries that had not enabled it previously, so this command now fails for the skill's new-deployment audience. DCT is deprecated for retirement on March 31, 2028; current guidance should direct users to Notation/Notary Project instead.
Docker Content Trust (DCT) is being retired: **since May 31, 2026 it cannot be enabled on new registries** (or on registries that never enabled it), and it will be removed entirely on March 31, 2028. Do not set up DCT — sign images with **Notation (Notary Project)** and store signatures as OCI artifacts instead; see "Transition from Docker Content Trust to Notary Project" in the ACR docs.

skills/azure-container-registry-cli/references/build-and-tasks.md:101

  • Omitting --identities does not assign a system-managed identity, despite the comment. The task remains without a new identity, so the following credential command cannot authenticate as [system].
az acr task identity assign --registry {registry} --name build-app   # system-assigned

skills/azure-container-registry-cli/references/build-and-tasks.md:132

  • A VNet agent pool is not strictly required for every network-restricted registry: this skill's networking reference also documents trusted-services access plus the task network bypass policy for standard agents. Calling it required contradicts that supported alternative.
Premium SKU. Dedicated task compute — for more CPU, or one of the two supported ways to run tasks against a network-restricted registry (the other being trusted services + the task network bypass policy, see `networking-and-geo.md`):

skills/azure-container-registry-cli/references/images-and-artifacts.md:126

  • ACR rejects enabling retention and soft delete simultaneously, but these adjacent commands currently read as one setup sequence. State that they are alternatives so users do not run the second command into a policy conflict.
## Retention Policy & Soft Delete

skills/azure-container-registry-cli/references/images-and-artifacts.md:136

  • This example claims to recover deleted artifacts but only lists deleted repositories; it never shows the restore operation. Use the manifest commands so a user can identify and actually restore a deleted digest.
az acr config retention show --registry {registry}

# Soft delete (preview, all tiers): recover deleted artifacts within 1-90 days

skills/azure-container-registry-cli/references/networking-and-geo.md:132

  • SAS-backed transfer pipelines require --storage-access-mode SasToken. Without the required access mode, this export-pipeline command is incomplete and fails instead of using the supplied Key Vault secret.
  --name export-pipe \
  --secret-uri https://{vault}.vault.azure.net/secrets/{sas-secret} \

skills/azure-container-registry-cli/references/networking-and-geo.md:138

  • The import pipeline also needs the required --storage-access-mode SasToken selection when --secret-uri supplies a SAS credential; otherwise this example is not executable.
  --name import-pipe \
  --secret-uri https://{vault}.vault.azure.net/secrets/{sas-secret} \

Copilot AI review requested due to automatic review settings July 28, 2026 10:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (7)

skills/azure-container-registry-cli/SKILL.md:70

  • This labels repository-scoped tokens as Premium-only, contradicting line 53 and the authentication reference; tokens and scope maps are available in every ACR service tier. The stale label can incorrectly steer Basic/Standard users away from the feature.
├── token / scope-map      # Repository-scoped tokens (Premium)

skills/azure-container-registry-cli/references/networking-and-geo.md:139

  • The import-pipeline command also requires --storage-access-mode. Since this path uses --secret-uri, specify SasToken; otherwise current acrtransfer rejects the command before creating the pipeline.
az acr import-pipeline create --resource-group {rg} --registry {dst-registry} \
  --name import-pipe \
  --secret-uri https://{vault}.vault.azure.net/secrets/{sas-secret} \
  --storage-container-uri https://{account}.blob.core.windows.net/{container}

skills/azure-container-registry-cli/references/images-and-artifacts.md:170

  • show-usage is not necessarily the actual total billable storage: Azure documents that it can lag recent operations, and for geo-replicated registries it reports only the home region. Note those limitations so this section does not understate storage costs.
Layers are deduplicated and shared across repositories; `show-usage` reports actual billable storage.

skills/azure-container-registry-cli/SKILL.md:32

  • az acr login defaults to the Docker client and does not auto-detect Podman, so the advertised Podman quick start fails when Docker is absent. Include the required DOCKER_COMMAND=podman invocation.
# Authenticate Docker/Podman against the registry
az acr login --name {registry}

skills/azure-container-registry-cli/references/auth-and-security.md:19

  • This command only authenticates Docker by default; Podman requires DOCKER_COMMAND=podman. Without documenting that override, Podman-only environments receive a missing-Docker error.
# Standard login — wires Docker/Podman credentials via your az login identity
az acr login --name {registry}

skills/azure-container-registry-cli/references/networking-and-geo.md:133

  • acrtransfer 2.0 made --storage-access-mode required. Because this example supplies a Key Vault SAS secret, omitting --storage-access-mode SasToken makes the export-pipeline command fail argument validation.

This issue also appears on line 136 of the same file.

az acr export-pipeline create --resource-group {rg} --registry {src-registry} \
  --name export-pipe \
  --secret-uri https://{vault}.vault.azure.net/secrets/{sas-secret} \
  --storage-container-uri https://{account}.blob.core.windows.net/{container}

skills/azure-container-registry-cli/references/images-and-artifacts.md:166

  • The 10/100/500 GiB figures are included-pricing allowances, not the maximum SKU limits returned by show-usage; storage can exceed them with overage charges. Calling them the quota misstates what the command's limit column represents.

This issue also appears on line 170 of the same file.

# Consumed storage vs SKU quota (Basic 10 GB / Standard 100 GB / Premium 500 GB included)

Copilot AI review requested due to automatic review settings July 29, 2026 10:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (2)

skills/azure-container-registry-cli/SKILL.md:70

  • Repository-scoped tokens and scope maps are available in Basic, Standard, and Premium. Marking this command group as Premium-only contradicts line 53 and the authentication reference, and may wrongly steer Basic/Standard users away from the feature.
├── token / scope-map      # Repository-scoped tokens (Premium)

skills/azure-container-registry-cli/references/images-and-artifacts.md:139

  • This sequence cannot restore an artifact: repository list-deleted only lists deleted repositories, and manifest restore requires the deleted manifest digest. List deleted manifests for the repository so the digest is available, then pass it to the restore command.
az acr repository list-deleted --name {registry}
az acr manifest restore --registry {registry} --name app:v1

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

Labels

new-submission PR adds at least one new contribution skills PR touches skills

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants