Skip to content

ci: add permissions, a concurrency group, and pin actions to SHAs - #50

Open
sidgaikwad wants to merge 1 commit into
unlayer:mainfrom
sidgaikwad:ci/harden-workflow
Open

ci: add permissions, a concurrency group, and pin actions to SHAs#50
sidgaikwad wants to merge 1 commit into
unlayer:mainfrom
sidgaikwad:ci/harden-workflow

Conversation

@sidgaikwad

Copy link
Copy Markdown
Contributor

Fixes #33.

Three standard hardening/efficiency settings, no behavioural change to what CI actually runs.

permissions: contents: read

Neither job declared permissions, so both ran with the repository-wide default GITHUB_TOKEN scopes. They only need to read the repo — the Codecov step authenticates with secrets.CODECOV_TOKEN, not the workflow token.

concurrency group

Pushing twice in quick succession to a PR left the superseded run occupying runners for the full 6-job matrix. Guarded on github.event_name == 'pull_request' so pushes to main still run to completion rather than cancelling each other.

SHA-pinned actions

actions/checkout, actions/setup-node and codecov/codecov-action were on floating major tags.

These pins are the exact commits v4 / v4 / v5 resolve to right now, so nothing about what executes changes — this is purely removing the mutable indirection:

Action SHA Tag
actions/checkout 11d5960 v4.4.0
actions/setup-node 49933ea v4.4.0
codecov/codecov-action 0fb7174 v5.5.5

I deliberately did not bump the majors (v7/v7/v7 are current) — that is a separate change, and .github/dependabot.yml already watches the github-actions ecosystem, so Dependabot will open those PRs and keep the SHAs current from here on.

- permissions: contents: read. Both jobs only read the repo; the Codecov
  upload authenticates with its own token, not the workflow token.
- concurrency: cancel superseded PR runs. Pushing twice to a PR left the
  earlier 6-job matrix occupying runners for a result nobody reads.
  Guarded on pull_request so main pushes still run to completion.
- Pin actions/checkout, actions/setup-node and codecov/codecov-action to
  commit SHAs with version comments. The pins are the exact commits the
  v4/v4/v5 tags resolve to today, so this changes nothing about what runs.

Dependabot already watches the github-actions ecosystem, so it keeps the
SHAs current automatically.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 4, 2026

Copy link
Copy Markdown

@sidgaikwad is attempting to deploy a commit to the Unlayer Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: add permissions, a concurrency group, and SHA-pin actions

1 participant