Skip to content

CCM-18514: Gitleaks Config Improvements#227

Merged
jamesthompson26-nhs merged 1 commit into
mainfrom
feature/CCM-18514_Gitleaks_Config_Improvements_WSL_Fix
Jul 10, 2026
Merged

CCM-18514: Gitleaks Config Improvements#227
jamesthompson26-nhs merged 1 commit into
mainfrom
feature/CCM-18514_Gitleaks_Config_Improvements_WSL_Fix

Conversation

@jamesthompson26-nhs

@jamesthompson26-nhs jamesthompson26-nhs commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR updates the secret scanning wrapper to support WSL/local Linux shells as well as macOS.

The scan-secrets action previously used a BSD-style script invocation unconditionally when running in an interactive terminal. That worked on macOS, but failed in WSL because GNU script expects the command to be passed via -c. This change adds a small compatibility layer that detects which script variant is available and uses the correct invocation form.

Why

Local pre-commit runs in WSL were failing before gitleaks actually ran, even though the same check passed in GitHub Actions. CI was unaffected because the action already skips the interactive script path when running in a CI environment.

Validation

  • Confirmed the updated shell script has valid syntax with bash -n
  • Confirmed there are no editor-reported errors in the updated script
  • Kept existing GitHub Actions behaviour unchanged while fixing the interactive local/WSL path

Type of changes

  • Refactoring (non-breaking change)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would change existing functionality)
  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I am familiar with the contributing guidelines
  • I have followed the code style of the project
  • I have added tests to cover my changes
  • I have updated the documentation accordingly
  • This PR is a result of pair or mob programming

Sensitive Information Declaration

To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.

  • I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.

@jamesthompson26-nhs jamesthompson26-nhs requested a review from a team as a code owner July 10, 2026 10:24
@jamesthompson26-nhs jamesthompson26-nhs merged commit f2cbcc4 into main Jul 10, 2026
51 checks passed
@jamesthompson26-nhs jamesthompson26-nhs deleted the feature/CCM-18514_Gitleaks_Config_Improvements_WSL_Fix branch July 10, 2026 10:32
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.

3 participants