Skills azure-cosmos-db-py
๐Ÿ“ฆ

azure-cosmos-db-py

Content revision r2 High Risk โš™๏ธ External commands๐ŸŒ Network access๐Ÿ”‘ Env variables

Build Reliable Azure Cosmos DB Services

Azure Cosmos DB services need secure authentication, clear data boundaries, and testable storage logic. This skill provides Python patterns for clients, models, services, and tests.

Supports: Claude Codex Code(CC)
โš ๏ธ 38 Poor

Install with my Agent

Copy this request to your Agent. It includes the canonical Skill page and manifest.

Agent request
Review the Skillstore skill "azure-cosmos-db-py" from https://skillstore.io/skills/sickn33-azure-cosmos-db-py.md and its manifest at https://skillstore.io/api/skills/sickn33-azure-cosmos-db-py/manifest. Verify the artifact. Stop and obtain explicit user consent before installing or changing files.

Your Agent should still show its plan and request any confirmation required by the security policy.

Agent-readable resources

Use these links when an AI agent, crawler, or script needs clean context instead of reading the full page.

Test it

Using "azure-cosmos-db-py". Create an authentication plan for a Python service deployed to Azure and tested with the local emulator.

Expected outcome:

Use managed identity through DefaultAzureCredential in Azure. Keep emulator credentials in local environment settings and prevent emulator configuration from reaching production.

Using "azure-cosmos-db-py". Recommend a model structure for projects stored by workspace.

Expected outcome:

Use separate base, create, update, response, and database models. Make workspace the partition boundary and map API aliases at the model edge.

Using "azure-cosmos-db-py". Outline tests for reading a project by identifier.

Expected outcome:

Cover successful conversion, missing documents, container unavailability, partition mismatch, and SDK errors. Mock the container and verify the requested identifier and partition key.

Security Audit

High Risk
v5 โ€ข 7/23/2026 Open versioned report

All 31 static alerts are false positives caused by Markdown formatting, documented configuration, loopback literals, environment access, test mocks, and ordinary prose. Semantic review found one high-severity endpoint-classification flaw. A crafted host can receive the emulator key because substring matching enables the emulator branch and disables TLS verification.

1
Files scanned
250
Lines analyzed
0
Review items
0
False positives ignored

Confirmed security concerns (1)

High
Unsafe Emulator Endpoint Classification
The helper treats any endpoint containing a loopback string as an emulator. A crafted host can receive the Cosmos key while TLS verification is disabled.
The documented control flow directly combines substring host matching, key authentication, and disabled certificate verification. A non-loopback hostname can satisfy either substring test.
Audited by: codex View Audit History โ†’
Share & cite this report

Share the versioned assessment report, neutral badge, embed card, and citations. Skillstore reports evidence without deciding whether this Skill is safe.

Open versioned report
Security Assessment

Copy report link

https://skillstore.io/skills/sickn33-azure-cosmos-db-py/audits/5?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_report

Markdown badge

[![Skillstore security assessment](https://skillstore.io/badges/skills/sickn33-azure-cosmos-db-py/security.svg)](https://skillstore.io/skills/sickn33-azure-cosmos-db-py?utm_source=security_passport_badge)

HTML badge

<a href="https://skillstore.io/skills/sickn33-azure-cosmos-db-py?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/sickn33-azure-cosmos-db-py/security.svg" alt="Skillstore security assessment" loading="lazy"></a>

Embed card

<iframe src="https://skillstore.io/embed/skills/sickn33-azure-cosmos-db-py.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>
Academic citations (APA ยท BibTeX ยท CFF)

APA citation

sickn33. (2026). azure-cosmos-db-py security audit report (audit version 5) [Author version unspecified]. Skillstore. https://skillstore.io/skills/sickn33-azure-cosmos-db-py/audits/5

BibTeX citation

@techreport{sickn33-sickn33-azure-cosmos-db-py-2026, author = {sickn33}, title = {azure-cosmos-db-py security audit report (audit version 5)}, institution = {Skillstore}, year = {2026}, number = {5}, url = {https://skillstore.io/skills/sickn33-azure-cosmos-db-py/audits/5}, note = {Author version unspecified} }

CITATION.cff

cff-version: 1.2.0 message: "If you use this Skill, cite its author and this versioned security audit report." title: "azure-cosmos-db-py security audit report (audit version 5)" version: "unspecified" type: report authors: - name: "sickn33" date-released: "2026-07-23" url: "https://skillstore.io/skills/sickn33-azure-cosmos-db-py/audits/5" identifiers: - type: other value: "skillstore:sickn33-azure-cosmos-db-py:audit:5" description: "Skillstore immutable audit report identifier"

Skillstore Score

Why this score Evidence Confidence: Medium
55
Architecture
85
Maintainability
87
Content
68
Community
83
Spec Compliance

What You Can Build

Create a Python Service Layer

Structure models, client access, and business logic for a partitioned Cosmos DB entity.

Review Cosmos DB Architecture

Evaluate authentication, partition boundaries, resilience, and FastAPI integration before implementation.

Plan Cosmos DB Tests

Create focused pytest coverage with mocked containers, asynchronous methods, and failure cases.

Try These Prompts

Explain the Connection Setup
Explain how to connect a Python application to Azure Cosmos DB using DefaultAzureCredential. Include required packages, environment settings, and local emulator differences.
Design Models and Services
Design Pydantic models and a service layer for a [domain entity] stored in Cosmos DB. Use [partition key] and camelCase API aliases.
Develop a Test-First CRUD Plan
Create a test-first plan for CRUD operations on [entity]. Cover mocked container behavior, missing documents, service degradation, and partition-key authorization.
Audit a Production Design
Review my Cosmos DB service design for authentication, endpoint validation, query parameterization, partition isolation, retry handling, async behavior, and test coverage. Identify concrete changes.

Best Practices

  • Use DefaultAzureCredential and least-privilege RBAC for Azure deployments.
  • Validate partition ownership and use parameterized queries for every user-scoped operation.
  • Test success, absence, authorization, transient failure, and unavailable-service behavior before deployment.

Avoid

  • Do not place production account keys or connection strings in source code.
  • Do not classify emulator endpoints with substring checks against an untrusted URL.
  • Do not run broad cross-partition queries when a validated partition key is available.

Frequently Asked Questions

Does this skill create Azure Cosmos DB resources?
No. It guides Python application design and does not provision accounts, databases, containers, identities, or role assignments.
Which authentication method does it recommend?
It recommends DefaultAzureCredential with Azure RBAC for deployed applications. Key authentication is limited to local emulator use.
Can I use the examples without modification?
No. Several snippets omit imports, settings, helper functions, and application-specific authorization checks.
Does it support asynchronous FastAPI services?
Yes. It describes wrapping synchronous Cosmos SDK calls for asynchronous service use, but your implementation still needs load and failure testing.
Are the referenced guides and templates included?
No. This package contains only SKILL.md, so the referenced files are unavailable.
Is the emulator configuration suitable for production?
No. TLS verification is disabled in the emulator examples, and the endpoint classification logic must be restricted to exact loopback hosts.

Developer Details

Author

sickn33

License

MIT

Skillstore revision

r2

Version notice

The author did not declare a version.

Ref

f9e2c34b4f19c7f3e6b0a1e93227b5f77cc12526

Maintenance freshness

7/26/2026

Usage

5 downloads ยท 85 views

File structure

๐Ÿ“„ SKILL.md