Skip to content

Add a ggshield secret scan to the shared security workflow - #26

Merged
imanimanyara merged 1 commit into
mainfrom
ci/ggshield-secret-scan
Nov 13, 2026
Merged

imanimanyara merged 1 commit into
mainfrom
ci/ggshield-secret-scan

Conversation

@imanimanyara

Copy link
Copy Markdown
Member

Summary

29 .gitguardian.yaml policy files exist across the estate and nothing runs ggshield, so none
of their exemptions has ever been consulted. This adds the job that would read them.

secrets:
  GITGUARDIAN_API_KEY:
    required: false

It cannot turn the estate red

The key is optional and the job checks for it. Without one, the scan step is skipped with a
::warning rather than failing.

Failing closed is correct for a finding — a leaked credential must stop the build — and wrong
for a missing setting, which would paint every caller red for something none of them did. Same
shape as simtabi/repo-templates' Refresh Bot credentials gate.

The part that decides whether this does anything

security.yml has exactly one caller, measured across 299 workflow files in
laranail/packages:

Reusable workflow Callers
tests.yml 39
hygiene.yml 20
security.yml 1 — package-scaffolder-old, superseded, no git remote
static-analysis.yml 1
release.yml 1

So merging this changes nothing until security.yml is adopted, and callers pass
secrets: inherit. Adopting it is a separate change from adding a job to it, and worth doing on
its own terms — two live security jobs (composer audit, OSV) are also reaching nobody.

Pin note

GitGuardian/ggshield-action's v1.56.1 is an annotated tag, so git/ref/tags returns a tag
object rather than a commit. The SHA here is dereferenced (5cc1ed2b), which is what uses:
resolves — the trap the org conventions call out by name.

Twenty-nine .gitguardian.yaml policy files exist across the estate and nothing
ran ggshield, so not one of their exemptions was ever consulted. A policy with
no reader is not a control.

The key is declared optional and the job checks for it: without one the scan is
skipped with a warning rather than failing. Failing closed is right for a
finding -- a leaked credential must stop the build -- and wrong for a missing
setting, which would paint every caller red for something none of them did. The
same shape as simtabi/repo-templates' Refresh Bot credentials gate.

ggshield-action is pinned to the commit of v1.56.1. Its tag is annotated, so the
ref endpoint returns a tag object rather than a commit; the value here is
dereferenced, which is what `uses:` resolves.

This does not make the scan run anywhere yet, and the reason is worth stating:
security.yml has exactly one caller in laranail/packages, package-scaffolder-old,
which is superseded and has no remote. tests.yml has 39 callers and hygiene.yml
has 20. Adopting security.yml is a separate change from adding a job to it.
Copilot AI balanced review requested due to automatic review settings November 13, 2026 14:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@imanimanyara
imanimanyara merged commit 345cdcf into main Nov 13, 2026
3 checks passed
@imanimanyara
imanimanyara deleted the ci/ggshield-secret-scan branch November 13, 2026 14:37
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