Security review

No findings observed

No concerns were reported in the reviewed catalog files. This is not a safety guarantee.

3 of 3 catalog files reviewed · (UTC)

Review details

AI instruction review via GitHub Agentic Workflows. Reviews inspect a recorded catalog snapshot; they do not execute skill files. AI can miss risks or report false positives.

Coverage is limited to catalog files. External links and upstream files absent from the catalog were not inspected.

Model
copilot/gpt-5.1-codex-mini
Rubric
1.0.0
Catalog commit
604d8c7ab66e2117b860e7b025dedb7d8bb0caf0
Content hash
c98ccd030bb957664e3da0b8e6996d4df29ad275a2d216e3aaee749ea13d8e01
Reviewed files (3)
  • SKILL.md
  • references/python-edge-module-template.md
  • references/python-official-best-practices.md
View full report (JSON)

Usage example

An edge device needs to filter noisy temperature readings before forwarding them.

Try a prompt like this

Build a Python Azure IoT Edge module that validates temperature messages and forwards readings above the configured threshold. Include routing in a reviewable deployment manifest, error logging, and local message fixtures. Keep device credentials external and do not deploy to hardware yet.

Illustrative request, not an executed example or a guarantee of activation or results. Adapt it to your task after reviewing the skill’s instructions, prerequisites, and security review. Tool access and permissions depend on your setup.

Installation

Install as Agent Plugin Recommended
copilot plugin marketplace add samueltauil/skills-hub
copilot plugin install python-azure-iot-edge-modules@skills-hub

Works with GitHub Copilot CLI and VS Code (enable chat.plugins.enabled). Plugin python-azure-iot-edge-modules v1.0.0 follows the Agent Plugins spec.

Install with the gh extension
gh skills-hub install python-azure-iot-edge-modules

Don't have the extension? Run gh extension install samueltauil/skills-hub first.

Download and extract to your repository:

.github/skills/python-azure-iot-edge-modules/

Extract the ZIP to .github/skills/ in your repo. The folder name must match python-azure-iot-edge-modules for Copilot to auto-discover it.

Skill Files (3)

SKILL.md 4.2 KB
---
name: python-azure-iot-edge-modules
description: 'Build and operate Python Azure IoT Edge modules with robust messaging, deployment manifests, observability, and production readiness checks.'
---

# Python Azure IoT Edge Modules

Use this skill to design, implement, and validate Python-based IoT Edge modules for telemetry processing, local inference, protocol translation, and edge-to-cloud integration.

## When To Use

Use this skill for requests like:

- "quiero crear un modulo Python para IoT Edge"
- "como despliego modulos edge con manifest"
- "necesito filtrar/agregar telemetria antes de subirla"
- "como manejo desconexiones y reintentos en edge"

## Mandatory Docs Review

Before recommending runtime behavior or deployment decisions, review:

- https://learn.microsoft.com/azure/iot-edge/
- https://learn.microsoft.com/es-es/azure/iot-edge/

Minimum checks:

- Runtime architecture and module lifecycle.
- Supported host OS and versions.
- Deployment model and configuration flow.
- Current release/version guidance.

If documentation cannot be fetched, proceed with explicit assumptions and flag them clearly.

## Python Official References and Best Practices (Required)

Before proposing Python implementation details, consult official Python sources:

- https://www.python.org/
- https://docs.python.org/3/
- https://docs.python.org/3/reference/
- https://docs.python.org/3/library/
- references/python-official-best-practices.md

Prefer official docs over community snippets unless there is a specific compatibility reason to deviate.

## Goals

- Deliver module architecture and implementation plan that is production-focused.
- Ensure reliable edge messaging under network variability.
- Provide deployment, observability, and validation artifacts.

## Module Use Cases

- Protocol adapter (serial/Modbus/OPC-UA to IoT message format).
- Telemetry enrichment and normalization.
- Local anomaly detection or inference.
- Command orchestration and local actuator control.

## Delivery Workflow

### 1) Contract and Interfaces

Define:

- Module inputs and outputs.
- Message schema and versioning policy.
- Routes and priorities for normal vs critical telemetry.
- Desired properties used for dynamic configuration.

### 2) Runtime and Packaging

Specify:

- Python runtime version target.
- Container image strategy (base image, slim footprint, CVE hygiene).
- Resource profile (CPU/memory bounds).
- Startup and health checks.

### 3) Reliability Design

Implement and validate:

- Retries with exponential backoff and jitter.
- Graceful degradation on upstream failures.
- Local queueing strategy where needed.
- Idempotent processing for replayed messages.

### 4) Security Controls

Require:

- No plaintext secrets in code or manifest.
- Least-privilege module behavior.
- Secure transport and trusted cert chain handling.
- Traceability for command handling and state changes.

