Skip to content

Make the template safe by default - #79

Merged
stphnwlsh merged 15 commits into
mainfrom
fix/image-defaults-to-production
Dec 6, 2026
Merged

stphnwlsh merged 15 commits into
mainfrom
fix/image-defaults-to-production

Conversation

@stphnwlsh

@stphnwlsh stphnwlsh commented Dec 5, 2026 •

Copy link
Copy Markdown
Member

Summary

A new solution shouldn't expose itself by accident once it's deployed. This is the December security work for the 1 January release, in one pull request.

  • docker compose up publishes every port on 127.0.0.1 only, so it listens on your machine and not your whole network.
  • service.version on traces, metrics and logs comes from VersionInfo, the same version the app reports about itself.
  • Every route on the HTTP API is throttled to 50 requests a second with bursts of 100, through Globals.HttpApi.DefaultRouteSettings in serverless.template, so a busy caller can't run up the bill.
  • The skills and tests use the standard Development environment name in place of local.
  • The image builds as Production unless told otherwise, and docker-compose.yml sets docker for local runs.
  • New security-defaults skill, with the shared skills updated to match the other four templates.

Related issues

Closes LeanMeanCleanApps/.github#34
Closes LeanMeanCleanApps/.github#36
Closes LeanMeanCleanApps/.github#37
Closes LeanMeanCleanApps/.github#40
Closes LeanMeanCleanApps/.github#42
Closes LeanMeanCleanApps/.github#48

Type of change

  • Bug fix
  • New feature
  • Breaking change (the generated solution or template parameters change in a way existing users will notice)
  • Refactoring or clean-up
  • Documentation
  • Build, pipeline or dependency update

Shared layers

  • This only touches the Presentation layer of this template.
  • This touches the Application or Infrastructure layers, tests, pipeline or repository setup, so it needs to be carried across all five templates.

Checklist

  • dotnet build and dotnet test pass locally with no warnings.
  • I added or updated tests, and line coverage stays at or above 95%.
  • I updated the README or docs where behaviour changed.
  • If this changes how we do something, I updated the matching skill in .agents/skills.
  • I checked the template still installs and creates a working solution (see CONTRIBUTING.md).

@stphnwlsh stphnwlsh self-assigned this Dec 5, 2026
@github-actions github-actions Bot added bug Something isn't working build labels Dec 5, 2026
@stphnwlsh stphnwlsh changed the title Run the image as Production unless told otherwise Make the template safe by default Dec 5, 2026
@stphnwlsh
stphnwlsh changed the base branch from feature/development-environment to main December 5, 2026 20:32
@github-actions

github-actions Bot commented Dec 5, 2026 •

Copy link
Copy Markdown

Build Pipeline

✅ Ready to merge. Every stage passed.

Stage Result Details
Build 🟢 Passed Version 2026.12.06.245-pr-79 · Template package 214 KB
Test 🟢 Passed 203 passed · 0 failed · 0 skipped · Template installs, builds and passes its tests
Coverage 🟢 Passed 100% (793 of 793 lines) · Needs 95%
Static Analysis 🟢 Passed No open CodeQL alerts
Dependency Review 🟢 Passed 0 vulnerable packages · 0 licence problems
Container Scan 🟢 Passed Image starts and answers · 1 open Trivy alert, none blocking: 1 low · 1 ignored in .trivyignore

Commit 088e01d · Full run

Keeps the shared skills in step with the web templates, where --audience is now required with --include-auth.
@stphnwlsh
stphnwlsh merged commit 9573e1d into main Dec 6, 2026
14 checks passed
@stphnwlsh
stphnwlsh deleted the fix/image-defaults-to-production branch December 6, 2026 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working build

Projects

None yet

1 participant