opencode-skills-collection 4.0.68 → 4.0.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled-skills/.antigravity-install-manifest.json +266 -1
- package/bundled-skills/access-review/SKILL.md +394 -0
- package/bundled-skills/access-review/references/details.md +121 -0
- package/bundled-skills/agent-evals/SKILL.md +420 -0
- package/bundled-skills/agent-observability/SKILL.md +346 -0
- package/bundled-skills/agent-observability/references/details.md +786 -0
- package/bundled-skills/ai-agent-security/SKILL.md +393 -0
- package/bundled-skills/ai-agent-security/references/details.md +912 -0
- package/bundled-skills/ai-coding-agent-guardrails/SKILL.md +442 -0
- package/bundled-skills/ai-coding-agent-guardrails/references/details.md +753 -0
- package/bundled-skills/ai-inference-service-mesh/SKILL.md +449 -0
- package/bundled-skills/ai-pipeline-orchestration/SKILL.md +287 -0
- package/bundled-skills/ai-red-teaming/SKILL.md +409 -0
- package/bundled-skills/ai-security-hardening/SKILL.md +343 -0
- package/bundled-skills/ai-sre-incident-response/SKILL.md +336 -0
- package/bundled-skills/alerting-oncall/SKILL.md +458 -0
- package/bundled-skills/alerting-oncall/references/details.md +84 -0
- package/bundled-skills/apk-redteam-pipeline/SKILL.md +446 -0
- package/bundled-skills/argocd-gitops/SKILL.md +469 -0
- package/bundled-skills/arm-templates/SKILL.md +438 -0
- package/bundled-skills/arm-templates/references/details.md +64 -0
- package/bundled-skills/asset-inventory/SKILL.md +412 -0
- package/bundled-skills/asset-inventory/references/details.md +127 -0
- package/bundled-skills/audit-logging/SKILL.md +476 -0
- package/bundled-skills/aws-cloudtrail/SKILL.md +486 -0
- package/bundled-skills/aws-cost-optimization/SKILL.md +331 -0
- package/bundled-skills/aws-ec2/SKILL.md +426 -0
- package/bundled-skills/aws-ecs-fargate/SKILL.md +388 -0
- package/bundled-skills/aws-iam/SKILL.md +463 -0
- package/bundled-skills/aws-lambda/SKILL.md +428 -0
- package/bundled-skills/aws-rds/SKILL.md +380 -0
- package/bundled-skills/aws-s3/SKILL.md +434 -0
- package/bundled-skills/aws-secrets-manager/SKILL.md +486 -0
- package/bundled-skills/aws-vpc/SKILL.md +436 -0
- package/bundled-skills/azure-ai-document-intelligence-ts/SKILL.md +1 -1
- package/bundled-skills/azure-aks/SKILL.md +423 -0
- package/bundled-skills/azure-devops/SKILL.md +457 -0
- package/bundled-skills/azure-functions-devsec/SKILL.md +436 -0
- package/bundled-skills/azure-keyvault/SKILL.md +455 -0
- package/bundled-skills/azure-keyvault/references/details.md +83 -0
- package/bundled-skills/azure-monitor-audit/SKILL.md +379 -0
- package/bundled-skills/azure-networking/SKILL.md +448 -0
- package/bundled-skills/azure-networking/references/details.md +135 -0
- package/bundled-skills/azure-sql/SKILL.md +413 -0
- package/bundled-skills/azure-sql/references/details.md +113 -0
- package/bundled-skills/azure-vms/SKILL.md +402 -0
- package/bundled-skills/azure-vms/references/details.md +134 -0
- package/bundled-skills/backup-recovery/SKILL.md +388 -0
- package/bundled-skills/bb-methodology/SKILL.md +451 -0
- package/bundled-skills/bb-methodology/references/details.md +120 -0
- package/bundled-skills/block-storage/SKILL.md +371 -0
- package/bundled-skills/blue-green-deploy/SKILL.md +453 -0
- package/bundled-skills/blue-green-deploy/references/details.md +90 -0
- package/bundled-skills/bug-bounty/SKILL.md +447 -0
- package/bundled-skills/bug-bounty/references/details.md +1316 -0
- package/bundled-skills/bugcrowd-reporting/SKILL.md +351 -0
- package/bundled-skills/business-continuity/SKILL.md +463 -0
- package/bundled-skills/career-ops/SKILL.md +186 -0
- package/bundled-skills/cdn-setup/SKILL.md +374 -0
- package/bundled-skills/change-management/SKILL.md +438 -0
- package/bundled-skills/change-management/references/details.md +105 -0
- package/bundled-skills/circleci/SKILL.md +475 -0
- package/bundled-skills/cis-benchmarks/SKILL.md +150 -0
- package/bundled-skills/cloudflare-pages/SKILL.md +318 -0
- package/bundled-skills/cloudflare-r2/SKILL.md +353 -0
- package/bundled-skills/cloudflare-workers/SKILL.md +415 -0
- package/bundled-skills/cloudflare-zero-trust/SKILL.md +361 -0
- package/bundled-skills/cloudformation/SKILL.md +461 -0
- package/bundled-skills/constraint-driven-development/SKILL.md +335 -0
- package/bundled-skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/bundled-skills/container-hardening/SKILL.md +126 -0
- package/bundled-skills/container-registries/SKILL.md +435 -0
- package/bundled-skills/container-scanning/SKILL.md +416 -0
- package/bundled-skills/convex-backend/SKILL.md +338 -0
- package/bundled-skills/dast-scanning/SKILL.md +437 -0
- package/bundled-skills/database-backups/SKILL.md +425 -0
- package/bundled-skills/datadog/SKILL.md +487 -0
- package/bundled-skills/dependency-scanning/SKILL.md +457 -0
- package/bundled-skills/devcontainers-nix/SKILL.md +416 -0
- package/bundled-skills/disaster-recovery/SKILL.md +374 -0
- package/bundled-skills/disaster-recovery/references/details.md +219 -0
- package/bundled-skills/dns-management/SKILL.md +375 -0
- package/bundled-skills/docker-compose/SKILL.md +482 -0
- package/bundled-skills/docker-management/SKILL.md +426 -0
- package/bundled-skills/ebpf-observability/SKILL.md +436 -0
- package/bundled-skills/ebpf-observability/references/details.md +542 -0
- package/bundled-skills/elk-stack/SKILL.md +487 -0
- package/bundled-skills/enterprise-vpn-attack/SKILL.md +395 -0
- package/bundled-skills/evidence-hygiene/SKILL.md +404 -0
- package/bundled-skills/feature-flags/SKILL.md +426 -0
- package/bundled-skills/feature-flags/references/details.md +86 -0
- package/bundled-skills/fedramp-compliance/SKILL.md +453 -0
- package/bundled-skills/firebase-app-platform/SKILL.md +381 -0
- package/bundled-skills/firewall-config/SKILL.md +479 -0
- package/bundled-skills/gcp-audit-logs/SKILL.md +452 -0
- package/bundled-skills/gcp-audit-logs/references/details.md +56 -0
- package/bundled-skills/gcp-cloud-functions/SKILL.md +284 -0
- package/bundled-skills/gcp-cloud-sql/SKILL.md +277 -0
- package/bundled-skills/gcp-compute/SKILL.md +319 -0
- package/bundled-skills/gcp-gke/SKILL.md +307 -0
- package/bundled-skills/gcp-networking/SKILL.md +293 -0
- package/bundled-skills/gcp-secret-manager/SKILL.md +421 -0
- package/bundled-skills/gcp-secret-manager/references/details.md +131 -0
- package/bundled-skills/gdpr-compliance/SKILL.md +451 -0
- package/bundled-skills/gdpr-compliance/references/details.md +145 -0
- package/bundled-skills/geo-audit/SKILL.md +368 -0
- package/bundled-skills/geo-brand-mentions/SKILL.md +68 -0
- package/bundled-skills/geo-brand-mentions/references/details.md +471 -0
- package/bundled-skills/geo-citability/SKILL.md +350 -0
- package/bundled-skills/geo-compare/SKILL.md +340 -0
- package/bundled-skills/geo-content/SKILL.md +383 -0
- package/bundled-skills/geo-crawlers/SKILL.md +408 -0
- package/bundled-skills/geo-llmstxt/SKILL.md +464 -0
- package/bundled-skills/geo-platform-optimizer/SKILL.md +314 -0
- package/bundled-skills/geo-proposal/SKILL.md +378 -0
- package/bundled-skills/geo-prospect/SKILL.md +225 -0
- package/bundled-skills/geo-report/SKILL.md +436 -0
- package/bundled-skills/geo-report-pdf/SKILL.md +157 -0
- package/bundled-skills/geo-schema/SKILL.md +408 -0
- package/bundled-skills/geo-technical/SKILL.md +78 -0
- package/bundled-skills/geo-technical/references/details.md +543 -0
- package/bundled-skills/git-workflow/SKILL.md +460 -0
- package/bundled-skills/github-actions/SKILL.md +368 -0
- package/bundled-skills/gitlab-ci/SKILL.md +340 -0
- package/bundled-skills/gpu-kubernetes-operations/SKILL.md +468 -0
- package/bundled-skills/gpu-server-management/SKILL.md +236 -0
- package/bundled-skills/hashicorp-vault/SKILL.md +408 -0
- package/bundled-skills/helm-charts/SKILL.md +469 -0
- package/bundled-skills/hipaa-compliance/SKILL.md +451 -0
- package/bundled-skills/hunt-aspnet/SKILL.md +321 -0
- package/bundled-skills/hunt-ato/SKILL.md +184 -0
- package/bundled-skills/hunt-auth-bypass/SKILL.md +426 -0
- package/bundled-skills/hunt-auth-bypass/references/details.md +80 -0
- package/bundled-skills/hunt-brute-force/SKILL.md +341 -0
- package/bundled-skills/hunt-business-logic/SKILL.md +281 -0
- package/bundled-skills/hunt-cache-poison/SKILL.md +382 -0
- package/bundled-skills/hunt-captcha-bypass/SKILL.md +136 -0
- package/bundled-skills/hunt-cicd/SKILL.md +311 -0
- package/bundled-skills/hunt-clickjacking/SKILL.md +110 -0
- package/bundled-skills/hunt-cors/SKILL.md +335 -0
- package/bundled-skills/hunt-dom/SKILL.md +323 -0
- package/bundled-skills/hunt-exceptional-conditions/SKILL.md +111 -0
- package/bundled-skills/hunt-file-upload/SKILL.md +202 -0
- package/bundled-skills/hunt-fintech-graphql/SKILL.md +289 -0
- package/bundled-skills/hunt-forgot-password/SKILL.md +114 -0
- package/bundled-skills/hunt-grpc/SKILL.md +317 -0
- package/bundled-skills/hunt-host-header/SKILL.md +309 -0
- package/bundled-skills/hunt-html-injection/SKILL.md +106 -0
- package/bundled-skills/hunt-http-smuggling/SKILL.md +129 -0
- package/bundled-skills/hunt-http-smuggling/references/phase2h-smuggling-cachepoison.md +177 -0
- package/bundled-skills/hunt-idor/SKILL.md +434 -0
- package/bundled-skills/hunt-jwt-crypto/SKILL.md +221 -0
- package/bundled-skills/hunt-k8s/SKILL.md +337 -0
- package/bundled-skills/hunt-laravel/SKILL.md +255 -0
- package/bundled-skills/hunt-ldap/SKILL.md +351 -0
- package/bundled-skills/hunt-lfi/SKILL.md +311 -0
- package/bundled-skills/hunt-llm-ai/SKILL.md +289 -0
- package/bundled-skills/hunt-mfa-bypass/SKILL.md +177 -0
- package/bundled-skills/hunt-misc/SKILL.md +378 -0
- package/bundled-skills/hunt-nextjs/SKILL.md +299 -0
- package/bundled-skills/hunt-nodejs/SKILL.md +263 -0
- package/bundled-skills/hunt-nosqli/SKILL.md +210 -0
- package/bundled-skills/hunt-ntlm-info/SKILL.md +314 -0
- package/bundled-skills/hunt-oauth/SKILL.md +459 -0
- package/bundled-skills/hunt-open-redirect/SKILL.md +223 -0
- package/bundled-skills/hunt-race-condition/SKILL.md +381 -0
- package/bundled-skills/hunt-race-condition/references/details.md +159 -0
- package/bundled-skills/hunt-rag-vector/SKILL.md +212 -0
- package/bundled-skills/hunt-rce/SKILL.md +444 -0
- package/bundled-skills/hunt-rce/references/details.md +110 -0
- package/bundled-skills/hunt-saml/SKILL.md +156 -0
- package/bundled-skills/hunt-session/SKILL.md +342 -0
- package/bundled-skills/hunt-shadow-api/SKILL.md +198 -0
- package/bundled-skills/hunt-source-leak/SKILL.md +345 -0
- package/bundled-skills/hunt-spa-api/SKILL.md +163 -0
- package/bundled-skills/hunt-springboot/SKILL.md +285 -0
- package/bundled-skills/hunt-sqli/SKILL.md +466 -0
- package/bundled-skills/hunt-ssrf/SKILL.md +396 -0
- package/bundled-skills/hunt-ssrf/references/details.md +179 -0
- package/bundled-skills/hunt-ssti/SKILL.md +163 -0
- package/bundled-skills/hunt-subdomain/SKILL.md +379 -0
- package/bundled-skills/hunt-tls-network/SKILL.md +399 -0
- package/bundled-skills/hunt-xxe/SKILL.md +466 -0
- package/bundled-skills/i-have-adhd/SKILL.md +170 -0
- package/bundled-skills/identity-access-management/SKILL.md +382 -0
- package/bundled-skills/identity-access-management/references/details.md +524 -0
- package/bundled-skills/incident-management/SKILL.md +484 -0
- package/bundled-skills/incident-response/SKILL.md +448 -0
- package/bundled-skills/incident-response/references/details.md +113 -0
- package/bundled-skills/interview-me/SKILL.md +248 -0
- package/bundled-skills/iso27001-compliance/SKILL.md +460 -0
- package/bundled-skills/jenkins/SKILL.md +462 -0
- package/bundled-skills/jev-use/SKILL.md +158 -0
- package/bundled-skills/kubernetes-hardening/SKILL.md +154 -0
- package/bundled-skills/kubernetes-ops/SKILL.md +449 -0
- package/bundled-skills/kubernetes-ops/references/details.md +108 -0
- package/bundled-skills/kustomize/SKILL.md +478 -0
- package/bundled-skills/linux-administration/SKILL.md +367 -0
- package/bundled-skills/linux-hardening/SKILL.md +154 -0
- package/bundled-skills/llm-app-security/SKILL.md +389 -0
- package/bundled-skills/llm-app-security/references/details.md +674 -0
- package/bundled-skills/llm-caching/SKILL.md +334 -0
- package/bundled-skills/llm-cost-optimization/SKILL.md +311 -0
- package/bundled-skills/llm-fine-tuning/SKILL.md +329 -0
- package/bundled-skills/llm-gateway/SKILL.md +282 -0
- package/bundled-skills/llm-inference-scaling/SKILL.md +286 -0
- package/bundled-skills/llmops-platform-engineering/SKILL.md +472 -0
- package/bundled-skills/load-balancing/SKILL.md +403 -0
- package/bundled-skills/loki-logging/SKILL.md +479 -0
- package/bundled-skills/m365-entra-attack/SKILL.md +423 -0
- package/bundled-skills/mac-mini-llm-lab/SKILL.md +350 -0
- package/bundled-skills/mcp-server-security/SKILL.md +356 -0
- package/bundled-skills/mcp-server-security/references/details.md +745 -0
- package/bundled-skills/mdm-device-management/SKILL.md +404 -0
- package/bundled-skills/mdm-device-management/references/details.md +410 -0
- package/bundled-skills/meme-coin-audit/SKILL.md +402 -0
- package/bundled-skills/mid-engagement-ir-detection/SKILL.md +377 -0
- package/bundled-skills/model-registry-governance/SKILL.md +452 -0
- package/bundled-skills/model-serving-kubernetes/SKILL.md +339 -0
- package/bundled-skills/model-supply-chain-security/SKILL.md +427 -0
- package/bundled-skills/mongodb/SKILL.md +436 -0
- package/bundled-skills/multi-tenant-llm-hosting/SKILL.md +435 -0
- package/bundled-skills/multi-tenant-llm-hosting/references/details.md +211 -0
- package/bundled-skills/mysql/SKILL.md +390 -0
- package/bundled-skills/new-relic/SKILL.md +472 -0
- package/bundled-skills/nfs-storage/SKILL.md +356 -0
- package/bundled-skills/object-storage/SKILL.md +378 -0
- package/bundled-skills/offensive-osint/SKILL.md +443 -0
- package/bundled-skills/okta-attack/SKILL.md +436 -0
- package/bundled-skills/ollama-stack/SKILL.md +379 -0
- package/bundled-skills/openclaw-deployment-hardening/SKILL.md +135 -0
- package/bundled-skills/openclaw-local-mac-mini/SKILL.md +426 -0
- package/bundled-skills/openclaw-local-mac-mini/references/details.md +221 -0
- package/bundled-skills/openclaw-security-hardening/SKILL.md +135 -0
- package/bundled-skills/openshift/SKILL.md +485 -0
- package/bundled-skills/opentelemetry/SKILL.md +438 -0
- package/bundled-skills/opentelemetry/references/details.md +78 -0
- package/bundled-skills/opentofu-migration/SKILL.md +349 -0
- package/bundled-skills/osint-methodology/SKILL.md +460 -0
- package/bundled-skills/osint-methodology/references/details.md +1350 -0
- package/bundled-skills/pci-dss-compliance/SKILL.md +446 -0
- package/bundled-skills/penetration-testing/SKILL.md +152 -0
- package/bundled-skills/performance-tuning/SKILL.md +381 -0
- package/bundled-skills/planetscale/SKILL.md +297 -0
- package/bundled-skills/platform-engineering/SKILL.md +348 -0
- package/bundled-skills/platform-engineering/references/details.md +944 -0
- package/bundled-skills/podman/SKILL.md +405 -0
- package/bundled-skills/policy-as-code/SKILL.md +434 -0
- package/bundled-skills/policy-as-code/references/details.md +204 -0
- package/bundled-skills/postgresql-devsec/SKILL.md +378 -0
- package/bundled-skills/prometheus-grafana/SKILL.md +469 -0
- package/bundled-skills/prompt-injection-defense/SKILL.md +483 -0
- package/bundled-skills/rag-infrastructure/SKILL.md +269 -0
- package/bundled-skills/rag-observability-evals/SKILL.md +444 -0
- package/bundled-skills/rag-observability-evals/references/details.md +92 -0
- package/bundled-skills/recon-scope-triage/SKILL.md +128 -0
- package/bundled-skills/redis/SKILL.md +421 -0
- package/bundled-skills/redteam-report-template/SKILL.md +370 -0
- package/bundled-skills/report-writing/SKILL.md +426 -0
- package/bundled-skills/report-writing/references/details.md +187 -0
- package/bundled-skills/reverse-proxy/SKILL.md +420 -0
- package/bundled-skills/runbook-creation/SKILL.md +438 -0
- package/bundled-skills/runbook-creation/references/details.md +71 -0
- package/bundled-skills/saas-security-posture/SKILL.md +415 -0
- package/bundled-skills/sast-scanning/SKILL.md +444 -0
- package/bundled-skills/sbom-supply-chain/SKILL.md +433 -0
- package/bundled-skills/security-arsenal/SKILL.md +446 -0
- package/bundled-skills/security-arsenal/references/details.md +540 -0
- package/bundled-skills/security-automation/SKILL.md +146 -0
- package/bundled-skills/semantic-versioning/SKILL.md +434 -0
- package/bundled-skills/semantic-versioning/references/details.md +83 -0
- package/bundled-skills/service-mesh/SKILL.md +422 -0
- package/bundled-skills/soc2-compliance/SKILL.md +409 -0
- package/bundled-skills/sops-encryption/SKILL.md +124 -0
- package/bundled-skills/sre-dashboards/SKILL.md +143 -0
- package/bundled-skills/ssh-configuration/SKILL.md +324 -0
- package/bundled-skills/ssl-tls-management/SKILL.md +428 -0
- package/bundled-skills/ssl-tls-management/references/details.md +99 -0
- package/bundled-skills/startup-it-troubleshooting/SKILL.md +415 -0
- package/bundled-skills/supply-chain-attack-recon/SKILL.md +453 -0
- package/bundled-skills/supply-chain-attack-recon/references/details.md +258 -0
- package/bundled-skills/systemd-services/SKILL.md +379 -0
- package/bundled-skills/terraform-aws/SKILL.md +125 -0
- package/bundled-skills/terraform-azure/SKILL.md +415 -0
- package/bundled-skills/terraform-azure/references/details.md +231 -0
- package/bundled-skills/terraform-gcp/SKILL.md +369 -0
- package/bundled-skills/threat-modeling/SKILL.md +487 -0
- package/bundled-skills/user-management/SKILL.md +383 -0
- package/bundled-skills/using-agent-skills/SKILL.md +220 -0
- package/bundled-skills/vector-database-ops/SKILL.md +300 -0
- package/bundled-skills/vendor-management/SKILL.md +439 -0
- package/bundled-skills/vendor-management/references/details.md +109 -0
- package/bundled-skills/vercel-deployments/SKILL.md +296 -0
- package/bundled-skills/vllm-server/SKILL.md +236 -0
- package/bundled-skills/vmware-vcenter-attack/SKILL.md +412 -0
- package/bundled-skills/vpn-setup/SKILL.md +452 -0
- package/bundled-skills/vulnerability-scanning/SKILL.md +448 -0
- package/bundled-skills/waf-setup/SKILL.md +354 -0
- package/bundled-skills/waf-setup/references/details.md +211 -0
- package/bundled-skills/web2-recon/SKILL.md +440 -0
- package/bundled-skills/web2-recon/references/details.md +319 -0
- package/bundled-skills/web3-audit/SKILL.md +445 -0
- package/bundled-skills/web3-audit/references/details.md +224 -0
- package/bundled-skills/windows-hardening/SKILL.md +454 -0
- package/bundled-skills/windows-hardening/references/details.md +204 -0
- package/bundled-skills/windows-server/SKILL.md +318 -0
- package/bundled-skills/zero-trust/SKILL.md +461 -0
- package/package.json +1 -1
- package/skills_index.json +6943 -323
|
@@ -0,0 +1,436 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: azure-functions-devsec
|
|
3
|
+
description: Build serverless applications on Azure Functions. Configure triggers,
|
|
4
|
+
bindings, and deployment. Use when implementing serverless workloads on Azure.
|
|
5
|
+
category: devops
|
|
6
|
+
risk: critical
|
|
7
|
+
source: https://github.com/BagelHole/DevOps-Security-Agent-Skills
|
|
8
|
+
source_repo: BagelHole/DevOps-Security-Agent-Skills
|
|
9
|
+
source_type: community
|
|
10
|
+
date_added: '2026-09-20'
|
|
11
|
+
license: MIT
|
|
12
|
+
license_source: https://github.com/BagelHole/DevOps-Security-Agent-Skills/blob/main/LICENSE
|
|
13
|
+
compatibility: Requires the relevant OS/platform tooling and privileged access where
|
|
14
|
+
noted. Docs-only; helper scripts and templates not bundled.
|
|
15
|
+
metadata:
|
|
16
|
+
author: devops-skills
|
|
17
|
+
version: '1.0'
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# Azure Functions
|
|
21
|
+
|
|
22
|
+
Build and deploy serverless applications with Azure Functions. Covers function app creation, trigger and binding configuration, deployment strategies, real code examples in Python and Node.js, and production best practices.
|
|
23
|
+
|
|
24
|
+
## When to Use
|
|
25
|
+
|
|
26
|
+
- You need event-driven compute that scales automatically to zero.
|
|
27
|
+
- You are building APIs, webhooks, or background processing pipelines.
|
|
28
|
+
- You want per-execution billing without managing servers.
|
|
29
|
+
- You need to respond to Azure service events (Blob Storage, Service Bus, Cosmos DB changes).
|
|
30
|
+
- You are implementing lightweight microservices or scheduled tasks.
|
|
31
|
+
|
|
32
|
+
## Prerequisites
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
# Install Azure CLI
|
|
36
|
+
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
|
|
37
|
+
|
|
38
|
+
# Install Azure Functions Core Tools v4
|
|
39
|
+
npm install -g azure-functions-core-tools@4
|
|
40
|
+
|
|
41
|
+
# Verify installation
|
|
42
|
+
func --version
|
|
43
|
+
|
|
44
|
+
# Login
|
|
45
|
+
az login
|
|
46
|
+
az account set --subscription "my-subscription-id"
|
|
47
|
+
|
|
48
|
+
# Create supporting resources
|
|
49
|
+
az group create --name functions-rg --location eastus
|
|
50
|
+
|
|
51
|
+
az storage account create \
|
|
52
|
+
--name myfuncstorageacct \
|
|
53
|
+
--resource-group functions-rg \
|
|
54
|
+
--location eastus \
|
|
55
|
+
--sku Standard_LRS
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Function App Creation
|
|
59
|
+
|
|
60
|
+
### Consumption Plan (Pay-per-execution)
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# Python function app on Consumption plan
|
|
64
|
+
az functionapp create \
|
|
65
|
+
--resource-group functions-rg \
|
|
66
|
+
--consumption-plan-location eastus \
|
|
67
|
+
--runtime python \
|
|
68
|
+
--runtime-version 3.11 \
|
|
69
|
+
--functions-version 4 \
|
|
70
|
+
--name myapp-func \
|
|
71
|
+
--storage-account myfuncstorageacct \
|
|
72
|
+
--os-type Linux
|
|
73
|
+
|
|
74
|
+
# Node.js function app
|
|
75
|
+
az functionapp create \
|
|
76
|
+
--resource-group functions-rg \
|
|
77
|
+
--consumption-plan-location eastus \
|
|
78
|
+
--runtime node \
|
|
79
|
+
--runtime-version 20 \
|
|
80
|
+
--functions-version 4 \
|
|
81
|
+
--name myapp-node-func \
|
|
82
|
+
--storage-account myfuncstorageacct \
|
|
83
|
+
--os-type Linux
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Premium Plan (VNet integration, no cold start)
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
# Create Premium plan
|
|
90
|
+
az functionapp plan create \
|
|
91
|
+
--resource-group functions-rg \
|
|
92
|
+
--name myapp-premium-plan \
|
|
93
|
+
--location eastus \
|
|
94
|
+
--sku EP1 \
|
|
95
|
+
--is-linux true
|
|
96
|
+
|
|
97
|
+
# Create function app on Premium plan
|
|
98
|
+
az functionapp create \
|
|
99
|
+
--resource-group functions-rg \
|
|
100
|
+
--plan myapp-premium-plan \
|
|
101
|
+
--runtime python \
|
|
102
|
+
--runtime-version 3.11 \
|
|
103
|
+
--functions-version 4 \
|
|
104
|
+
--name myapp-premium-func \
|
|
105
|
+
--storage-account myfuncstorageacct
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Trigger and Binding Examples
|
|
109
|
+
|
|
110
|
+
### HTTP Trigger -- Python
|
|
111
|
+
|
|
112
|
+
```python
|
|
113
|
+
# function_app.py (v2 programming model)
|
|
114
|
+
import azure.functions as func
|
|
115
|
+
import json
|
|
116
|
+
import logging
|
|
117
|
+
|
|
118
|
+
app = func.FunctionApp(http_auth_level=func.AuthLevel.FUNCTION)
|
|
119
|
+
|
|
120
|
+
@app.route(route="users/{userId}", methods=["GET"])
|
|
121
|
+
def get_user(req: func.HttpRequest) -> func.HttpResponse:
|
|
122
|
+
user_id = req.route_params.get("userId")
|
|
123
|
+
logging.info(f"Fetching user: {user_id}")
|
|
124
|
+
|
|
125
|
+
if not user_id:
|
|
126
|
+
return func.HttpResponse(
|
|
127
|
+
json.dumps({"error": "userId is required"}),
|
|
128
|
+
status_code=400,
|
|
129
|
+
mimetype="application/json"
|
|
130
|
+
)
|
|
131
|
+
|
|
132
|
+
user = {"id": user_id, "name": "Jane Doe", "email": "jane@example.com"}
|
|
133
|
+
return func.HttpResponse(
|
|
134
|
+
json.dumps(user),
|
|
135
|
+
status_code=200,
|
|
136
|
+
mimetype="application/json"
|
|
137
|
+
)
|
|
138
|
+
|
|
139
|
+
@app.route(route="users", methods=["POST"])
|
|
140
|
+
def create_user(req: func.HttpRequest) -> func.HttpResponse:
|
|
141
|
+
try:
|
|
142
|
+
body = req.get_json()
|
|
143
|
+
except ValueError:
|
|
144
|
+
return func.HttpResponse(
|
|
145
|
+
json.dumps({"error": "Invalid JSON"}),
|
|
146
|
+
status_code=400,
|
|
147
|
+
mimetype="application/json"
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
logging.info(f"Creating user: {body.get('name')}")
|
|
151
|
+
return func.HttpResponse(
|
|
152
|
+
json.dumps({"id": "new-id", **body}),
|
|
153
|
+
status_code=201,
|
|
154
|
+
mimetype="application/json"
|
|
155
|
+
)
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### HTTP Trigger -- Node.js
|
|
159
|
+
|
|
160
|
+
```javascript
|
|
161
|
+
// src/functions/httpTrigger.js (v4 programming model)
|
|
162
|
+
const { app } = require("@azure/functions");
|
|
163
|
+
|
|
164
|
+
app.http("getUser", {
|
|
165
|
+
methods: ["GET"],
|
|
166
|
+
authLevel: "function",
|
|
167
|
+
route: "users/{userId}",
|
|
168
|
+
handler: async (request, context) => {
|
|
169
|
+
const userId = request.params.userId;
|
|
170
|
+
context.log(`Fetching user: ${userId}`);
|
|
171
|
+
|
|
172
|
+
if (!userId) {
|
|
173
|
+
return { status: 400, jsonBody: { error: "userId is required" } };
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
const user = { id: userId, name: "Jane Doe", email: "jane@example.com" };
|
|
177
|
+
return { status: 200, jsonBody: user };
|
|
178
|
+
},
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
app.http("createUser", {
|
|
182
|
+
methods: ["POST"],
|
|
183
|
+
authLevel: "function",
|
|
184
|
+
route: "users",
|
|
185
|
+
handler: async (request, context) => {
|
|
186
|
+
const body = await request.json();
|
|
187
|
+
context.log(`Creating user: ${body.name}`);
|
|
188
|
+
|
|
189
|
+
return { status: 201, jsonBody: { id: "new-id", ...body } };
|
|
190
|
+
},
|
|
191
|
+
});
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### Blob Trigger -- Python
|
|
195
|
+
|
|
196
|
+
```python
|
|
197
|
+
@app.blob_trigger(arg_name="blob", path="uploads/{name}",
|
|
198
|
+
connection="AzureWebJobsStorage")
|
|
199
|
+
def process_upload(blob: func.InputStream):
|
|
200
|
+
logging.info(f"Processing blob: {blob.name}, Size: {blob.length} bytes")
|
|
201
|
+
content = blob.read()
|
|
202
|
+
# Process file content here
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### Timer Trigger -- Python
|
|
206
|
+
|
|
207
|
+
```python
|
|
208
|
+
@app.timer_trigger(schedule="0 */5 * * * *", arg_name="timer",
|
|
209
|
+
run_on_startup=False)
|
|
210
|
+
def cleanup_job(timer: func.TimerRequest):
|
|
211
|
+
if timer.past_due:
|
|
212
|
+
logging.warning("Timer is past due")
|
|
213
|
+
logging.info("Running scheduled cleanup")
|
|
214
|
+
# Cleanup logic here
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
### Service Bus Trigger -- Python
|
|
218
|
+
|
|
219
|
+
```python
|
|
220
|
+
@app.service_bus_queue_trigger(arg_name="msg", queue_name="orders",
|
|
221
|
+
connection="ServiceBusConnection")
|
|
222
|
+
@app.cosmos_db_output(arg_name="doc", database_name="mydb",
|
|
223
|
+
container_name="processed-orders",
|
|
224
|
+
connection="CosmosDBConnection")
|
|
225
|
+
def process_order(msg: func.ServiceBusMessage, doc: func.Out[func.Document]):
|
|
226
|
+
order = json.loads(msg.get_body().decode("utf-8"))
|
|
227
|
+
logging.info(f"Processing order: {order['id']}")
|
|
228
|
+
|
|
229
|
+
processed = {
|
|
230
|
+
"id": order["id"],
|
|
231
|
+
"status": "processed",
|
|
232
|
+
"items": order["items"],
|
|
233
|
+
"total": sum(item["price"] for item in order["items"])
|
|
234
|
+
}
|
|
235
|
+
doc.set(func.Document.from_dict(processed))
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
### Cosmos DB Change Feed Trigger -- Python
|
|
239
|
+
|
|
240
|
+
```python
|
|
241
|
+
@app.cosmos_db_trigger_v3(arg_name="documents", database_name="mydb",
|
|
242
|
+
container_name="orders",
|
|
243
|
+
connection="CosmosDBConnection",
|
|
244
|
+
lease_container_name="leases",
|
|
245
|
+
create_lease_container_if_not_exists=True)
|
|
246
|
+
def on_order_change(documents: func.DocumentList):
|
|
247
|
+
for doc in documents:
|
|
248
|
+
logging.info(f"Document changed: {doc['id']}")
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
## Local Development
|
|
252
|
+
|
|
253
|
+
```bash
|
|
254
|
+
# Initialize a new Python function project
|
|
255
|
+
func init MyFunctionProject --python
|
|
256
|
+
cd MyFunctionProject
|
|
257
|
+
|
|
258
|
+
# Create a new function from template
|
|
259
|
+
func new --name HttpExample --template "HTTP trigger" --authlevel function
|
|
260
|
+
|
|
261
|
+
# Run locally
|
|
262
|
+
func start
|
|
263
|
+
|
|
264
|
+
# Run locally with specific port
|
|
265
|
+
func start --port 7072
|
|
266
|
+
|
|
267
|
+
# Test locally
|
|
268
|
+
curl http://localhost:7071/api/HttpExample?name=World
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
## Deployment
|
|
272
|
+
|
|
273
|
+
```bash
|
|
274
|
+
# Deploy using Core Tools
|
|
275
|
+
func azure functionapp publish myapp-func
|
|
276
|
+
|
|
277
|
+
# Deploy with build step for Python
|
|
278
|
+
func azure functionapp publish myapp-func --build remote
|
|
279
|
+
|
|
280
|
+
# Deploy using ZIP package
|
|
281
|
+
zip -r function.zip . -x ".git/*" ".venv/*" "__pycache__/*"
|
|
282
|
+
az functionapp deployment source config-zip \
|
|
283
|
+
--resource-group functions-rg \
|
|
284
|
+
--name myapp-func \
|
|
285
|
+
--src function.zip
|
|
286
|
+
|
|
287
|
+
# Deploy via CI/CD with GitHub Actions
|
|
288
|
+
az functionapp deployment github-actions add \
|
|
289
|
+
--resource-group functions-rg \
|
|
290
|
+
--name myapp-func \
|
|
291
|
+
--repo "myorg/myrepo" \
|
|
292
|
+
--branch main \
|
|
293
|
+
--runtime python \
|
|
294
|
+
--login-with-github
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
## Deployment Slots
|
|
298
|
+
|
|
299
|
+
```bash
|
|
300
|
+
# Create a staging slot
|
|
301
|
+
az functionapp deployment slot create \
|
|
302
|
+
--resource-group functions-rg \
|
|
303
|
+
--name myapp-func \
|
|
304
|
+
--slot staging
|
|
305
|
+
|
|
306
|
+
# Deploy to staging slot
|
|
307
|
+
func azure functionapp publish myapp-func --slot staging
|
|
308
|
+
|
|
309
|
+
# Test staging slot
|
|
310
|
+
curl https://myapp-func-staging.azurewebsites.net/api/health
|
|
311
|
+
|
|
312
|
+
# Swap staging to production
|
|
313
|
+
az functionapp deployment slot swap \
|
|
314
|
+
--resource-group functions-rg \
|
|
315
|
+
--name myapp-func \
|
|
316
|
+
--slot staging \
|
|
317
|
+
--target-slot production
|
|
318
|
+
|
|
319
|
+
# Roll back by swapping again
|
|
320
|
+
az functionapp deployment slot swap \
|
|
321
|
+
--resource-group functions-rg \
|
|
322
|
+
--name myapp-func \
|
|
323
|
+
--slot staging \
|
|
324
|
+
--target-slot production
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
## Application Settings and Security
|
|
328
|
+
|
|
329
|
+
```bash
|
|
330
|
+
# Set application settings
|
|
331
|
+
az functionapp config appsettings set \
|
|
332
|
+
--resource-group functions-rg \
|
|
333
|
+
--name myapp-func \
|
|
334
|
+
--settings \
|
|
335
|
+
ServiceBusConnection="Endpoint=sb://..." \
|
|
336
|
+
CosmosDBConnection="AccountEndpoint=https://..." \
|
|
337
|
+
CUSTOM_SETTING="my-value"
|
|
338
|
+
|
|
339
|
+
# Set settings as slot-specific
|
|
340
|
+
az functionapp config appsettings set \
|
|
341
|
+
--resource-group functions-rg \
|
|
342
|
+
--name myapp-func \
|
|
343
|
+
--slot-settings \
|
|
344
|
+
ENVIRONMENT="staging"
|
|
345
|
+
|
|
346
|
+
# Enable managed identity
|
|
347
|
+
az functionapp identity assign \
|
|
348
|
+
--resource-group functions-rg \
|
|
349
|
+
--name myapp-func
|
|
350
|
+
|
|
351
|
+
# Configure CORS
|
|
352
|
+
az functionapp cors add \
|
|
353
|
+
--resource-group functions-rg \
|
|
354
|
+
--name myapp-func \
|
|
355
|
+
--allowed-origins "https://myapp.example.com"
|
|
356
|
+
|
|
357
|
+
# Set minimum TLS version
|
|
358
|
+
az functionapp config set \
|
|
359
|
+
--resource-group functions-rg \
|
|
360
|
+
--name myapp-func \
|
|
361
|
+
--min-tls-version 1.2
|
|
362
|
+
|
|
363
|
+
# Enable Application Insights
|
|
364
|
+
az functionapp config appsettings set \
|
|
365
|
+
--resource-group functions-rg \
|
|
366
|
+
--name myapp-func \
|
|
367
|
+
--settings APPINSIGHTS_INSTRUMENTATIONKEY="your-key"
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
## Terraform Configuration
|
|
371
|
+
|
|
372
|
+
```hcl
|
|
373
|
+
resource "azurerm_service_plan" "functions" {
|
|
374
|
+
name = "myapp-func-plan"
|
|
375
|
+
location = azurerm_resource_group.main.location
|
|
376
|
+
resource_group_name = azurerm_resource_group.main.name
|
|
377
|
+
os_type = "Linux"
|
|
378
|
+
sku_name = "Y1" # Consumption plan
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
resource "azurerm_linux_function_app" "main" {
|
|
382
|
+
name = "myapp-func"
|
|
383
|
+
location = azurerm_resource_group.main.location
|
|
384
|
+
resource_group_name = azurerm_resource_group.main.name
|
|
385
|
+
service_plan_id = azurerm_service_plan.functions.id
|
|
386
|
+
storage_account_name = azurerm_storage_account.func.name
|
|
387
|
+
storage_account_access_key = azurerm_storage_account.func.primary_access_key
|
|
388
|
+
|
|
389
|
+
identity {
|
|
390
|
+
type = "SystemAssigned"
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
site_config {
|
|
394
|
+
application_stack {
|
|
395
|
+
python_version = "3.11"
|
|
396
|
+
}
|
|
397
|
+
cors {
|
|
398
|
+
allowed_origins = ["https://myapp.example.com"]
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
app_settings = {
|
|
403
|
+
FUNCTIONS_WORKER_RUNTIME = "python"
|
|
404
|
+
WEBSITE_RUN_FROM_PACKAGE = "1"
|
|
405
|
+
APPINSIGHTS_INSTRUMENTATIONKEY = azurerm_application_insights.main.instrumentation_key
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
tags = var.tags
|
|
409
|
+
}
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
## Troubleshooting
|
|
413
|
+
|
|
414
|
+
| Symptom | Cause | Fix |
|
|
415
|
+
|---------|-------|-----|
|
|
416
|
+
| Cold start latency > 10s | Consumption plan cold start | Use Premium plan (EP1+) or enable `WEBSITE_RUN_FROM_PACKAGE=1` |
|
|
417
|
+
| Function not triggering | Connection string misconfigured | Check `az functionapp config appsettings list` for correct binding values |
|
|
418
|
+
| `ModuleNotFoundError` in Python | Dependencies not installed during deploy | Use `--build remote` flag or include `requirements.txt` in package |
|
|
419
|
+
| HTTP 401 Unauthorized | Auth level mismatch or missing function key | Verify auth level in code matches expectations; pass `x-functions-key` header |
|
|
420
|
+
| Blob trigger not firing | Storage account connection wrong | Verify `AzureWebJobsStorage` points to the correct account |
|
|
421
|
+
| Timer trigger runs twice | Multiple instances on Premium plan | Set `WEBSITE_MAX_DYNAMIC_APPLICATION_SCALE_OUT=1` or use singleton lock |
|
|
422
|
+
| Deployment slot swap fails | Slot settings not configured | Ensure slot-specific settings are marked with `--slot-settings` |
|
|
423
|
+
| Out of memory errors | Large payloads or memory leaks | Stream data instead of loading entirely; increase plan tier |
|
|
424
|
+
|
|
425
|
+
## Related Skills
|
|
426
|
+
|
|
427
|
+
- `azure-networking` -- VNet integration for Premium plan functions accessing private resources.
|
|
428
|
+
- `azure-sql` -- Database connections from function bindings.
|
|
429
|
+
- `terraform-azure` -- Infrastructure as Code for function app provisioning.
|
|
430
|
+
- `arm-templates` -- Bicep-based function app deployment.
|
|
431
|
+
|
|
432
|
+
## Limitations
|
|
433
|
+
|
|
434
|
+
- Infrastructure commands can disrupt services: confirm target host/scope and have backups/snapshots before mutating state.
|
|
435
|
+
- Docs-only import: upstream scripts and templates not bundled.
|
|
436
|
+
|