### 5) Deployment and Operations

Define:

- Environment-specific deployment manifests.
- Rollout strategy (pilot, staged, broad).
- Rollback criteria.
- SLOs and alerting conditions.

## Reuse Other Skills

When relevant, combine with:

- `azure-smart-city-iot-solution-builder` for platform-level architecture.
- `appinsights-instrumentation` for telemetry instrumentation approaches.
- `azure-resource-visualizer` for architecture diagrams and dependency mapping.

Also use `references/python-official-best-practices.md` as baseline quality criteria for module design and implementation guidance.

## Required Output

Always provide:

1. Module design brief (purpose, inputs, outputs).
2. Deployment model (image, manifest, env settings).
3. Reliability and error-handling strategy.
4. Security and operations checklist.
5. Test matrix (functional, chaos, performance, rollback).

## Output Template

Use `references/python-edge-module-template.md` to structure implementation proposals and reviews.

1. Context and assumptions
2. Module architecture
3. Deployment and configuration
4. Reliability, security, observability
5. Validation and rollout plan

## Guardrails

- Do not recommend direct production rollout without pilot stage.
- Do not embed secrets in Dockerfiles, source, or manifests.
- Do not omit health probes, restart behavior, and rollback criteria.
references/
python-edge-module-template.md 1.3 KB
# Python IoT Edge Module Template

Use this template to structure implementation proposals and reviews.

## 0) Official Python Baseline

- Official references reviewed from <https://www.python.org/> and <https://docs.python.org/3/>.
- Language and stdlib usage validated against <https://docs.python.org/3/reference/> and <https://docs.python.org/3/library/>.
- Best practices reviewed from `references/python-official-best-practices.md`.

## 1) Module Summary

- Module name:
- Business capability:
- Inputs:
- Outputs:
- Trigger conditions:

## 2) Message Contract

- Schema version:
- Required fields:
- Optional fields:
- Error payload contract:

## 3) Runtime Configuration

- Python version:
- Base image:
- Environment variables:
- Desired properties:
- Resource limits:

## 4) Resilience

- Retry policy:
- Backoff policy:
- Queueing strategy:
- Idempotency approach:
- Timeout and circuit-breaker behavior:

## 5) Security

- Secret source (never inline):
- Identity and permissions:
- Command authorization model:
- Audit log requirements:

## 6) Observability

- Health signals:
- Business metrics:
- Error metrics:
- Correlation/trace requirements:
- Alert thresholds:

## 7) Validation Matrix

- Happy path tests:
- Malformed payload tests:
- Network interruption tests:
- Throughput and latency tests:
- Rollback validation:
python-official-best-practices.md 2.2 KB
# Python Official References and Best Practices

Use these official Python resources before finalizing module architecture or implementation details.

## Official References

- Python home: <https://www.python.org/>
- Python documentation portal: <https://docs.python.org/3/>
- Python tutorial: <https://docs.python.org/3/tutorial/>
- Python language reference: <https://docs.python.org/3/reference/>
- Python standard library reference: <https://docs.python.org/3/library/>
- Python HOWTOs: <https://docs.python.org/3/howto/>
- Installing modules: <https://docs.python.org/3/installing/>
- Distributing modules: <https://docs.python.org/3/distributing/>
- PEP index: <https://peps.python.org/>
- PyPA packaging guide: <https://packaging.python.org/>

## Coding Best Practices

- Target and pin an explicit Python major/minor runtime for each deployment.
- Prefer explicit, readable code paths over clever compact logic.
- Use type hints for public interfaces and critical data transformations.
- Keep module responsibilities focused; separate protocol, business logic, and transport.
- Validate and sanitize external inputs at boundaries.
- Use structured exceptions with actionable error messages.
- Log with enough context for incident triage (correlation id, module id, message id).

## Reliability and Performance Best Practices

- Avoid blocking operations in high-frequency message paths.
- Enforce timeouts and bounded retries with exponential backoff and jitter.
- Design idempotent handlers for replay and duplicate deliveries.
- Use resource limits and monitor memory growth to prevent edge instability.
- Define graceful shutdown behavior to flush buffered state safely.

## Dependency and Supply Chain Best Practices

- Pin dependencies and document upgrade cadence.
- Prefer actively maintained libraries with clear release history.
- Track vulnerabilities and update dependencies regularly.
- Keep container images minimal and patched.

## Testing Best Practices

- Unit test parsing, validation, and routing logic.
- Add integration tests for module I/O boundaries.
- Add chaos tests for network loss, slow upstream, and restart scenarios.
- Verify rollback behavior and state recovery in deployment tests.

License (MIT)

View full license text
MIT License

Copyright GitHub, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.