Azure DevOps Service Connection Scope Checker
This skill gives your agent a deterministic, offline review of all of that from files you export.
$9.99
What it does
- Reads service connection JSON exported from Azure DevOps and the matching pipeline permissions JSON
- Flags management group scope, and broad or production-named connections open to all pipelines, as blockers
- Warns about subscription scope, service principal secrets, shared or unready connections, long-lived tokens
- Reads pipeline YAML and blocks pull-request pipelines that use a broad or production connection
- Warns about addSpnToEnvironment, az login, no-environment production use, unresolved or unused connections
Who it's for
Platform and DevOps engineers
who own Azure DevOps projects and Azure access.
Security reviewers and auditors
preparing for an audit of what pipelines can do in Azure.
Try asking: “Scan these exported JSON connection lists and tell me which ones use old secrets instead of identity federation.”
Azure DevOps Service Connection Scope Checker
Example session with this skill installed
Command: python3 scripts/check_service_connections.py examples/dirty
- Read your context and instructions
- Compiled the azure devops service
The sample has a production connection with a subscription-wide service principal that every pipeline can use, a management group connection, a shared connection, a token-based GitHub connection, and a pull-request pipeline that deploys to production.
[WARN] connections.json: connection 'sc-prod-subscription': subscription-wide scope; scope it to a resource group where you can
[WARN] connections.json: connection 'sc-prod-subscription': uses a service principal secret or certificate; switch to workload identity federation
[BLOCKER] connections.json: connection 'sc-prod-subscription': authorized for all pipelines and has a broad scope; restrict it to named pipelines
[BLOCKER] connections.json: connection 'sc-platform-mg': scoped to a management group; grant a narrower scope
[WARN] connections.json: connection 'sc-dev-rg': authorized for all pipelines; restrict it to named pipelines
[WARN] connections.json: connection 'sc-dev-rg': shared with 3 projects; any of them can use its credentials
[WARN] connections.json: connection 'sc-github-pat': long-lived credential (scheme PersonalAccessToken) for type github; prefer a short-lived or federated option
[INFO] connections.json: connection 'sc-github-pat': no pipeline permission data supplied; cannot tell whether it is open to all pipelines
[WARN] connections.json: connection 'sc-staging-msi': subscription-wide scope; scope it to a resource group where you can
[WARN] connections.json: connection 'sc-staging-msi': not ready (isReady is false)
[INFO] connections.json: connection 'sc-old-unused': no pipeline permission data supplied; cannot tell whether it is open to all pipelines
[BLOCKER] azure-pipelines.yml: line 13: connection 'sc-prod-subscription' is used in a pipeline with a pull-request trigger; PR validation can reach it
[WARN] azure-pipelines.yml: line 13: production connection 'sc-prod-subscription' used with no environment or deployment job, so no approvals or checks can apply
[WARN] azure-pipelines.yml: line 16: addSpnToEnvironment is true; the script can read the service principal credentials
[WARN] azure-pipelines.yml: line 20: script runs az login with its own credentials, bypassing the service connection
[WARN] azure-pipelines.yml: line 32: references connection 'sc-missing-name' that is not in the exported connections
[WARN] connections.json: connection 'sc-github-pat': not referenced by any scanned pipeline YAML (unused or referenced elsewhere)
[WARN] connections.json: connection 'sc-old-unused': not referenced by any scanned pipeline YAML (unused or referenced elsewhere)
Summary: 3 blocker(s), 13 warning(s), 6 connection(s), 4 file(s)
Command: python3 scripts/check_service_connections.py examples/clean
The fixed sample scopes both connections to resource groups, limits them to named pipelines, deploys through environments and returns exit code 0:
Summary: 0 blocker(s), 0 warning(s), 2 connection(s), 3 file(s)
Connects securely to your tools. The creator never sees your data.
About this skill
A service connection is a key to your Azure subscription that every pipeline author can ask to use. The usual problems are quiet: a connection scoped to a whole subscription or management group, a connection authorized for all pipelines, a pull-request pipeline that can reach production, and a client secret that nobody has rotated. This skill gives your agent a deterministic, offline review of all of that from files you export.
The checker is a single standard-library script. It does not connect to Azure DevOps or Azure and never changes a connection. It reads the service connection list (the JSON that az devops service-endpoint list or the REST API returns), optional pipeline permission responses for each connection, and your pipeline YAML. Management group scope is a blocker. A connection that is authorized for all pipelines is a blocker when its scope is broad or its name says production, and a warning otherwise. A service principal secret, a subscription-wide scope, a shared connection, a connection that is not ready and long-lived credential schemes such as personal access tokens are warnings. In YAML it finds the connection each task uses, blocks pull-request pipelines that use a broad or production connection, and warns about addSpnToEnvironment, az login with its own credentials, production connections without an environment, unresolved names and unused connections.
Synthetic example files with expected output are included so you can verify the behaviour in seconds.
- It reads exported files only; it cannot see Azure role assignments, so it cannot tell what a connection can actually do in Azure.
- The expected JSON shape follows the service endpoint and pipeline permissions responses; if your export differs, fields may be missed.
- YAML is read line by line; templates, variables and expressions are not resolved, and pull-request settings that live in the UI are invisible.
- Environment approvals and checks are not visible in the files; the skill only notes that no environment is used.
- Reports and explains; it never edits connections or pipelines.
The checker is a single standard-library Python script. It makes no network calls and never writes files. Give it files or directories; it reads .json, .yml and .yaml. Connection JSON is a list, or an object with a value list, of service endpoints (name, type, authorization scheme, data scope level, isShared, isReady, project references). Permission JSON is the pipeline permissions response (resource id, allPipelines authorized, pipelines), matched to a connection by id or name. Resource group scope is recognised from the scope parameter or a ResourceGroup scope level. YAML is read line by line: connection names under azureSubscription, azureResourceManagerConnection, connectedServiceName, connectedServiceNameARM, serviceConnection, backendServiceArm and environmentServiceNameAzureRM; the pr trigger; deployment and environment keys; addSpnToEnvironment; and az login service principal commands. Names built from variables or template expressions are not resolved. A production name means prod, production or prd as a whole word in the connection name. Exit codes: 0 no blockers, 1 blockers found, 2 bad arguments. Options: --format json, --hide-info.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 1 day ago
Permissions
What's inside
Frequently Asked Questions
New in Security
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Security.