Skip to content

[Bug]: Automated Code Commits with Privileged Token #1589

@gcatanese

Description

@gcatanese

Description

Automated Code Commits with Privileged Token

Overview

We have recently conducted a security scan of our GitHub repositories to ensure our CI/CD pipelines are secure. We identified misconfigurations in GitHub Actions workflows (e.g., injection risks, unpinned actions).

File: .github/workflows/format.yml

Description

The workflow automatically runs npm install, modifies code, and pushes directly to a branch using a privileged token (ADYEN_AUTOMATION_BOT_ACCESS_TOKEN). A compromised dependency could exploit this to push malicious code to the repository. Additionally, actions/setup-node is not pinned to a commit hash.

Remediation

Pin all actions to a specific commit hash. Instead of pushing directly, modify the workflow to create a pull request that requires human review. Use npm ci with a checked-in package-lock.json instead of npm install to ensure dependency integrity.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions