Skip to content

CCM-18514: Gitleaks Config Improvements#225

Merged
jamesthompson26-nhs merged 3 commits into
mainfrom
feature/CCM-18514_Gitleaks_Config_Improvements
Jul 8, 2026
Merged

CCM-18514: Gitleaks Config Improvements#225
jamesthompson26-nhs merged 3 commits into
mainfrom
feature/CCM-18514_Gitleaks_Config_Improvements

Conversation

@jamesthompson26-nhs

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

Copy link
Copy Markdown
Contributor

Description

Updated the secret-scanning hook to provide clearer, actionable guidance when a secret finding is detected, while preserving normal gitleaks behavior and keeping CI execution predictable.

  • Added explicit remediation guidance when findings are detected, including a direct link to the PLAT-KOP-020 false-positive handling guidance.
  • Made the failure message more visible with prominent alert styling and terminal color formatting (with safe plain-text fallback when color is unavailable).
  • Scoped the custom guidance so it appears for findings only, not for unrelated runtime/tooling failures.
  • Added CI-safe behavior so pseudo-terminal handling is disabled when running in CI, ensuring deterministic pipeline behavior.
image

Context

Secret scan failures were not giving contributors a consistent and clear, immediate path to resolve or safely handle false positives. This change improves developer experience by surfacing obvious next steps directly in the failure output, reducing confusion and rework during commit and pre-commit checks.

At the same time, the implementation avoids regressions by:

  • Keeping gitleaks output readable and familiar in local interactive runs.
  • Preventing local terminal behavior from causing unpredictable CI outcomes.
  • Ensuring the enhanced messaging does not mask non-finding operational errors.

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 7, 2026 15:26
@jamesthompson26-nhs jamesthompson26-nhs merged commit 71c01f3 into main Jul 8, 2026
29 checks passed
@jamesthompson26-nhs jamesthompson26-nhs deleted the feature/CCM-18514_Gitleaks_Config_Improvements branch July 8, 2026 12:13
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