Safeguard
Developer Tools•

What should a service template ask developers, and what decide?

Ask for a name, an owner and a location. Decide logging, scanning, base images and permissions for them. A guide to inputs on a secure golden path.

Safeguard Security Team
4 min read

A secure service template should ask just for what it cannot know, such as the service name, the owning team and where to publish, and decide everything with a safe default for the developer. Every extra question is a chance to pick a weaker option or abandon the road.

What template tools actually ask

Backstage Software Templates are a good example of the pattern. Per the Backstage documentation, a template can load skeletons of code, fill in variables, and publish the result to locations such as GitHub or GitLab. Each template can ask for different input variables, which are passed to the templater, and a template is generally a set of steps, each with its own required or optional inputs. Before running, a review page lets the user check the values.

In the example template in the docs, the form asks for a name, an owner chosen from a picker of groups, and a repository location with an allowed host list. Three questions, and the owner is selected from known groups rather than typed freely.

Ask or decide

Use this table as a starting point. The right split depends on your stack.

ItemAsk or decide?Reason
Service nameAskThe template cannot guess it
Owning teamAsk, from a listOwnership must be real and valid
Repository locationAsk, from allowed hostsPrevents publishing to the wrong place
Language and frameworkAsk, from supported choicesSelects the right variant
Pipeline with security checksDecideNot optional on the road
Base imageDecide, from an approved listKeeps patching centralised
Branch protection and review rulesDecideSafe defaults, applied at creation
Logging settingsDecideConsistent and not leaking secrets
Visibility (public or private)Ask, default privateA deliberate choice with a safe default
Data classificationAskDrives which policy tier applies

Rules of thumb

  1. Prefer pickers to free text. Backstage's owner picker is a model: fewer typos and valid values.
  2. Default to the safest option. If a field is optional, the default should be the secure one.
  3. Keep the form short. Long forms tempt people to skip the template.
  4. Explain the question. A one line description saves a support message.
  5. Make unsafe choices explicit. If a developer picks public visibility, show a warning and record it.

Validate in the template

Do not rely on the developer to read a policy. Validate input values in the template itself, for example by restricting the allowed repository hosts, as the example does. Then back the template with checks in the pipeline, so a service that has drifted from the defaults is caught later.

Review what the template can do

A template runs actions on your behalf, such as creating repositories. Review it like code, restrict who can edit templates, and keep their steps minimal.

Where Safeguard fits

Safeguard's policies, gates and guardrails apply to the services a template creates, so the defaults you set are checked after creation too. You can try a free scan at gold.safeguard.sh/scan.

Quick check

How many questions should a template ask?

As few as possible. Three to five is a reasonable target for a first version.

Should developers be able to turn off security checks in the form?

No. Offer a documented exception process instead, so the choice is visible and reviewed.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.