Skip to content

ci(secu): run security scans on Ubuntu 26.04 - #76

Merged
sc979 merged 6 commits into
SECU-gitleaks-customfrom
SECU-1249-ubuntu-26-04-runners
Oct 12, 2026
Merged

sc979 merged 6 commits into
SECU-gitleaks-customfrom
SECU-1249-ubuntu-26-04-runners

Conversation

@sc979

@sc979 sc979 commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Description

What are your needs or what are you planning to do in this PR?

Fixes: SECU-1249

Move the reusable security workflows to the Ubuntu 26.04 runners, and install gitleaks the same way as the centreon-ubuntu-26.04 runner images, so the private runner's preinstalled gitleaks is reused.

Stacked on #64: this PR targets SECU-gitleaks-custom and will be retargeted to main once #64 is merged.

Runners

Workflow Private centreon repos Public repos
gitleaks-analysis.yml centreon-security → centreon-ubuntu-26.04-small ubuntu-24.04 → ubuntu-26.04
dependency-analysis.yml centreon-security → centreon-ubuntu-26.04-slim ubuntu-24.04 → ubuntu-26.04

The quanta-computing runner (quanta-security) is kept. Apart from the centreon label, both expressions stay in sync.

gitleaks install

Same rule as runners/base-ubuntu-26.04/Dockerfile in centreon-images (#390):

  • GITLEAKS_VERSION: "latest" is the newest vX.Y.Z release published at least 4 days before the run. It is read from the public releases feed (releases.atom): no token, no GitHub API call. A version can still be pinned.
  • If the feed cannot be resolved, GITLEAKS_FALLBACK_VERSION (8.30.1) is used, with a gitleaks-version-fallback warning, so the run is not blocked.
  • If the runner's gitleaks version matches, the runner's binary is kept (expected on centreon-ubuntu-26.04-small). Otherwise the release for the runner's architecture (x64 / arm64) is installed and verified against the release's checksums file. A checksum mismatch fails the job.

The pinned GITLEAKS_SHA256 is removed: integrity now relies on the release's checksums file, with the 4-day delay, as in the runner images.

New runner requirements for the install step: curl, python3, GNU date, sha256sum, tar (present on ubuntu-26.04 and the centreon-ubuntu-26.04 images; to check on quanta-security).

Tests

Workflow steps extracted verbatim and run against stubbed downloads and an authenticated local git remote: 131 / 131 passed, including the whole #64 suite (no regression on the scan ranges) and the install cases: runner binary kept / replaced, latest resolution (pre-release tags and releases under 4 days skipped), pinned version, feed fallback, checksum mismatch, missing checksums file, arm64, no token sent. The feed parser also returns 8.30.1 on the real feed.

To validate

Call both workflows from this branch (@SECU-1249-ubuntu-26-04-runners) on a private repository (self-hosted runner) and on a public one (ubuntu-26.04).

🤖 Generated with Claude Code

sc979 and others added 5 commits October 7, 2026 18:51
Move the reusable security workflows to the Ubuntu 26.04 runners:
private centreon repositories use centreon-ubuntu-26.04-small (secret
scan) and centreon-ubuntu-26.04-slim (dependency scan), public ones
ubuntu-26.04. The quanta-computing runner (quanta-security) is kept.

Refs: SECU-1249

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Assisted-by: Claude Code (claude-opus-5-5)
Some runners (centreon-ubuntu-26.04-small) already ship gitleaks. Keep
it when `gitleaks version` reports the pinned GITLEAKS_VERSION, and
install the pinned release, verified against GITLEAKS_SHA256, in every
other case: gitleaks missing (e.g. the public ubuntu-26.04 runner) or
any other version.

Refs: SECU-1249

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Assisted-by: Claude Code (claude-opus-5-5)
Use the rule of the centreon-ubuntu-26.04 runner images
(centreon-images, runners/base-ubuntu-26.04/Dockerfile), so the private
runner's preinstalled gitleaks is the expected one and gets reused:
GITLEAKS_VERSION "latest" is the newest stable release published at
least 4 days before the run, and a version can still be pinned. When
the runner's gitleaks differs, the release for the runner's
architecture is installed and verified against its checksums file.

The GitHub API is called with the job token, passed through curl's
config on stdin, to avoid the anonymous rate limit shared behind an
egress IP.

Refs: SECU-1249

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Assisted-by: Claude Code (claude-opus-5-5)
The latest-release lookup sent the job token to the GitHub API only to
lift the anonymous rate limit. Read the public releases feed instead:
it needs no token and no API quota, and its <updated> date is at or
after the publication date, so the 4-day delay still holds. Drafts are
not in the feed and only vX.Y.Z tags are kept. jq is no longer needed.

Refs: SECU-1249

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Assisted-by: Claude Code (claude-opus-5-5)
An unreachable releases feed failed the job, blocking every pull
request of the org. Install GITLEAKS_FALLBACK_VERSION (8.30.1) instead,
still verified against its checksums file, and emit a
gitleaks-version-fallback warning so the issue can be found and
investigated.

Refs: SECU-1249

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Assisted-by: Claude Code (claude-opus-5-5)
@sc979
sc979 requested a review from a team as a code owner October 9, 2026 13:22
@sc979
sc979 requested review from BaptisteCentreon and removed request for a team October 9, 2026 13:22
@sc979
sc979 marked this pull request as draft October 9, 2026 15:13
Signed-off-by: Stéphane Chapron <34628915+sc979@users.noreply.github.com>
@sc979
sc979 marked this pull request as ready for review October 12, 2026 12:56
@sc979
sc979 merged commit bdd0adb into SECU-gitleaks-custom Oct 12, 2026
3 checks passed
@sc979
sc979 deleted the SECU-1249-ubuntu-26-04-runners branch October 12, 2026 12:56
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