Sooner or later every delivery team notices the same thing: the vulnerability scan job in one repository looks almost exactly like the one in the next, and the one after that. Someone copied it once, someone tweaked it, and now there are a dozen slightly different versions, each with its own odd behaviour. This friendly FAQ answers the questions teams tend to ask when they decide to stop rebuilding pipeline steps and start reusing the ones that already work.
The examples lean towards secure delivery, since that is where repeated steps such as dependency checks, secret scanning and image builds are easiest to spot. The ideas apply to any pipeline.
What does “reusing what already works” mean for a pipeline?
It means keeping a step that has proven itself, such as a dependency check that catches real problems without drowning people in noise, in one shared, named place, and having other pipelines call it instead of carrying their own copy. Many CI systems support this directly: reusable workflows in GitHub Actions, shared libraries in Jenkins and include files in similar tools. The details differ, but the shape is the same: define once, call many times, change in one spot.
Why not just copy the YAML each time?
Copying feels quick, and for the first or second use it is. The cost shows up later. When a scanner changes its output format or a flag is deprecated, you must hunt down every copy. Some copies get updated, others do not, and the differences go unnoticed until one of them silently stops catching anything. A shared step turns that hunt into a single edit.
That said, copying is a perfectly fine starting move while you work out whether a step is genuinely general. The mistake is leaving it as copies forever.
How do we decide which steps deserve to be shared?
Look for steps that satisfy three conditions. First, they appear in at least three places. Second, their purpose is stable: “check dependencies for known problems” is stable, while “deploy this particular service” is not. Third, the people who use them can describe what they should do in a sentence. Steps that meet all three are good candidates. Everything else can stay local until it earns promotion.
What should a shareable step include?
- A clear name. Something like “dependency-check” tells readers more than “step-3-v2”.
- Inputs with sensible defaults. Language version, severity threshold, paths to ignore. Defaults make the common case a one-liner.
- A short README. Purpose, inputs, outputs, known limits and the date it was last verified.
- A version tag. So consumers can pin to a known-good release and upgrade on purpose.
- A tiny test. A sample project that proves the step still passes and still fails when it should.
Won’t a shared step slow every team down?
It can if you run it badly, so run it well. Let teams pin versions so one change never lands everywhere at once. Announce updates with short release notes. Keep the shared step small; if it grows branches for every team’s special case, split it into two or three focused steps. A good shared step feels like a well-labelled drawer: you open it, find what you need and shut it again.
Who owns the shared step?
Someone must, and that is easy to forget. Name a role (not necessarily a full-time job) responsible for reviewing changes, answering questions and retiring the step if it becomes obsolete. Without an owner, shared steps drift into the same state as the copies they replaced. A quick quarterly glance, asking “does this still do what the README says?”, is usually enough.
How do we handle a team that needs something different?
Offer a small, documented option rather than a fork. If one service needs a stricter severity threshold, expose that as an input. If its needs are truly unusual, let that team keep a local step but link it to the shared one in a comment, so the difference is visible and deliberate. Forks that nobody tracks are exactly what you are trying to avoid.
Can you give a concrete example?
Take secret scanning. Early on, each repository has its own job that runs a scanner over the commit history. One team tuned theirs to ignore test fixtures; another never did, and its developers learned to ignore the noisy results. The team with the tuned version writes a short shared step: it takes the scan path and an allow-list file as inputs, fails the build on genuine matches and prints a friendly message pointing to the fix. Other teams switch over one at a time. Months later the scanner is updated; the owner changes one file, tests it against the sample project and releases a new tag. Nobody spends a week chasing copies.
The plot has no trick in it: a proven piece sits in a findable place, bends through its inputs and gets improved in exactly one spot. Add a note in each consumer repository saying where the shared step lives, so newcomers can trace it.
What about secrets and permissions inside shared steps?
Treat them with extra care. A shared step should ask for the least access it needs and should never embed credentials. Pass secrets in through your platform’s normal mechanism, and have the README spell out which permissions the step expects. Review changes to shared steps more carefully than changes to a single repository, because one edit reaches many places. A second reviewer on that code is cheap insurance.
What about the planning side, not just code?
Reuse is not only technical. Requirement lists, review questions and launch checklists repeat from project to project as well. A good starting point is an existing question list, like the checklist of pre-build queries in a guide for teams about to commission a bespoke web app, which you can adapt as a reusable intake step. A project that begins with a proven set of questions tends to discover surprises earlier.
Likewise, requirement documents benefit from a stable skeleton. The outline in a deep dive into engineering blueprints for web requirements is the kind of structure worth saving and trimming rather than redrawing for every new brief.
How do we start without a big programme?
- Pick the one step that appears in the most repositories.
- Compare the copies and choose the version that has caught real issues.
- Move it to a shared location with a name, a README and a version tag.
- Switch one friendly team over and ask them what felt awkward.
- Fix the rough edges, then migrate the remaining teams one at a time.
Do not try to share everything at once. One well-chosen step, done properly, builds the trust that makes the second and third easy.
Where else do people get ideas for repeatable formats?
Teams sometimes look outside engineering for inspiration. RanchiOrbit, for example, is an events website whose pages cover events, venues, a discussion forum, a blog and stories, and that repeating layout is a fair reminder that consistent structure helps people find things faster.
How do we know it worked?
Look for quieter signals rather than dramatic numbers. New repositories get a working pipeline faster. Updates to a scanner no longer require a week of chasing copies. Fewer questions arrive on the team chat about “which version of the check are we meant to use?” And, importantly, the shared step has an owner, a changelog and a reason to exist. If those are true, the reuse is paying its way.
When should we not reuse a step?
When the step is still changing every week, when only one team will ever use it, or when the shared version would need so many options that nobody can read it. In those cases, keep it local and revisit later. Reuse is a tool for stable, repeated work, not a rule that everything must be shared.
What is the short version?
Keep the pipeline steps that already work in one named place, version them, give them an owner and let teams call them instead of copying them. Adapt through inputs, not forks. Return improvements to the original. Do that, and your delivery pipelines get steadier with every project instead of messier.

