I have a shell-based concourse task which uses semi-sensitive credentials (a key to a test server) in one of its commands. I'd like to avoid this being logged in the task output.
The gist of the pipeline is:
jobs:
- name: foobar
  plan:
  <...>
  - task: build
    config:
      platform: linux
      image_resource:
        type: docker-image
        source:
          repository: ubuntu
      <...>
      run:
        path: bash
        args:
        - -exc
        - |
          command-which-is-ok-to-print
          foobar {{my-secret-data}}               # <-- hide this one!
          another-command-which-is-ok-to-print
Currently the output appears as:
+ command-which-is-ok-to-print
results of first command which are OK to print
+ foobar "oh-no-secret-data-here!"                  <-- hide this one!
more results which are OK to print
+ another-command-which-is-ok-to-print
even more results which are OK to print
Is there a way to suppress printing this specific line?
                        
I twigged that
-excwas actually setting the flagseandx(I'd assumed it was short-hand forexecute!The
-xis what causes the commands to be echoed (by bash itself rather than concourse), so this successfully prevented a single command being executed: