For the complete documentation index, see llms.txt. This page is also available as Markdown.
Cortex CloudApplication Security

Pipeline uploads the GITHUB_TOKEN in an artifact

Rule Details

Cortex AppSec Rule ID

APPSEC_CICD_340

Category

Credential Hygiene

Severity

CRITICAL

Impact

The pipeline uploads artifacts that may contain the local .git folder which crucially includes a GitHub Actions runner token (GITHUB_TOKEN). These artifacts are accessible to any user with read permission against the repository. In public repositories, they are also publicly available. The actions/checkout GitHub Action stores the GITHUB_TOKEN in the local .git folder by default. Uploading this folder exposes the token along with the artifact. The GitHub Actions job token is a short-lived token that allows actions to be performed against the repository while the workflow job is running. However, attackers might be able to download artifacts storing the token, extract it and use it before the job ends. This vulnerability arises from v4 of actions/checkout, where the artifact is available for download even before the workflow ends. Depending on the pipeline permissions, attackers could potentially use the token to push malicious code to the repository, publish packages, and steal secrets.

Last updated

Was this helpful?