cnb:destroy-token
About 209 wordsLess than 1 minute
cnb:destroy-token
A CNB_TOKEN is created before the pipeline starts and destroyed after it ends. This task moves that earlier: it proactively destroys the CNB_TOKEN and removes the environment variable.
When to use it: when the pipeline no longer needs the CNB_TOKEN and you want to revoke its permission as early as possible - for example destroying it right after the operations that required it, reducing the risk of it being misused by later tasks.
Applicable Events
Parameters
None
Output
None
Configuration Examples
Proactively destroy the CNB_TOKEN after use in the pipeline to reduce the risk of CNB_TOKEN misuse.
.cnb.yml
main:
push:
- stages:
- name: use CNB_TOKEN
script: echo "Make API calls using the CNB_TOKEN."
- name: destroy token
type: cnb:destroy-token