Skip to content

Commit 7b5d599

Browse files
authored
Merge pull request #21 from Azure-Samples/gk/deep-wiki-updates
Enhances devcontainer setup and security
2 parents fb24ba2 + df07abe commit 7b5d599

File tree

2 files changed

+29
-28
lines changed

2 files changed

+29
-28
lines changed

.devcontainer/devcontainer.json

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,49 @@
11
{
22
"name": "Snippy Functions Codespace",
33
"dockerFile": "Dockerfile",
4-
4+
55
"features": {
66
"ghcr.io/devcontainers/features/azure-cli:1": {},
77
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {},
88
"ghcr.io/devcontainers/features/node:1": { "version": "lts" }
99
},
10-
10+
1111
"forwardPorts": [7071],
12-
13-
// 👇 object, not array
12+
1413
"secrets": {
15-
"AzureWebJobsStorage": {},
14+
"AzureWebJobsStorage": { "default": "UseDevelopmentStorage=true" },
1615
"COSMOS_CONN": {},
1716
"AZURE_OPENAI_ENDPOINT": {},
1817
"AZURE_OPENAI_KEY": {},
1918
"PROJECT_CONNECTION_STRING": {}
2019
},
21-
20+
2221
"postCreateCommand": "./.devcontainer/setup.sh",
2322
"postStartCommand": "bash .devcontainer/start.sh",
24-
23+
2524
"customizations": {
2625
"vscode": {
2726
"extensions": [
2827
"ms-azuretools.vscode-azurefunctions",
2928
"ms-azuretools.vscode-docker",
30-
"GitHub.copilot"
29+
"GitHub.copilot",
30+
"Azurite.azurite"
3131
]
3232
}
3333
},
34-
34+
3535
"mounts": [
36-
// Mount docker-in-docker library volume
3736
"source=codespaces-linux-var-lib-docker,target=/var/lib/docker,type=volume"
3837
],
39-
40-
// Always run image-defined docker-init.sh to enable docker-in-docker
38+
4139
"overrideCommand": false,
4240
"remoteUser": "codespace",
43-
41+
4442
"runArgs": [
45-
// Enable ptrace-based debugging for Go in container
4643
"--cap-add=SYS_PTRACE",
4744
"--security-opt",
4845
"seccomp=unconfined",
49-
50-
// Enable docker-in-docker configuration
5146
"--init",
5247
"--privileged"
5348
]
54-
}
49+
}

README.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@ The project ships with reproducible **azd** infrastructure, so `azd up` will st
6161

6262
### Tool Matrix
6363

64-
| Tool Name | Purpose | MCP Type |
65-
| -------------- | ------------------------------------------------------------------- | -------- |
66-
| `save_snippet` | Save code, embed via Functions ↔ OpenAI binding, upsert into Cosmos | action |
67-
| `get_snippet` | Fetch snippet by id | action |
68-
| `deep_wiki` | Generate Markdown wiki from vector search results | task |
69-
| `code_style` | Produce language‑specific style guide | task |
64+
| Tool Name | Purpose |
65+
| -------------- | ------------------------------------------------------------------- |
66+
| `save_snippet` | Save code snippets with vector embeddings for semantic search |
67+
| `get_snippet` | Retrieve previously saved code snippets by their unique name |
68+
| `code_style` | Generate language-specific code style guides from saved snippets |
69+
| `deep_wiki` | Create comprehensive wiki documentation by analyzing code snippets |
7070

7171
---
7272

@@ -196,12 +196,18 @@ Estimate monthly cost using the [Azure Pricing Calculator](https://azure.microso
196196

197197
### Security
198198

199-
Snippy ships with connection‑string auth for simplicity. For production we recommend:
199+
Snippy uses User-Assigned Managed Identity for secure service-to-service authentication. The infrastructure is configured with:
200200

201-
* Enable **System‑Assigned Managed Identity** on the Function App
202-
* Grant the identity *Cosmos DB Built‑in Data Contributor* role
203-
* Store secrets (OpenAI key, Agents Project connection‑string) in **Azure Key Vault**
204-
* Restrict inbound traffic with Private Endpoints + VNet integration
201+
* **User-Assigned Managed Identity** on the Function App with appropriate RBAC roles:
202+
* Cosmos DB Data Contributor
203+
* Storage Blob Data Owner and Queue Data Contributor
204+
* Application Insights Monitoring Metrics Publisher
205+
* Azure AI Project Developer
206+
207+
For production deployments, we recommend:
208+
209+
* Restrict inbound traffic with Private Endpoints + VNet integration
210+
* Enable network security features like service endpoints and firewall rules
205211

206212
---
207213

0 commit comments

Comments
 (0)