Add secret scanner workflow#34
Conversation
WalkthroughA new GitHub Actions workflow is added to ChangesSecret Leak Check Workflow
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Secret Leak CheckOK No secrets detected in this PR's diff. |
There was a problem hiding this comment.
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
📒 Files selected for processing (1)
.github/workflows/secret-leak-check.yml
|
|
||
| jobs: | ||
| scan: | ||
| uses: geolonia/.github/.github/workflows/reusable-secret-leak-check.yml@v1 |
There was a problem hiding this comment.
🧩 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 -n1Repository: 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"
fiRepository: 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.
| 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.
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.
Summary by CodeRabbit