Skip to content

[WIP] Cleaning code-quality.yml and fix Gitleaks issue on CI#18

Closed
tarun-etikala wants to merge 1 commit into
red-hat-data-services:mainfrom
tarun-e:fix/ci-gitleaks
Closed

[WIP] Cleaning code-quality.yml and fix Gitleaks issue on CI#18
tarun-etikala wants to merge 1 commit into
red-hat-data-services:mainfrom
tarun-e:fix/ci-gitleaks

Conversation

@tarun-etikala
Copy link
Copy Markdown
Contributor

🔧 Fix: Enable Gitleaks Scanning on Fork PRs

Summary

Restructured CI workflows to support fork PR contributions while maintaining secure secret scanning with Gitleaks. Split the monolithic code-quality.yml into two separate workflows for better separation of concerns.

Problem

The previous workflow failed on fork PRs because:

  • Fork PRs cannot access action secret (GITLEAKS_LICENSE)

Changes Made

Split Workflows

  • linting.yml: Linting and formatting checks (no secrets required)

    • Ruff linting and formatting
    • Markdownlint validation
  • security-scanning.yml: Secret detection (requires secrets)

    • Gitleaks secret scanning
    • Talisman validation

Security Scanning Improvements

  • Uses pull_request_target to access secrets while scanning fork code
  • Explicitly checks out PR head SHA (scans incoming changes, not base)
  • Limited permissions following least-privilege principle
  • Static analysis only (Gitleaks/Talisman don't execute code)

References


Type of Change:

  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves existing functionality)

@tarun-etikala tarun-etikala changed the title Cleaning code-quality.yml and fix Gitleaks issue on CI [WIP] Cleaning code-quality.yml and fix Gitleaks issue on CI Nov 20, 2025
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