When you create or edit JFrog Platform Workers, you can create secrets associated with the worker. These secrets are not stored in plain text in contrast to the worker source code. The secret's clear-text value is never returned in an API or UI and will be masked from all the logs.
When you create a worker in Workers editor, in the Secrets screen, you can add secrets to the worker.
Enter the name and a value for a secret.
Click Add Secret if you want to add more secrets.
Retrieve the Secret within a Worker
To retrieve a secret in the context of a worker, in the Workers online editor, you would use the following syntax:
context.secrets.get('secretName')
This code can be entered into the worker's function by adding it in the Workers online editor and can be added using auto-complete.