Creating task input secrets

Sometimes to run the tasks properly, you may need to pass secrets to these tasks. Consult the documentation for these tasks to understand the proper specification of the secrets required, for example the required keys/values.

One such task is the sast-snyk-check task that uses the third-party service snyk to perform static application security testing (SAST) as a part of the default Konflux pipeline. Use this procedure to upload your snyk.io token. Name the secret snyk-secret and use the key snyk_token so that the snyk task in the Konflux pipeline will be able to access and use the token.
Procedure
  1. In Konflux, from the left navigation menu, select Secrets.

  2. From the Secrets page, click Add secret.

  3. For Secret type, select Key/value secret

  4. For Secret name, enter a unique name for your secret.

  5. Under Key/value secret, expand Key/value 1, then enter a key.

  6. For Upload the file with value for your key or paste its contents, do one of the following:

    • Click Upload to browse to, select, and upload the file that contains your key value.

    • Drag the file that contains your key value into the space under Upload.

    • Paste the contents of the file that contains your key value into the space under Upload. Click Clear to remove the contents of the space under Upload.

  7. Optional: Click Add another key/value.

  8. Optional: Under Labels, add a label to tag or provide more context for your secret.

  9. Click Add secret.