Summary
None of the GitHub Actions workflow files in Eyevinn/intercom-manager declare an explicit permissions: block at the workflow or job level. Every workflow run therefore receives the GitHub-default GITHUB_TOKEN permissions, which include write access to contents, pull-requests, packages, and more — far broader than most jobs need.
The workflow_dispatch workflow (dispatch.yml) is the highest-risk: it only needs to trigger a repository dispatch event but implicitly holds write access to the entire repository.
Affected Files
.github/workflows/dispatch.yml
.github/workflows/lint.yml
.github/workflows/pretty.yml
.github/workflows/typescript.yml
.github/workflows/unittests.yml
.github/workflows/publish.yml
.github/workflows/development.yml
.github/workflows/release-notes.yml
Risk
If any workflow step is compromised (e.g., via a malicious action or a script injection attack), the overly-permissive GITHUB_TOKEN can be used to push code, approve pull requests, modify releases, or read/exfiltrate secrets. This is documented in GitHub's supply-chain security guidance.
Recommended Fix
Add a top-level permissions: read-all default (or contents: read) to every workflow, then grant only the minimum required permissions at the job level.
Minimal read-only baseline (add to all CI workflows — lint, pretty, typescript, unittests):
permissions:
contents: read
publish.yml (pushes to Docker Hub — GITHUB_TOKEN not used for writes):
permissions:
contents: read
release-notes.yml (creates a GitHub release):
permissions:
contents: write
dispatch.yml (repository dispatch only — REPO_DISPATCH_TOKEN is a PAT, GITHUB_TOKEN unused):
permissions:
contents: read
References
Summary
None of the GitHub Actions workflow files in
Eyevinn/intercom-managerdeclare an explicitpermissions:block at the workflow or job level. Every workflow run therefore receives the GitHub-default GITHUB_TOKEN permissions, which include write access to contents, pull-requests, packages, and more — far broader than most jobs need.The
workflow_dispatchworkflow (dispatch.yml) is the highest-risk: it only needs to trigger a repository dispatch event but implicitly holds write access to the entire repository.Affected Files
.github/workflows/dispatch.yml.github/workflows/lint.yml.github/workflows/pretty.yml.github/workflows/typescript.yml.github/workflows/unittests.yml.github/workflows/publish.yml.github/workflows/development.yml.github/workflows/release-notes.ymlRisk
If any workflow step is compromised (e.g., via a malicious action or a script injection attack), the overly-permissive GITHUB_TOKEN can be used to push code, approve pull requests, modify releases, or read/exfiltrate secrets. This is documented in GitHub's supply-chain security guidance.
Recommended Fix
Add a top-level
permissions: read-alldefault (orcontents: read) to every workflow, then grant only the minimum required permissions at the job level.Minimal read-only baseline (add to all CI workflows — lint, pretty, typescript, unittests):
publish.yml(pushes to Docker Hub — GITHUB_TOKEN not used for writes):release-notes.yml(creates a GitHub release):dispatch.yml(repository dispatch only — REPO_DISPATCH_TOKEN is a PAT, GITHUB_TOKEN unused):References