Skip to content

Add gitleaks secret scan#2

Merged
george-elphick-talieisin merged 1 commit into
mainfrom
chore/add-gitleaks
Apr 23, 2026
Merged

Add gitleaks secret scan#2
george-elphick-talieisin merged 1 commit into
mainfrom
chore/add-gitleaks

Conversation

@george-elphick-talieisin
Copy link
Copy Markdown
Contributor

Wires in the org-wide gitleaks secret-scan reusable workflow. Runs on every PR + push to default branch. Replaces GitHub's paid Secret Protection with a free, org-unified gate.

Copilot AI review requested due to automatic review settings April 23, 2026 20:55
@george-elphick-talieisin george-elphick-talieisin enabled auto-merge (squash) April 23, 2026 20:55
@george-elphick-talieisin george-elphick-talieisin merged commit 3fdadf3 into main Apr 23, 2026
2 checks passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a GitHub Actions workflow to run an org-wide reusable Gitleaks-based secret scan on pull requests and on pushes to selected branches, intended to replace GitHub Secret Protection with a unified, free alternative.

Changes:

  • Introduces a new Secret scan GitHub Actions workflow.
  • Triggers scans on pull_request and on push to main/master.
  • Delegates execution to an org-wide reusable workflow (Talieisin/.github/.../secret-scan.yml).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

branches: [main, master]

jobs:
scan:
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

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

Consider setting explicit minimal permissions for this workflow (or job) so the GITHUB_TOKEN doesn’t inherit broader-than-needed defaults from org/repo settings. Secret scanning typically only needs contents: read (and possibly pull-requests: read depending on the reusable workflow).

Suggested change
scan:
scan:
permissions:
contents: read
pull-requests: read

Copilot uses AI. Check for mistakes.

jobs:
scan:
uses: Talieisin/.github/.github/workflows/secret-scan.yml@main
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

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

The reusable workflow is referenced with @main, which can change over time and introduces a supply-chain risk (a compromised or buggy update would affect this repo immediately). Pin the uses: ref to a tagged release or a specific commit SHA and update it intentionally when you want new behavior.

Suggested change
uses: Talieisin/.github/.github/workflows/secret-scan.yml@main
uses: Talieisin/.github/.github/workflows/secret-scan.yml@0123456789abcdef0123456789abcdef01234567

Copilot uses AI. Check for mistakes.
Comment on lines +4 to +5
push:
branches: [main, master]
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

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

The PR description says this runs on push to the default branch, but the workflow is hard-coded to only run on pushes to main or master. If this repo’s default branch is different (or gets renamed), pushes won’t be scanned. Update on.push.branches to match the actual default branch for this repo (and avoid listing branches you don’t intend to support).

Copilot uses AI. Check for mistakes.
@george-elphick-talieisin george-elphick-talieisin deleted the chore/add-gitleaks branch April 24, 2026 07:51
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.

2 participants