Skip to content
This repository was archived by the owner on Jun 20, 2026. It is now read-only.

ci: add gitleaks secret scanning#82

Merged
fschrhunt merged 2 commits into
mainfrom
ci/add-secret-scan
Jun 16, 2026
Merged

ci: add gitleaks secret scanning#82
fschrhunt merged 2 commits into
mainfrom
ci/add-secret-scan

Conversation

@fschrhunt

Copy link
Copy Markdown
Member

Adds Gitleaks secret scanning on every push and PR.

@fschrhunt fschrhunt requested a review from a team as a code owner June 15, 2026 20:44

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 98f1afbc6d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/secret-scan.yml Outdated
Comment on lines +22 to +23
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Pass the required Gitleaks org license

This repository is under the getnodus organization (package.json points to github.com/getnodus/context and CODEOWNERS uses the @getnodus/engineering team), and gitleaks-action requires GITLEAKS_LICENSE for organization-owned repos. Because the workflow only passes GITHUB_TOKEN, every push/PR run in this org context will fail before performing the scan unless GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE }} is provided or a scanner without that requirement is used.

Useful? React with 👍 / 👎.

Comment thread .github/workflows/secret-scan.yml Outdated
with:
fetch-depth: 0

- uses: gitleaks/gitleaks-action@v2

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Use the Node 24 Gitleaks action

This new workflow pins gitleaks/gitleaks-action@v2, whose action metadata uses Node 20; gitleaks-action's migration notes say Node 20 actions now need an insecure opt-out to keep running and will stop on GitHub-hosted runners later in 2026. Since this workflow runs on ubuntu-latest for every push/PR, it can become a failing CI job instead of a secret scan; update to gitleaks/gitleaks-action@v3 and the matching actions/checkout@v6 used elsewhere in the repo.

Useful? React with 👍 / 👎.

@fschrhunt fschrhunt enabled auto-merge (squash) June 15, 2026 21:04
gitleaks/gitleaks-action@v2 requires a paid GITLEAKS_LICENSE for
organization repositories and would fail in CI. Switch to the same
curl-based gitleaks binary approach used by the other getnodus repos
(leo, outreach, solo) so the "Scan for secrets" check actually runs and
satisfies the branch ruleset.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@fschrhunt fschrhunt merged commit 42946f6 into main Jun 16, 2026
8 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3163e2d1b0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

sudo mv gitleaks /usr/local/bin/

- name: Run Gitleaks
run: gitleaks detect --source . --log-opts="HEAD~50..HEAD" --redact --exit-code 1

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Scan the pushed range instead of a fixed tail

Gitleaks documents --log-opts as the options used for git log -p, so HEAD~50..HEAD only inspects the latest 50 commits on a linear push. When a new branch or force-push contains more than 50 new commits, a secret introduced and later removed before that cutoff is still present in the pushed history but this workflow will pass without reporting it; use the event's pushed range/base range or a full scan/baseline instead of a fixed tail.

Useful? React with 👍 / 👎.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant