Skip to content

ci: SHA-pin GitHub Actions + pinact gate, Dependabot, .pinact.yml (#144)#51

Merged
dkastl merged 1 commit into
mainfrom
feat/actions-sha-pinning
Jun 9, 2026
Merged

ci: SHA-pin GitHub Actions + pinact gate, Dependabot, .pinact.yml (#144)#51
dkastl merged 1 commit into
mainfrom
feat/actions-sha-pinning

Conversation

@dkastl

@dkastl dkastl commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Adopts the org GitHub Actions pinning standard (geolonia-operations#144, epic geolonia-operations#142). Follows the merged pilot (geolonia-infra-cdk).

What changed

  • SHA-pin every action (with a # vX.Y.Z comment) via pinact v4.
  • .pinact.yml (canonical, copied from geolonia/.github): min_age 7 days/always, two-space separator, and a rule exempting geolonia/* from the cooldown (we author our own releases).
  • .github/dependabot.yml: github-actions weekly, cooldown: 8 (one day over the 7-day min_age so Dependabot PRs always clear the pinact gate on arrival), groups batching minor/patch into one PR (majors + security stay individual).
  • .github/workflows/pinact-check.yml: per-PR Action Pinning Check calling geolonia/.github/.github/workflows/reusable-pinact-check.yml@v1.

Verification

pinact run --verify --verify-min-age passes locally. The new Action Pinning Check job validates this in CI.

Summary by CodeRabbit

  • Chores
    • Enhanced GitHub Actions security by pinning workflow actions to specific commit hashes instead of floating version tags, reducing supply chain risks.
    • Automated dependency updates for GitHub Actions with a weekly schedule and cooldown period.
    • Added action pinning verification configuration to enforce security standards across workflows.

@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

This PR implements organization-wide GitHub Actions SHA pinning by introducing Dependabot configuration for automated dependency updates, pinact verification to enforce pinning rules, and pinning all individual GitHub Actions and reusable workflow references to specific commit SHAs across the workflow suite.

Changes

GitHub Actions Pinning and Verification

Layer / File(s) Summary
Dependabot configuration for automated action updates
.github/dependabot.yml
Adds Dependabot configuration for github-actions with weekly scheduling, 8-day cooldown, and grouping rules to batch minor and patch updates into single PRs while leaving major updates ungrouped.
Pinact verification infrastructure and configuration
.pinact.yml, .github/workflows/pinact-check.yml, pinact/.pinact.yml
Root .pinact.yml enforces 7-day minimum action release age globally and exempts geolonia/* actions with zero minimum age; new pinact-check.yml workflow verifies action SHA pinning on PRs; pinact/.pinact.yml clarifies default single-space separator behavior and Prettier compatibility.
Reusable workflow reference pinning at caller sites
.github/workflows/publish-techdocs.yml, .github/workflows/release-auto-on-tag.yml, .github/workflows/secret-leak-check.yml
Pins reusable workflow references to specific commit SHAs (v1.15.1) instead of floating @v1 tags in three caller workflows.
GitHub Actions pinning in TechDocs reusable workflow
.github/workflows/reusable-backstage-techdocs.yml
Pins five GitHub Actions to specific commit SHAs: actions/checkout (v6.0.2), actions/setup-node (v6.4.0), actions/setup-python (v6.2.0), mikefarah/yq (v4.53.2), and aws-actions/configure-aws-credentials (v6.1.3).
GitHub Actions pinning in pinact check reusable workflow
.github/workflows/reusable-pinact-check.yml
Pins actions/checkout and suzuki-shunsuke/pinact-action to specific commit SHAs with matching inline version comments to pass pinact verification checks.
GitHub Actions pinning in remaining reusable workflows
.github/workflows/reusable-cdk-deploy-monitor.yml, .github/workflows/reusable-bumblebee-scan.yml, .github/workflows/reusable-release-auto-on-tag.yml, .github/workflows/reusable-secret-leak-check.yml, .github/workflows/reusable-sync-team-access.yml
Systematically pins GitHub Actions across five reusable workflows: aws-actions/configure-aws-credentials in CDK deploy monitor; actions/checkout and actions/upload-artifact in Bumblebee scan; actions/checkout and actions/create-github-app-token in release auto-on-tag; actions/checkout and actions/upload-artifact in secret-leak-check; and actions/checkout, mikefarah/yq, and actions/create-github-app-token in sync-team-access.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related issues

Possibly related PRs

  • geolonia/.github#49: Both PRs update pinact YAML configuration to enforce version: 3 and geolonia/.* action exemptions with 7-day min_age rules.
  • geolonia/.github#50: Both PRs coordinate Dependabot's 8-day cooldown with pinact's 7-day min_age enforcement and documentation.
  • geolonia/.github#48: Both PRs introduce pinact verification infrastructure via the pinact-check workflow and root .pinact.yml minimum-age rules.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main changes: SHA-pinning GitHub Actions, adding pinact gate, Dependabot configuration, and .pinact.yml file.
Description check ✅ Passed The description covers the main changes comprehensively, including what changed, configuration details, and verification steps, though it doesn't follow the template structure.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/actions-sha-pinning

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

Secret Leak Check

OK No secrets detected in this PR's diff.

Adopts the org GitHub Actions pinning standard (geolonia-operations#144,
epic geolonia-operations#142).

- SHA-pin every action with a version comment via pinact.
- .pinact.yml: canonical config (min_age 7 days/always; geolonia/* exempt
  from the cooldown since we author our own releases).
- .github/dependabot.yml: github-actions weekly, cooldown 8 (one over the
  7-day min_age), groups minor/patch into one PR (majors + security individual).
- .github/workflows/pinact-check.yml: per-PR Action Pinning Check calling
  geolonia/.github reusable at v1.
@dkastl dkastl force-pushed the feat/actions-sha-pinning branch from 62a3f45 to 7ec3e91 Compare June 8, 2026 22:50
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

Secret Leak Check

OK No secrets detected in this PR's diff.

@dkastl

dkastl commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown
✅ Action performed

Full review finished.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/reusable-sync-team-access.yml (1)

84-90: ⚠️ Potential issue | 🟠 Major

Explicitly scope the GitHub App token permissions for the dispatch token.

actions/create-github-app-token@v3.2.0 in .github/workflows/reusable-sync-team-access.yml scopes only owner/repositories; there are no permission-* inputs in the actions/create-github-app-token usages under .github/workflows, so the minted token can inherit broader installation permissions than needed. Add only the minimal permission-* scope(s) required for the subsequent repository dispatch call.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/reusable-sync-team-access.yml around lines 84 - 90, The
workflow currently uses
actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 to mint
a token (see the step that passes repositories: ${{
steps.target.outputs.repo_name }}) but does not set any permission-* inputs, so
the token may inherit overly-broad installation permissions; update that
create-github-app-token step to include explicit minimal permission-* inputs
required by the later repository_dispatch call (identify the repository_dispatch
step that targets ${{ steps.target.outputs.repo_name }} and add only the
corresponding permission-* keys with least privilege), ensuring you reference
the same action usage
(actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1) and
preserve client-id, private-key, repositories, owner inputs.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/reusable-release-auto-on-tag.yml:
- Around line 125-128: The GitHub App token created by
actions/create-github-app-token is not scoped and inherits all installation
permissions; restrict it to least privilege by adding the permissions input and
set contents: write so the token only allows pushing tags. Update the step that
uses actions/create-github-app-token@... (the one with inputs client-id and
private-key) to include a permissions mapping with permission-contents: write
(i.e., the permissions: contents: write equivalent) so the token cannot use
broader installation rights.

---

Outside diff comments:
In @.github/workflows/reusable-sync-team-access.yml:
- Around line 84-90: The workflow currently uses
actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 to mint
a token (see the step that passes repositories: ${{
steps.target.outputs.repo_name }}) but does not set any permission-* inputs, so
the token may inherit overly-broad installation permissions; update that
create-github-app-token step to include explicit minimal permission-* inputs
required by the later repository_dispatch call (identify the repository_dispatch
step that targets ${{ steps.target.outputs.repo_name }} and add only the
corresponding permission-* keys with least privilege), ensuring you reference
the same action usage
(actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1) and
preserve client-id, private-key, repositories, owner inputs.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 13ef1b76-956a-48ae-bd21-8fd64bc96de7

📥 Commits

Reviewing files that changed from the base of the PR and between 008b07e and 7ec3e91.

📒 Files selected for processing (14)
  • .github/dependabot.yml
  • .github/workflows/pinact-check.yml
  • .github/workflows/publish-techdocs.yml
  • .github/workflows/release-auto-on-tag.yml
  • .github/workflows/reusable-backstage-techdocs.yml
  • .github/workflows/reusable-bumblebee-scan.yml
  • .github/workflows/reusable-cdk-deploy-monitor.yml
  • .github/workflows/reusable-pinact-check.yml
  • .github/workflows/reusable-release-auto-on-tag.yml
  • .github/workflows/reusable-secret-leak-check.yml
  • .github/workflows/reusable-sync-team-access.yml
  • .github/workflows/secret-leak-check.yml
  • .pinact.yml
  • pinact/.pinact.yml

Comment thread .github/workflows/reusable-release-auto-on-tag.yml
@dkastl dkastl merged commit f217e1e into main Jun 9, 2026
3 checks passed
@dkastl dkastl deleted the feat/actions-sha-pinning branch June 9, 2026 00:17
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.

1 participant