Skip to content

Step set-pipeline can take invalid/problematic target pipeline name (in conjunction with instanced pipelines) #8475

Closed

Description

@holgerstolzenberg

Summary

We introduced a new pipeline for building hotfixes leveraging the new instanced pipeline feature.
Everything works so far, the issue arose as we gave the new instance pipeline a name containing a / without further thinking about it (pipeline name: hotfix/foo-bar-baz.

The pipeline then was created successfully, but could not be accessed via UI as the / broke the frontend URL handling. Using an URL escaped / also didn't help and would only be workaround.

Also deleting the instanced pipeline was a bit messy.

Steps to reproduce

  • build a pipeline the the creates an instanced pipeline
  • give the target pipeline a name containing a `/``
  • Let the instanced pipeline be created by Concourse
  • Try to access the new instanced pipeline via UI
  • Try to get rid of the instanced pipeline

Expected results

The set-pipeline step should somehow sanitise or validate the target name of the instance pipeline to create and make sure it fits the required naming conventions. An easy solution could be to just disallow / in the name and presenting a proper error message to the user.

Actual results

Target name of instanced pipeline is not validated and can contain /.

Triaging info

  • Concourse version: 7.8.1
  • Browser (if applicable): Chrome Mac 03.0.5060.114 (Official Build) (x86_64)

Activity

  1. will-gant commented on Jul 22, 2022

    @will-gant

    @holgerstolzenberg Perhaps you could share the full fly command that you ran, including flags, together with a screenshot of the UI that includes your address bar. I just tried to reproduce this on a local dev Concourse (built from the head of master) and couldn't.

    Setting with a pipeline name containing a forward slash fails as expected (fly set-pipeline has disallowed this since version 4.2.2):

    $ fly --target dev sp -p multiple/forward/slashes --config pipeline.yml
    error: pipeline name cannot contain '/'
    

    Setting a pipeline with an instance variable that contains a forward slash is permitted...

    $ fly -t dev sp -p multipleforwardslashes -c pipeline.yml --instance-var=testvar=kgaeo/aje/jaeg
    ...
    
    apply configuration? [yN]: y
    pipeline created!
    

    ...and this renders properly in my browser (Brave version 1.41.96) because those forward slashes are URL-encoded:

    Screenshot 2022-07-22 at 22 50 42

  2. holgerstolzenberg commented on Aug 1, 2022

    @holgerstolzenberg
    Author

    The key point might be that I did not set the pipeline via the fly command but rather using a job that creates instanced pipelines leveraging the set-pipeline step.

    That is also described in the initial issue report. You might not be able to reproduce this one by using fly cli.

  3. ceco556 commented on May 8, 2025

    @ceco556
    Contributor

    I've tested it in a local Concourse instance and indeed the "/" is breaking the url to the pipeline. This issue is similar to #8725.

    Set_pipeline step calls ValidateIdentifier which sends only warnings when there are illegal characters such as "/":

    func ValidateIdentifier(identifier string, context ...string) (*ConfigWarning, error) {

    My suggestion is the same, ValidateIdentifier must return error when there are illegal characters instead of warning. I will let you know once there is update on the issue.

  4. moved this from Icebox to Backlog in Concourse Roadmapon Mar 25, 2026
  5. moved this from Backlog to In progress in Concourse Roadmapon Apr 17, 2026
  6. moved this from In progress to Done in Concourse Roadmapon Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions