Skip to content

Add secret scanner workflow#34

Merged
dkastl merged 1 commit into
mainfrom
dkastl-patch-1
May 19, 2026
Merged

Add secret scanner workflow#34
dkastl merged 1 commit into
mainfrom
dkastl-patch-1

Conversation

@dkastl

@dkastl dkastl commented May 19, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Chores
    • Enhanced pull request validation with automated security scanning for secret leak detection.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 19, 2026

Copy link
Copy Markdown

Walkthrough

A new GitHub Actions workflow is added to .github/workflows/secret-leak-check.yml that runs secret scanning on pull requests targeting the main branch. The workflow delegates to a reusable workflow with strict preset configuration and optional custom overrides for Betterleaks config, failure behavior, and secret validation.

Changes

Secret Leak Check Workflow

Layer / File(s) Summary
Workflow metadata and permissions configuration
.github/workflows/secret-leak-check.yml
The workflow runs on pull_request events targeting main branch with read-only repository contents access and write access to pull requests.
Secret scanning job delegation
.github/workflows/secret-leak-check.yml
A scan job invokes the reusable geolonia/.github/.github/workflows/reusable-secret-leak-check.yml@v1 workflow with strict preset, along with commented options to override Betterleaks config path, fail/warn behavior, and optional active secret validation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Possibly related issues

  • geolonia/geolonia-operations#60: Describes the setup and use of secret scanning that directly depends on the reusable workflow this PR configures.

Possibly related PRs

  • geolonia/.github#24: Implements the reusable-secret-leak-check.yml reusable workflow that is invoked by this workflow's scan job.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning No pull request description was provided by the author. The template requires a Summary section and optional sections for checklist and related issues. Add a pull request description following the template, including a Summary section that explains the purpose and impact of the new secret scanner workflow.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add secret scanner workflow' clearly and specifically describes the main change: adding a new GitHub Actions workflow for secret scanning.
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 dkastl-patch-1

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

@github-actions

Copy link
Copy Markdown

Secret Leak Check

OK No secrets detected in this PR's diff.

@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

🤖 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/secret-leak-check.yml:
- Line 13: The workflow currently references the reusable workflow with a
mutable tag
"geolonia/.github/.github/workflows/reusable-secret-leak-check.yml@v1"; replace
the tag with the repository's immutable commit SHA (e.g., @<commit-sha>) to pin
the exact revision, and optionally retain the human-friendly "`@v1`" as a trailing
comment for readability; update the "uses:" entry to use the commit SHA so CI
behavior can’t change silently.
🪄 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: 5e6432db-aff1-40b2-9e3e-b97ec56a1efe

📥 Commits

Reviewing files that changed from the base of the PR and between 4eaf9e0 and c14a793.

📒 Files selected for processing (1)
  • .github/workflows/secret-leak-check.yml


jobs:
scan:
uses: geolonia/.github/.github/workflows/reusable-secret-leak-check.yml@v1

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Resolve the current commit behind tag v1
gh api repos/geolonia/.github/tags --paginate --jq '.[] | select(.name=="v1") | .commit.sha' | head -n1

Repository: geolonia/.github

Length of output: 101


🏁 Script executed:

# Check if the file exists and read the relevant line
if [ -f ".github/workflows/secret-leak-check.yml" ]; then
  echo "File exists. Reading line 13:"
  sed -n '13p' ".github/workflows/secret-leak-check.yml"
else
  echo "File not found"
fi

Repository: geolonia/.github

Length of output: 169


Pin the reusable workflow to an immutable commit SHA.

Line 13 uses @v1 (mutable tag), which can silently change behavior and weaken CI supply-chain integrity. Pin to the commit SHA and keep the tag as a comment for readability.

Suggested change
-    uses: geolonia/.github/.github/workflows/reusable-secret-leak-check.yml@v1
+    uses: geolonia/.github/.github/workflows/reusable-secret-leak-check.yml@4eaf9e08b1c0b8b193de37400850e2a8ea63acd2 # v1
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
uses: geolonia/.github/.github/workflows/reusable-secret-leak-check.yml@v1
uses: geolonia/.github/.github/workflows/reusable-secret-leak-check.yml@4eaf9e08b1c0b8b193de37400850e2a8ea63acd2 # v1
🤖 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/secret-leak-check.yml at line 13, The workflow currently
references the reusable workflow with a mutable tag
"geolonia/.github/.github/workflows/reusable-secret-leak-check.yml@v1"; replace
the tag with the repository's immutable commit SHA (e.g., @<commit-sha>) to pin
the exact revision, and optionally retain the human-friendly "`@v1`" as a trailing
comment for readability; update the "uses:" entry to use the commit SHA so CI
behavior can’t change silently.

@dkastl dkastl merged commit 00eaf42 into main May 19, 2026
2 checks passed
dkastl added a commit that referenced this pull request May 19, 2026
The wrapper here (introduced in #34) accidentally had an active
`with: preset: strict` line that got uncommented during an earlier
edit. With the preset input being removed in this PR, that line would
trigger an "unknown input `preset`" warning on every PR scan.

Also drops the long preset-related comment block and aligns the
example overrides with the new workflow-templates/secret-leak-check.yml.
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