Summary
None of the GitHub Actions workflow files in Eyevinn/intercom-frontend 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 (run-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/run-dispatch.yml
.github/workflows/run-lint.yml
.github/workflows/run-prettier.yml
.github/workflows/run-typescript.yml
.github/workflows/run-unittests.yml
.github/workflows/run-e2e.yml
.github/workflows/run-publish.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.
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, prettier, typescript, unittests, e2e):
permissions:
contents: read
run-publish.yml (pushes to Docker Hub — GITHUB_TOKEN is not used for writes):
permissions:
contents: read
release-notes.yml (creates a GitHub release):
permissions:
contents: write
run-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-frontenddeclare 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 (run-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/run-dispatch.yml.github/workflows/run-lint.yml.github/workflows/run-prettier.yml.github/workflows/run-typescript.yml.github/workflows/run-unittests.yml.github/workflows/run-e2e.yml.github/workflows/run-publish.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.
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, prettier, typescript, unittests, e2e):
run-publish.yml(pushes to Docker Hub — GITHUB_TOKEN is not used for writes):release-notes.yml(creates a GitHub release):run-dispatch.yml(repository dispatch only — REPO_DISPATCH_TOKEN is a PAT, GITHUB_TOKEN unused):References