In plain words
Secrets in CI are the keys and tokens your pipeline uses to test and deploy, stored encrypted in the CI service and handed only to the jobs that need them, never written into the repository.
Where you see it
In GitHub, Settings, then Secrets and variables, then Actions holds secrets like STRIPE_TEST_KEY. A workflow reads one as ${{ secrets.STRIPE_TEST_KEY }}, and GitHub replaces the value with *** if it appears in the log.
What goes wrong
- Printing a secret in a form the mask misses
GitHub hides exact copies of a secret, not the same value base64-encoded, split up or tucked inside a JSON blob. Never echo secrets or turn on verbose logging in steps that use them.
- Running untrusted pull requests with secrets
Workflows triggered by pull_request_target run with your secrets, even for pull requests from forks. Checking out and running the fork's code there hands your keys to a stranger.
- Long-lived cloud keys stored as secrets
An AWS key pasted into secrets works until it leaks, and nobody ever rotates it. Where your cloud supports it, use OpenID Connect so each run gets a short-lived credential instead.
What to tell your agent
Quick check
Sign in to earn +10 XP for itA Harbor workflow step runs echo $STRIPE_KEY | base64 while debugging. The log shows a long encoded string. Is the key safe?